Class CompileSearchTextDecorator
- java.lang.Object
-
- org.openstreetmap.josm.gui.widgets.CompileSearchTextDecorator
-
- All Implemented Interfaces:
java.util.EventListener
,javax.swing.event.DocumentListener
public final class CompileSearchTextDecorator extends java.lang.Object implements javax.swing.event.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 java.lang.String
originalToolTipText
private javax.swing.text.JTextComponent
textComponent
-
Constructor Summary
Constructors Modifier Constructor Description private
CompileSearchTextDecorator(javax.swing.text.JTextComponent textComponent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changedUpdate(javax.swing.event.DocumentEvent e)
static CompileSearchTextDecorator
decorate(javax.swing.text.JTextComponent f)
Decorates a text component with an execution to the search compiler.SearchCompiler.Match
getMatch()
Returns the compiled searchvoid
insertUpdate(javax.swing.event.DocumentEvent e)
void
removeUpdate(javax.swing.event.DocumentEvent e)
private void
setFilter()
-
-
-
Field Detail
-
textComponent
private final javax.swing.text.JTextComponent textComponent
-
originalToolTipText
private final java.lang.String originalToolTipText
-
filter
private SearchCompiler.Match filter
-
-
Constructor Detail
-
CompileSearchTextDecorator
private CompileSearchTextDecorator(javax.swing.text.JTextComponent textComponent)
-
-
Method Detail
-
decorate
public static CompileSearchTextDecorator decorate(javax.swing.text.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(javax.swing.event.DocumentEvent e)
- Specified by:
insertUpdate
in interfacejavax.swing.event.DocumentListener
-
removeUpdate
public void removeUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
removeUpdate
in interfacejavax.swing.event.DocumentListener
-
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
changedUpdate
in interfacejavax.swing.event.DocumentListener
-
-