|
||||||||||
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 |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
MATCH_ACTION_COMMAND
|
protected javax.swing.JCheckBox |
matchCheck
|
protected PatternModel |
patternModel
|
static java.lang.String |
SEARCH_FIELD_LABEL
|
static java.lang.String |
SEARCH_FIELD_MNEMONIC
|
static java.lang.String |
SEARCH_TITLE
|
protected javax.swing.JTextField |
searchField
|
protected javax.swing.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(java.lang.String actionCommand,
java.lang.String methodName)
creates, configures and returns a bound action to the given method of this. |
protected AbstractActionExt |
createModelStateAction(java.lang.String command,
java.lang.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(java.lang.String key)
convenience method for type-cast to AbstractActionExt. |
protected ActionContainerFactory |
getActionContainerFactory()
|
protected PatternModel |
getPatternModel()
returns the patternModel. |
protected java.beans.PropertyChangeListener |
getPatternModelListener()
creates and returns a PropertyChangeListener to the PatternModel. |
protected javax.swing.event.DocumentListener |
getSearchFieldListener()
|
protected int |
getSearchFieldWidth()
|
protected java.lang.String |
getUIString(java.lang.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 with the actionMap. |
protected void |
initComponents()
|
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()
|
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 javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEARCH_FIELD_LABEL
public static final java.lang.String SEARCH_FIELD_MNEMONIC
public static final java.lang.String SEARCH_TITLE
public static final java.lang.String MATCH_ACTION_COMMAND
protected javax.swing.JLabel searchLabel
protected javax.swing.JTextField searchField
protected javax.swing.JCheckBox matchCheck
protected PatternModel patternModel
Constructor Detail |
---|
public AbstractPatternPanel()
Method Detail |
---|
public abstract void match()
protected AbstractActionExt getAction(java.lang.String key)
key
-
protected void initActions()
protected void initExecutables()
protected void initPatternActions()
protected java.lang.String getUIString(java.lang.String key)
key
-
protected AbstractActionExt createModelStateAction(java.lang.String command, java.lang.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(java.lang.String actionCommand, java.lang.String methodName)
actionCommand
- the actionCommand, same as key to find localizable resourcesmethodName
- the method to call an actionPerformed.
protected void refreshPatternFromModel()
protected PatternModel getPatternModel()
protected PatternModel createPatternModel()
protected java.beans.PropertyChangeListener getPatternModelListener()
protected void refreshEmptyFromModel()
protected void refreshModelFromDocument()
protected void refreshDocumentFromModel()
protected javax.swing.event.DocumentListener getSearchFieldListener()
protected void bind()
protected void bindSearchLabel()
protected ActionContainerFactory getActionContainerFactory()
protected void initComponents()
protected int getSearchFieldWidth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |