public final class SearchPatternController
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SearchPatternController.Option |
Options of search patterns.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected T |
component |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener) |
Adds a
ChangeListener to the listener list. |
void |
bind(SearchPatternController.Option option,
javax.swing.AbstractButton button) |
Bind an abstract button (usually checkbox) to a SearchPattern option.
|
void |
bindMatchTypeComboBox(javax.swing.JComboBox comboBox) |
Bind Match Type option to a combo box.
|
protected void |
fireChange() |
Fires a change event to all registered listeners.
|
T |
getComponent() |
|
SearchPattern |
getSearchPattern() |
Get search pattern currently represented by this controller.
|
boolean |
hasListeners() |
Checks if there are any listeners registered to this
ChangeSupport. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener) |
Removes a
ChangeListener from the listener list. |
void |
setSearchPattern(SearchPattern searchPattern) |
Set text and options to represent a search pattern.
|
void |
unbind(SearchPatternController.Option option,
javax.swing.AbstractButton button) |
Unbind a button from a SearchPattern option.
|
@NonNull public SearchPattern getSearchPattern()
public void setSearchPattern(@NonNull
SearchPattern searchPattern)
public void bind(@NonNull
SearchPatternController.Option option,
@NonNull
javax.swing.AbstractButton button)
option - Option whose value the button should represent.button - Button to control and display the option.public void bindMatchTypeComboBox(@NonNull
javax.swing.JComboBox comboBox)
comboBox - Combo box to control and display the match type. The
model of the combo box can contain only items of type SearchPattern.MatchType.
SearchPattern.MatchType.LITERAL and SearchPattern.MatchType.REGEXP are mandatory in
the model.public void unbind(@NonNull
SearchPatternController.Option option,
@NonNull
javax.swing.AbstractButton button)
public final T getComponent()
public final void addChangeListener(@NonNull
javax.swing.event.ChangeListener listener)
ChangeListener to the listener list. The same listener
object may be added more than once, and will be called as many times as
it is added. If
listener is null, no exception is thrown and no action is
taken.listener - the
ChangeListener to be added.public final void removeChangeListener(@NonNull
javax.swing.event.ChangeListener listener)
ChangeListener from the listener list. If
listener was added more than once, it will be notified one
less time after being removed. If
listener is null, or was never added, no exception is thrown
and no action is taken.listener - the
ChangeListener to be removed.protected final void fireChange()
public final boolean hasListeners()
ChangeSupport.Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.