public class MainKFPerspectiveToolBar
extends javax.swing.JPanel
| Modifier and Type | Class and Description |
|---|---|
static class |
MainKFPerspectiveToolBar.Widgets
Enum containing all the widgets provided by the toolbar.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ICON_PATH
Path to the icons for the toolbar
|
protected MainKFPerspective |
m_mainPerspective
Reference to the main knowledge flow perspective
|
protected java.util.Map<java.lang.String,javax.swing.JMenuItem> |
m_menuItemMap
holds a map of menu items (for widgets that have corresponding menu items)
|
protected java.util.Map<java.lang.String,javax.swing.JMenu> |
m_menuMap
Holds a map of top level menus
|
protected boolean |
m_showMenus
True if menu items corresponding to the toolbar widgets should be shown
|
protected java.util.Map<java.lang.String,javax.swing.JComponent> |
m_widgetMap
holds a map of widgets, keyed by widget name
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
MainKFPerspectiveToolBar(MainKFPerspective mainKFPerspective)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMenuItemToMenu(java.lang.String topMenu,
java.lang.String menuItem,
javax.swing.Action action,
javax.swing.KeyStroke accelerator)
Add a menu item to a named menu
|
protected void |
addWidgetToToolBar(javax.swing.JToolBar toolBar,
java.lang.String widgetName,
javax.swing.JComponent widget)
Add a widget to a toolbar
|
void |
disableWidgets(java.lang.String... widgetNames) |
void |
enableWidget(java.lang.String widgetName,
boolean enable)
Enable/disable a named widget
|
void |
enableWidgets(java.lang.String... widgetNames) |
javax.swing.JMenuItem |
getMenuItem(java.lang.String menuItemName) |
java.util.List<javax.swing.JMenu> |
getMenus()
Get the list of menus
|
javax.swing.JComponent |
getWidget(java.lang.String widgetName) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, 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, transferFocusBackward, transferFocusUpCyclepublic static java.lang.String ICON_PATH
protected MainKFPerspective m_mainPerspective
protected java.util.Map<java.lang.String,javax.swing.JComponent> m_widgetMap
protected java.util.Map<java.lang.String,javax.swing.JMenu> m_menuMap
protected java.util.Map<java.lang.String,javax.swing.JMenuItem> m_menuItemMap
protected boolean m_showMenus
public MainKFPerspectiveToolBar(MainKFPerspective mainKFPerspective)
mainKFPerspective - the main knowledge flow perspectiveprotected void addWidgetToToolBar(javax.swing.JToolBar toolBar,
java.lang.String widgetName,
javax.swing.JComponent widget)
toolBar - the toolbar to add towidgetName - the name of the widgetwidget - the widget component itselfprotected void addMenuItemToMenu(java.lang.String topMenu,
java.lang.String menuItem,
javax.swing.Action action,
javax.swing.KeyStroke accelerator)
topMenu - the name of the menu to add tomenuItem - the entry text for the item itselfaction - the action associated with the menu itemaccelerator - the keystroke accelerator to associate with the itempublic void enableWidget(java.lang.String widgetName,
boolean enable)
widgetName - the name of the widget to enable/disableenable - true if the widget should be enabled; false otherwiseWidget} enumpublic void enableWidgets(java.lang.String... widgetNames)
public void disableWidgets(java.lang.String... widgetNames)
public javax.swing.JComponent getWidget(java.lang.String widgetName)
public javax.swing.JMenuItem getMenuItem(java.lang.String menuItemName)
public java.util.List<javax.swing.JMenu> getMenus()
JMenus