|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jdesktop.swingx.JXPanel
org.jdesktop.swingx.AbstractPatternPanel
org.jdesktop.swingx.JXSearchPanel
public class JXSearchPanel
Rudimentary search panel. Updates PatternMatchers from user input. Supports
public class PatternHandler implements PatternMatcher {
private Highlighter highlighter;
private Pattern pattern;
public void setPattern(Pattern pattern) {
this.pattern = pattern;
highlighter.setHighlightPredicate(new PatternPredicate(pattern));
}
}
TODO: allow custom PatternModel and/or access to configuration of bound
PatternModel.
TODO: fully support control of multiple PatternMatchers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
MATCH_RULE_ACTION_COMMAND
|
| Fields inherited from class org.jdesktop.swingx.AbstractPatternPanel |
|---|
MATCH_ACTION_COMMAND, matchCheck, patternModel, SEARCH_FIELD_LABEL, SEARCH_FIELD_MNEMONIC, SEARCH_TITLE, searchField, searchLabel |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JXSearchPanel()
|
|
| Method Summary | |
|---|---|
void |
addPatternMatcher(PatternMatcher matcher)
|
protected void |
bind()
bind the components to the patternModel/actions. |
String |
getFieldName()
returns the label of the search combo. |
Pattern |
getPattern()
returns the current compiled Pattern. |
protected void |
initComponents()
create contained components. |
protected void |
initExecutables()
creates and registers all "executable" actions. |
void |
match()
Callback action bound to MATCH_ACTION_COMMAND. |
void |
setFieldName(String name)
set the label of the search combo. |
void |
setPatternFilter(PatternFilter filter)
sets the PatternFilter control. |
protected void |
updateFieldName(PatternMatcher matcher)
|
void |
updateMatchRule()
set's the PatternModel's MatchRule to the selected in combo. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String MATCH_RULE_ACTION_COMMAND
| Constructor Detail |
|---|
public JXSearchPanel()
| Method Detail |
|---|
public void addPatternMatcher(PatternMatcher matcher)
public void setPatternFilter(PatternFilter filter)
public void setFieldName(String name)
name - public String getFieldName()
public Pattern getPattern()
Patternprotected void updateFieldName(PatternMatcher matcher)
matcher - public void match()
AbstractPatternPanel
match in class AbstractPatternPanelpublic void updateMatchRule()
protected void initExecutables()
AbstractPatternPanel
initExecutables in class AbstractPatternPanelprotected void bind()
bind in class AbstractPatternPanelprotected void initComponents()
initComponents in class AbstractPatternPanel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||