Class CompileSearchTextDecorator
- java.lang.Object
-
- org.openstreetmap.josm.gui.widgets.CompileSearchTextDecorator
-
- All Implemented Interfaces:
EventListener
,DocumentListener
public final class CompileSearchTextDecorator extends Object implements DocumentListener
Decorates a text component with an execution to the search compiler. Afterwards, a"filter"
property change will be fired and the compiled search can be accessed withgetMatch()
.
-
-
Field Summary
Fields Modifier and Type Field Description private SearchCompiler.Match
filter
private String
originalToolTipText
private JTextComponent
textComponent
-
Constructor Summary
Constructors Modifier Constructor Description private
CompileSearchTextDecorator(JTextComponent textComponent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changedUpdate(DocumentEvent e)
static CompileSearchTextDecorator
decorate(JTextComponent f)
Decorates a text component with an execution to the search compiler.SearchCompiler.Match
getMatch()
Returns the compiled searchvoid
insertUpdate(DocumentEvent e)
void
removeUpdate(DocumentEvent e)
private void
setFilter()
-
-
-
Field Detail
-
textComponent
private final JTextComponent textComponent
-
originalToolTipText
private final String originalToolTipText
-
filter
private SearchCompiler.Match filter
-
-
Constructor Detail
-
CompileSearchTextDecorator
private CompileSearchTextDecorator(JTextComponent textComponent)
-
-
Method Detail
-
decorate
public static CompileSearchTextDecorator decorate(JTextComponent f)
Decorates a text component with an execution to the search compiler. Afterwards, a"filter"
property change will be fired and the compiled search can be accessed withgetMatch()
.- Parameters:
f
- the text component to decorate- Returns:
- an instance of the decorator in order to access the compiled search via
getMatch()
-
setFilter
private void setFilter()
-
getMatch
public SearchCompiler.Match getMatch()
Returns the compiled search- Returns:
- the compiled search
-
insertUpdate
public void insertUpdate(DocumentEvent e)
- Specified by:
insertUpdate
in interfaceDocumentListener
-
removeUpdate
public void removeUpdate(DocumentEvent e)
- Specified by:
removeUpdate
in interfaceDocumentListener
-
changedUpdate
public void changedUpdate(DocumentEvent e)
- Specified by:
changedUpdate
in interfaceDocumentListener
-
-