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.Matchfilterprivate java.lang.StringoriginalToolTipTextprivate javax.swing.text.JTextComponenttextComponent
-
Constructor Summary
Constructors Modifier Constructor Description privateCompileSearchTextDecorator(javax.swing.text.JTextComponent textComponent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangedUpdate(javax.swing.event.DocumentEvent e)static CompileSearchTextDecoratordecorate(javax.swing.text.JTextComponent f)Decorates a text component with an execution to the search compiler.SearchCompiler.MatchgetMatch()Returns the compiled searchvoidinsertUpdate(javax.swing.event.DocumentEvent e)voidremoveUpdate(javax.swing.event.DocumentEvent e)private voidsetFilter()
-
-
-
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:
insertUpdatein interfacejavax.swing.event.DocumentListener
-
removeUpdate
public void removeUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
removeUpdatein interfacejavax.swing.event.DocumentListener
-
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
changedUpdatein interfacejavax.swing.event.DocumentListener
-
-