com.ibm.mm.viewer

Class CMBViewerToolbar

  1. java.lang.Object
  2. extended byjava.awt.Component
  3. extended byjava.awt.Container
  4. extended byjavax.swing.JComponent
  5. extended byjavax.swing.JToolBar
  6. extended bycom.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

  1. public class CMBViewerToolbar
  2. extends javax.swing.JToolBar
  3. implements java.beans.PropertyChangeListener, CMBViewerConstants
CMBViewerToolbar extends JToolbar and provides the mechanism to plugin custom toolbars into the generic doc viewer. The viewer toolkit provides a mechanism by use of a configuration properties file to specify the actions and creates toolbars with specified actions. These are customizable by changing the configuration properties file. The application or applet using the CMBGenericDocViewer can access the action objects within these toolbars to create corresponding menu items.
Since:
8.1
See Also:
CMBGenericDocViewer, Serialized Form

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 com.ibm.mm.viewer.CMBViewerConstants
ACTION_NAME_UNKNOWN, ANNO_EDIT_MODE, CHANGETYPE_ADD_ANN, CHANGETYPE_BALANCE, CHANGETYPE_BOOKMARKS, CHANGETYPE_DEL_ANN, CHANGETYPE_DOCUMENT_OCR, CHANGETYPE_DOCUMENT_TEXT, CHANGETYPE_ENHANCE, CHANGETYPE_HIT_HIGHLIGHT, CHANGETYPE_INVERT, CHANGETYPE_MOD_ANN, CHANGETYPE_MODE_ANN, CHANGETYPE_MODE_AREA, CHANGETYPE_OCR_CANCEL, CHANGETYPE_PAGE, CHANGETYPE_PAGE_OCR, CHANGETYPE_PAGE_TEXT, CHANGETYPE_PAGECNT, CHANGETYPE_PAGES_ADDED, CHANGETYPE_PAGES_COPIED, CHANGETYPE_PAGES_DELETED, CHANGETYPE_PAGES_MODIFIED, CHANGETYPE_PAGES_MOVED, CHANGETYPE_PAGES_SELECTED, CHANGETYPE_ROTATE, CHANGETYPE_SCALE, CHANGETYPE_TEXT_SELECTED, CHANGETYPE_UNKNOWN, CHANGETYPE_VIEWABLE_PAGES_CHANGED, CMBGENERICDOCVIEWER_NAME, DEFAULT_DISPLAY_RESOLUTION, DEFAULT_PAGE_NUMBER, DEFAULT_ZOOM_FACTOR, EXPORT_DIALOG_NAME, FIT_ACTUAL_SIZE, FIT_HEIGHT, FIT_IN_WINDOW, FIT_NONE, FIT_WIDTH, FULL_PAGE_SCROLL_INCREMENT, LAYOUT_SINGLE, LAYOUT_SPLIT_HORIZONTAL, LAYOUT_SPLIT_VERTICAL, LAYOUT_TABBED, LAYOUT_THUMBNAILS_ONLY, MIMETYPE_DOC, MIMETYPE_DOCX, MIMETYPE_HTML, MIMETYPE_ODP, MIMETYPE_ODS, MIMETYPE_ODT, MIMETYPE_PDF, MIMETYPE_PNG, MIMETYPE_PPT, MIMETYPE_PPTX, MIMETYPE_TXT, MIMETYPE_XLS, MIMETYPE_XLSX, NEW_DOC_DEFAULT_PAGE_NUMBER, OCR_CONFIDENCE_HIGH, OCR_CONFIDENCE_LOW, OCR_CONFIDENCE_UNDETERMINED, OCRSTATUSTYPE_CANCEL, OCRSTATUSTYPE_DOC, OCRSTATUSTYPE_PAGE, PREFERENCES_DIALOG_NAME, PRINT_DOCUMENT_DIALOG_NAME, PRINT_DOCUMENTS_DIALOG_NAME, PRINTSTATUSTYPE_ADD, PRINTSTATUSTYPE_PAGE, PRINTSTATUSTYPE_REMOVE, PRINTSTATUSTYPE_REQUEST, PRINTSTATUSTYPE_UNKNOWN, PRIVILEGE_ADD_PAGES, PRIVILEGE_CREATE_DOCUMENT, PRIVILEGE_DELETE_PAGES, PRIVILEGE_EXPORT, PRIVILEGE_MODIFY_BOOKMARKS, PRIVILEGE_MOVE_PAGES, PRIVILEGE_PRINT, PRIVILEGE_REDACT_PAGE, PRIVILEGE_ROTATE_PAGE, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90, SELECT_AREA_MODE, SELECT_TEXT_MODE, SIZE_LARGE, SIZE_MEDIUM, SIZE_SMALL, STYLE_BOLD, STYLE_BOLD_ITALIC, STYLE_ITALIC, STYLE_PLAIN
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
  1. void
addActionComponent(javax.swing.Action action)
Add action component.
  1. void
addActionComponent(javax.swing.Action action,javax.swing.JComponent component)
Add a tool to the toolbar.
  1. javax.swing.Action
getAction(java.lang.String name)
Gets the action object.
  1. javax.swing.Action[]
getActions()
Gets all the action objects associated with this toolbar.
  1. java.awt.Component
getComponent(java.lang.String name)
Gets the action component for the specified
  1. java.awt.Component[]
getComponents()
Gets all the child components of this toolbar.
  1. void
propertyChange(java.beans.PropertyChangeEvent event)
This method is called when actions on the toolbar change state.
  1. void
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

  1. public CMBViewerToolbar(CMBGenericDocViewer viewer)
Constructor
Parameters:
viewer - The Generic Doc Viewer instance.

Method Detail

addActionComponent

  1. public void addActionComponent( javax.swing.Action action)
Add action component. This method creates a button on the toolbar for the action.

addActionComponent

  1. public void addActionComponent( javax.swing.Action action,
  2. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. public javax.swing.Action[] getActions( )
Gets all the action objects associated with this toolbar.
Returns:
Action[] An array of the action objects.

propertyChange

  1. 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