|
|||||||||||
| 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.JLabel
com.tensegrity.gui.swing.repository.AbstractRepositoryItem
com.tensegrity.gui.swing.repository.ActionRepositoryItem
ActionRepositoryItem.java
| Nested Class Summary | |
static class |
ActionRepositoryItem.ClickActionProvider
ActionRepositoryItemClickActionProvider |
| Nested classes inherited from class javax.swing.JLabel |
javax.swing.JLabel.AccessibleJLabel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JLabel |
labelFor |
| 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ActionRepositoryItem(javax.swing.Action action)
Constructor for ActionRepositoryItem. |
|
ActionRepositoryItem(Icon icon,
javax.swing.Action action)
Constructor for ActionRepositoryItem. |
|
ActionRepositoryItem(Icon icon,
javax.swing.Action action,
java.lang.String tooltip)
Constructor for ActionRepositoryItem. |
|
ActionRepositoryItem(java.lang.String iconpath,
java.lang.Class resourceclass,
javax.swing.Action action)
Constructs an action repository item with special loading of the icon. |
|
ActionRepositoryItem(java.lang.String iconpath,
java.lang.Class resourceclass,
javax.swing.Action action,
java.lang.String tooltip)
Constructs an action repository item with special loading of the icon. |
|
| Method Summary | |
void |
applyEvList()
Tells the component to apply its UIItemEvaluationList. |
ActionRepositoryItem.ClickActionProvider |
getClickActionProvider()
Returns the clickActionProvider. |
void |
installEvList()
Tells the component to setup its internal state. |
void |
invokeLeftClickAction(java.awt.event.MouseEvent e)
Invokes the actionPerformed of the internal Action
instance. |
void |
invokeRightClickAction(java.awt.event.MouseEvent e)
Forwards to the invokeLeftClickAction, but can be overriden
to implement context menus on repository items. |
boolean |
isEnabled()
|
void |
performAction()
Perform the registered action |
void |
setClickActionProvider(ActionRepositoryItem.ClickActionProvider clickActionProvider)
Sets the value of clickActionProvider |
void |
setText(java.lang.String text)
Overridden method change the tooltip controlled by an UIManager-instance. |
void |
setTooltipID(java.lang.String tooltipID)
Sets the id of the tooltip text resource |
void |
setUIManager(UIManager uiManager)
Sets the uimanager to use for the tooltip |
| Methods inherited from class com.tensegrity.gui.swing.repository.AbstractRepositoryItem |
getDefaultBackground, getDefaultBorder, getDefaultInsets, getHighlightColor, getHoveredBorder, getHoveredInsets, getInsets, getInsets, getPressedBackground, getPressedColor, getUnpressedColor, isHighlighted, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paintBorder, setDefaultBackground, setDefaultBorder, setDefaultInsets, setHighlightColor, setHighlighted, setHoveredBorder, setHoveredInsets, setPressedBackground |
| Methods inherited from class javax.swing.JLabel |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
| Constructor Detail |
public ActionRepositoryItem(java.lang.String iconpath,
java.lang.Class resourceclass,
javax.swing.Action action)
iconpath - the path to the icon relative to the resourceclass.resourceclass - specifies the base of the icon path.action - the action to associate with the repositoryitem.
public ActionRepositoryItem(java.lang.String iconpath,
java.lang.Class resourceclass,
javax.swing.Action action,
java.lang.String tooltip)
iconpath - the path to the icon relative to the resourceclass.resourceclass - specifies the base of the icon path.action - the action to associate with the repositoryitem.tooltip - the tooltippublic ActionRepositoryItem(javax.swing.Action action)
action - the action to associate with the icon.
public ActionRepositoryItem(Icon icon,
javax.swing.Action action)
icon - optional icon, may be null.action - the action to execute on click.
public ActionRepositoryItem(Icon icon,
javax.swing.Action action,
java.lang.String tooltip)
icon - optional icon, may be null.action - the action to execute on click.tooltip - a tooltip String for the item.| Method Detail |
public void performAction()
public void setUIManager(UIManager uiManager)
uiManager - the uimanager to use for the tooltippublic void setTooltipID(java.lang.String tooltipID)
tooltipID - the id of the tooltip text resourcepublic void setText(java.lang.String text)
text - the new tooltip text.public void invokeRightClickAction(java.awt.event.MouseEvent e)
invokeLeftClickAction, but can be overriden
to implement context menus on repository items.
e - the MouseEvent.public void invokeLeftClickAction(java.awt.event.MouseEvent e)
actionPerformed of the internal Action
instance. NOTE: You may consider to use invokeLater here to allow
Labels mousePressed to return *BEFORE* the actionPerformed has
been processed.
e - the MouseEvent.public void setClickActionProvider(ActionRepositoryItem.ClickActionProvider clickActionProvider)
clickActionProvider - The new value to set.public ActionRepositoryItem.ClickActionProvider getClickActionProvider()
public void applyEvList()
EvaluableUIItemEvaluationList.
applyEvList in interface Evaluablepublic void installEvList()
Evaluable
installEvList in interface Evaluablepublic boolean isEnabled()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||