|
swingx Version 2005-08-19 |
|||||||||
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
public abstract class AbstractPatternPanel
Common base class of ui clients. Implements basic synchronization between PatternModel state and actions bound to it. PENDING: extending JXPanel is a convenience measure, should be extracted into a dedicated controller. PENDING: should be re-visited when swingx goes binding-aware
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_ACTION_COMMAND
|
protected JCheckBox |
matchCheck
|
protected PatternModel |
patternModel
|
static String |
SEARCH_FIELD_LABEL
|
static String |
SEARCH_FIELD_MNEMONIC
|
static String |
SEARCH_TITLE
|
protected JTextField |
searchField
|
protected JLabel |
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 | |
---|---|
AbstractPatternPanel()
|
Method Summary | |
---|---|
protected void |
bind()
configure and bind components to/from PatternModel |
protected void |
bindSearchLabel()
Configures the searchLabel. |
protected AbstractActionExt |
createBoundAction(String actionCommand,
String methodName)
creates, configures and returns a bound action to the given method of this. |
protected AbstractActionExt |
createModelStateAction(String command,
String methodName,
boolean initial)
creates, configures and returns a bound state action on a boolean property of the PatternModel. |
protected PatternModel |
createPatternModel()
factory method to create the PatternModel. |
protected AbstractActionExt |
getAction(String key)
convenience method for type-cast to AbstractActionExt. |
protected ActionContainerFactory |
getActionContainerFactory()
|
protected PatternModel |
getPatternModel()
returns the patternModel. |
protected PropertyChangeListener |
getPatternModelListener()
creates and returns a PropertyChangeListener to the PatternModel. |
protected DocumentListener |
getSearchFieldListener()
Create DocumentListener for the search field that calls
corresponding callback method whenever the search field contents is being changed |
protected int |
getSearchFieldWidth()
|
protected String |
getUIString(String key)
tries to find a String value from the UIManager, prefixing the given key with the UIPREFIX. |
protected void |
initActions()
creates and registers all actions for the default the actionMap. |
protected void |
initComponents()
Initialize all the incorporated components and models |
protected void |
initExecutables()
creates and registers all "executable" actions. |
protected void |
initPatternActions()
creates actions bound to PatternModel's state. |
abstract void |
match()
Callback action bound to MATCH_ACTION_COMMAND. |
protected void |
refreshDocumentFromModel()
callback method that updates document from the search field |
protected void |
refreshEmptyFromModel()
called from listening to empty property of PatternModel. |
protected void |
refreshModelFromDocument()
callback method from listening to searchField. |
protected void |
refreshPatternFromModel()
called from listening to pattern property of PatternModel. |
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 SEARCH_FIELD_LABEL
public static final String SEARCH_FIELD_MNEMONIC
public static final String SEARCH_TITLE
public static final String MATCH_ACTION_COMMAND
protected JLabel searchLabel
protected JTextField searchField
protected JCheckBox matchCheck
protected PatternModel patternModel
Constructor Detail |
---|
public AbstractPatternPanel()
Method Detail |
---|
public abstract void match()
protected AbstractActionExt getAction(String key)
key
- Key to retrieve action
AbstractActionExt
protected void initActions()
protected void initExecutables()
protected void initPatternActions()
protected String getUIString(String key)
key
- String
that specifyes the value in UIManager
String
as returned by the UIManager or key itself
if no value bound to this key in UIManagerprotected AbstractActionExt createModelStateAction(String command, String methodName, boolean initial)
command
- the actionCommand - same as key to find localizable resourcesmethodName
- the method on the PatternModel to call on item state changedinitial
- the initial value of the property
protected AbstractActionExt createBoundAction(String actionCommand, String methodName)
actionCommand
- the actionCommand, same as key to find localizable resourcesmethodName
- the method to call an actionPerformed.
protected void refreshPatternFromModel()
protected PatternModel getPatternModel()
PatternModel
if it exists or newly created
one if it was not initialized before this callprotected PatternModel createPatternModel()
PatternModel
protected PropertyChangeListener getPatternModelListener()
PropertyChangeListener
protected void refreshEmptyFromModel()
protected void refreshModelFromDocument()
protected void refreshDocumentFromModel()
protected DocumentListener getSearchFieldListener()
DocumentListener
for the search field that calls
corresponding callback method whenever the search field contents is being changed
DocumentListener
protected void bind()
protected void bindSearchLabel()
protected ActionContainerFactory getActionContainerFactory()
ActionContainerFactory
.
Will lazily create new factory if it does not existprotected void initComponents()
protected int getSearchFieldWidth()
|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |