com.ibm.mm.viewer
Class CMBViewerToolbar
- java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
com.ibm.mm.viewer.CMBViewerToolbar
All implemented interfaces:
CMBViewerConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants
- public class CMBViewerToolbar
- extends javax.swing.JToolBar
- implements java.beans.PropertyChangeListener, CMBViewerConstants
Since:
8.1
See Also:
Nested Class Summary
| Nested classes/interfaces inherited from class javax.swing.JToolBar |
|---|
javax.swing.JToolBar.Separator |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
Field Summary
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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
| Constructor and Description |
|---|
CMBViewerToolbar(CMBGenericDocViewer viewer)
Constructor
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
addActionComponent(javax.swing.Action action)
Add action component.
|
|
addActionComponent(javax.swing.Action action,javax.swing.JComponent component)
Add a tool to the toolbar.
|
|
getAction(java.lang.String name)
Gets the action object.
|
|
getActions()
Gets all the action objects associated with this toolbar.
|
|
getComponent(java.lang.String name)
Gets the action component for the specified
|
|
getComponents()
Gets all the child components of this toolbar.
|
|
propertyChange(java.beans.PropertyChangeEvent event)
This method is called when actions on the toolbar change state.
|
|
removeActionComponent(java.lang.String name)
Removes the specified component from the toolbar.
|
| Methods inherited from class javax.swing.JToolBar |
|---|
add, addSeparator, addSeparator, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusBackward, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail
CMBViewerToolbar
- public CMBViewerToolbar(CMBGenericDocViewer viewer)
Constructor
Parameters:
viewer - The Generic Doc Viewer instance. Method Detail
addActionComponent
- public void addActionComponent( javax.swing.Action action)
Add action component. This method creates a button on the toolbar
for the action.
addActionComponent
- public void addActionComponent( javax.swing.Action action,
- javax.swing.JComponent component)
Add a tool to the toolbar. The tool can be represented with
any component. The action is used to enable/disable the tool.
Since:
8.4
removeActionComponent
- public void removeActionComponent( java.lang.String name)
Removes the specified component from the toolbar.
Parameters:
name - The name or the action command of the toolbar component. getComponent
- public java.awt.Component getComponent( java.lang.String name)
Gets the action component for the specified
Parameters:
name - The name or the action command of the component. getAction
- public javax.swing.Action getAction( java.lang.String name)
Gets the action object. This is useful for the parent application or applet of the
generic doc viewer to add menu items for the toolbar actions.
Parameters:
name - The action command name Returns:
Action The action object.
getComponents
- public java.awt.Component[] getComponents( )
Gets all the child components of this toolbar. Useful for more customization.
Overrides:
getComponents in class java.awt.Container
Returns:
Component[] An array of the child components.
getActions
- public javax.swing.Action[] getActions( )
Gets all the action objects associated with this toolbar.
Returns:
Action[] An array of the action objects.
propertyChange
- public void propertyChange(java.beans.PropertyChangeEvent event)
This method is called when actions on the toolbar change state.
It is used to set the state of the tools on the toolbar so that
labels will not appear. This method is used internally and
should not be called by applications.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener