public final class FileNameController extends Object
ComponentUtils
to create instances of this class.Modifier and Type | Field and Description |
---|---|
protected T |
component |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a
ChangeListener to the listener list. |
void |
displayAllFilesInfo()
Display (all files) text.
|
protected void |
fireChange()
Fires a change event to all registered listeners.
|
T |
getComponent() |
String |
getFileNamePattern()
Get pattern for matching file names.
|
boolean |
hasListeners()
Checks if there are any listeners registered to this
ChangeSupport . |
void |
hideAllFilesInfo()
Hide (all files) text.
|
boolean |
isAllFilesInfoDisplayed()
Tell whether gray (all files) text is currently displayed.
|
boolean |
isRegularExpression()
Tells whether the contained expression should be interpreted as a simple
pattern or a regular expression pattern.
|
void |
removeChangeListener(ChangeListener listener)
Removes a
ChangeListener from the listener list. |
void |
setFileNamePattern(String pattern)
Set file name pattern.
|
void |
setRegularExpression(boolean regularExpression)
Sets whether the contained expression should be interpreted as a simple
pattern or a regular expression pattern.
|
protected T extends JComponent component
public String getFileNamePattern()
public void setFileNamePattern(String pattern)
public boolean isRegularExpression()
public boolean isAllFilesInfoDisplayed()
public void setRegularExpression(boolean regularExpression)
regularExpression
- True if the contained string is a regular
expression, false if it is a simple pattern.public void displayAllFilesInfo()
public void hideAllFilesInfo()
public final T getComponent()
public final void addChangeListener(@NonNull 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 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
.