|
|||||||||||
| 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.JToolBar
com.tensegrity.gui.swing.control.SwingToolBar
This SwingToolBar keeps care of its components when it comes to
switching languages. All AbstractButtons
laid out in this toolbar will get informed about this kind of change and
the tooltips get adjusted by means of the information set in the
UIManager instance. SwingToolBar overwrites the
updateUI-method to get notified when the current LookAndFeel is
switched. The Toolbar then decides which Icons to use for the specific
Button.
UIManager,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JToolBar |
javax.swing.JToolBar.AccessibleJToolBar, javax.swing.JToolBar.Separator |
| 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.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 | |
|
SwingToolBar(SwingToolBar toolBar)
Copy constructor. |
protected |
SwingToolBar(UIManager uiManager)
Do not use this constructor. |
protected |
SwingToolBar(UIManager uiManager,
int orientation)
Do not use this constructor. |
|
SwingToolBar(UIManager uiManager,
java.lang.String id)
Creates a new ToolBar with the specified id as resource id for
the title. |
|
SwingToolBar(UIManager uiManager,
java.lang.String id,
int orientation)
Creates a new ToolBar with the specified id as resource id for
the title. |
| Method Summary | |
void |
acted(int actID)
Invoked after each interaction cycle. |
javax.swing.JButton |
add(javax.swing.Action action,
int index)
Returns a JButton for the specified Action at
index index. |
void |
addSeparator()
Appends a separator of default size to the end of the tool bar. |
void |
applyEvList()
Retrieves the id of the command associated with each AbstractButton of this ToolBar and refreshes the tooltip string the string provided by the UIManager. |
void |
documentAdded(DocumentEvent documentevent)
Invoked after a document was added to the mdicomponent. |
void |
documentModelChanged(DocumentEvent documentevent)
Invoked after a document's model has changed. |
void |
documentPreAdd(DocumentEvent documentevent)
Invoked when a document is about to be added to a mdicomponent. |
void |
documentPreRemove(DocumentEvent documentevent)
Invoked when a document is about to be removed from a mdicomponent. |
void |
documentRemoved(DocumentEvent documentevent)
Invoked after a document was removed from the mdicomponent. |
void |
documentSelected(DocumentEvent documentevent)
Invoked after a document was selected in the mdicomponent. |
void |
documentUnselected(DocumentEvent documentevent)
Invoked after a document was unselected in the mdicomponent. |
java.lang.String |
getId()
Accessors for the id associated with this ToolBar. |
java.lang.String |
getName()
A toolbar should provide a human readable name. |
BasicComponent |
getParentComponent()
Returns the parent Component of this instance. |
int |
indexOf(java.lang.String id)
Returns the index of a component associated with a the given id. |
void |
installEvList()
Tells the component to setup its internal state. |
void |
postAction()
Invoked when a user interaction has completed on a GraphPanel this instance of
GraphPanelListener is registered with.
|
void |
postDropBaseComposite(BaseComposite baseComposite)
Invoked when a BaseComposite was dragged and dropped onto
the GraphPanel this GraphPanelListener. |
void |
postMouseClick()
Invoked when a mouse click has completed on a GraphPanel this instance of
GraphPanelListener is registered with. |
void |
preAction()
Invoked when a user interaction is about to begin on a GraphPanel this instance of
GraphPanelListener is registered with.
|
void |
updateStatus()
This method is used to keep the state of the toolbar up-to-date. |
void |
updateUI()
This method checks whether the LookAndFeel has changed and applies this change to the icons of the bar. |
| Methods inherited from class javax.swing.JToolBar |
add, addImpl, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI |
| 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, getInsets, getInsets, 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, 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, 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, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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 |
| Methods inherited from interface com.tensegrity.gui.component.BasicComponent |
getHeight, getWidth, repaint |
| Constructor Detail |
protected SwingToolBar(UIManager uiManager)
uiManager - UIManager to obtain localized strings.
public SwingToolBar(UIManager uiManager,
java.lang.String id)
id as resource id for
the title. This resulting string will be used as the window-title if the ToolBar is
un-docked. This ToolBar has a HORIZONTAL-orientation.
uiManager - UIManager to obtain localized strings.id - identifier of the GUI resource for the title of this ToolBar.
protected SwingToolBar(UIManager uiManager,
int orientation)
uiManager - UIManager to obtain localized strings.orientation - the desired orientation. Must be either
HORIZONTAL or VERTICAL.
public SwingToolBar(UIManager uiManager,
java.lang.String id,
int orientation)
id as resource id for
the title. This resulting string will be used as the window-title if the ToolBar is
un-docked. Use the orientation parameter to specify a
whether the ToolBar is directed horizontal or vertical.
uiManager - UIManager to obtain localized strings.id - identifier of the GUI resource for the title of this ToolBar.orientation - the desired orientation. Must be either
HORIZONTAL or VERTICAL.public SwingToolBar(SwingToolBar toolBar)
toolBar - the SwingToolBar to copy.| Method Detail |
public javax.swing.JButton add(javax.swing.Action action,
int index)
JButton for the specified Action at
index index.
action - the Action of this JButton.index - the index.
JButton for the specified Action at
index index.public void updateUI()
DEFAULT_ICON and TENSEGRITY_ICONhas been set.
If not, its ignored.
JToolBar.updateUI()public int indexOf(java.lang.String id)
ToolBarid. The component of a toolbar are usually not directly
associated to such an id, rather their internal Command instance.
indexOf in interface ToolBarid - the id of command.
public void updateStatus()
ToolBar
updateStatus in interface ToolBarpublic void installEvList()
Evaluable
installEvList in interface Evaluablepublic java.lang.String getName()
ToolBar
getName in interface ToolBarpublic void applyEvList()
applyEvList in interface EvaluableEvaluable.applyEvList()public void addSeparator()
public void documentAdded(DocumentEvent documentevent)
DocumentListener
documentAdded in interface DocumentListenerdocumentevent - the documentevent structure carrying information.public void documentModelChanged(DocumentEvent documentevent)
DocumentListener
documentModelChanged in interface DocumentListenerdocumentevent - the documentevent structure carrying information.
public void documentPreAdd(DocumentEvent documentevent)
throws DocumentEventVetoException
DocumentListener
documentPreAdd in interface DocumentListenerdocumentevent - the documentevent structure carrying information.
DocumentEventVetoException - indicates that the documentevent is
not desired.
public void documentPreRemove(DocumentEvent documentevent)
throws DocumentEventVetoException
DocumentListener
documentPreRemove in interface DocumentListenerdocumentevent - the documentevent structure carrying information.
DocumentEventVetoException - indicates that the documentevent is
not desired.public void documentRemoved(DocumentEvent documentevent)
DocumentListener
documentRemoved in interface DocumentListenerdocumentevent - the documentevent structure carrying information.public void documentSelected(DocumentEvent documentevent)
DocumentListener
documentSelected in interface DocumentListenerdocumentevent - the documentevent structure carrying information.public void documentUnselected(DocumentEvent documentevent)
DocumentListener
documentUnselected in interface DocumentListenerdocumentevent - the documentevent structure carrying information.public void postDropBaseComposite(BaseComposite baseComposite)
GraphPanelListenerBaseComposite was dragged and dropped onto
the GraphPanel this GraphPanelListener.
postDropBaseComposite in interface GraphPanelListenerbaseComposite - thepublic void preAction()
GraphPanelListenerGraphPanel this instance of
GraphPanelListener is registered with.
the GraphPanel this GraphPanelListener.
preAction in interface GraphPanelListenerpublic void acted(int actID)
GraphPanelListener
acted in interface GraphPanelListeneractID - integer id that holds one of the values
defined in InteractionConstants
that are prefixed with ACT*; The id gives additional
info about the type of interaction that actually occured (e.g.
whether a composite was manipulated or whether one or many composites
were moved.public void postAction()
GraphPanelListenerGraphPanel this instance of
GraphPanelListener is registered with.
the GraphPanel this GraphPanelListener.
postAction in interface GraphPanelListenerpublic void postMouseClick()
GraphPanelListenerGraphPanel this instance of
GraphPanelListener is registered with.
postMouseClick in interface GraphPanelListenerpublic BasicComponent getParentComponent()
BasicComponent
getParentComponent in interface BasicComponentnull if no parent exists.public java.lang.String getId()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||