Cytoscape 2.8.0 API

cytoscape.util
Class CytoscapeMenuBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JMenuBar
                  extended by cytoscape.util.CytoscapeMenuBar
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement

public class CytoscapeMenuBar
extends JMenuBar

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JMenuBar
JMenuBar.AccessibleJMenuBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  Set actionMembersSet
           
protected  Map actionMenuItemMap
           
static String DEFAULT_MENU_SPECIFIER
           
protected  String defaultMenuSpecifier
           
protected  Map menuEffectiveLastIndexMap
          The Menu->Integer "effective last index" Map for Menus with menu items that want to be at the end.
protected  Map menuMap
           
protected static int NO_INDEX
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CytoscapeMenuBar()
          Default constructor.
 
Method Summary
 boolean addAction(Action action)
          If the given Action has a present and false inMenuBar property, return; otherwise delegate to addAction( String, Action ) with the value of its preferredMenu property, or null if it does not have that property.
 boolean addAction(Action action, int index)
          DOCUMENT ME!
 boolean addAction(String menu_name, Action action)
          DOCUMENT ME!
 JMenu createJMenu(String title)
          Factory method for instantiating objects of type JMenu
protected  JMenuItem createJMenuItem(Action action)
          Factory method for instantiating the menuItems in the menu.
 boolean equals(Object other_object)
          CytoscapeMenuBars are unique -- this equals() method returns true iff the other object == this.
 String getDefaultMenuSpecifier()
          DOCUMENT ME!
 String getIdentifier()
          implements CommunityMember
 JMenu getMenu(String menu_string)
          DOCUMENT ME!
 JMenu getMenu(String menu_string, int parentPosition)
           
 boolean isReidentificationEnabled()
          imlements Reidentifiable
 boolean removeAction(Action action)
          If the given Action has a present and false inMenuBar property, return; otherwise if there's a menu item for the action, remove it.
 void setDefaultMenuSpecifier(String menu_name)
          DOCUMENT ME!
 void setIdentifier(String new_identifier)
          imlements Reidentifiable
 String toString()
          Delegates to getIdentifier().
 
Methods inherited from class javax.swing.JMenuBar
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, update
 
Methods inherited from class java.awt.Container
add, 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, 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, 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, hide, 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, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MENU_SPECIFIER

public static final String DEFAULT_MENU_SPECIFIER
See Also:
Constant Field Values

NO_INDEX

protected static final int NO_INDEX
See Also:
Constant Field Values

defaultMenuSpecifier

protected String defaultMenuSpecifier

actionMembersSet

protected Set actionMembersSet

actionMenuItemMap

protected Map actionMenuItemMap

menuMap

protected Map menuMap

menuEffectiveLastIndexMap

protected Map menuEffectiveLastIndexMap
The Menu->Integer "effective last index" Map for Menus with menu items that want to be at the end.

Constructor Detail

CytoscapeMenuBar

public CytoscapeMenuBar()
Default constructor.

Method Detail

setDefaultMenuSpecifier

public void setDefaultMenuSpecifier(String menu_name)
DOCUMENT ME!

Parameters:
menu_name - DOCUMENT ME!

getDefaultMenuSpecifier

public String getDefaultMenuSpecifier()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addAction

public boolean addAction(Action action)
If the given Action has a present and false inMenuBar property, return; otherwise delegate to addAction( String, Action ) with the value of its preferredMenu property, or null if it does not have that property.


addAction

public boolean addAction(Action action,
                         int index)
DOCUMENT ME!

Parameters:
action - DOCUMENT ME!
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

addAction

public boolean addAction(String menu_name,
                         Action action)
DOCUMENT ME!

Parameters:
menu_name - DOCUMENT ME!
action - DOCUMENT ME!
Returns:
DOCUMENT ME!

removeAction

public boolean removeAction(Action action)
If the given Action has a present and false inMenuBar property, return; otherwise if there's a menu item for the action, remove it. Its menu is determined my its preferredMenu property if it is present; otherwise by defaultMenuSpecifier.


getMenu

public JMenu getMenu(String menu_string)
DOCUMENT ME!

Parameters:
menu_string - DOCUMENT ME!
Returns:
DOCUMENT ME!

getMenu

public JMenu getMenu(String menu_string,
                     int parentPosition)
Returns:
the menu named in the given String. The String may contain multiple menu names, separated by dots ('.'). If any contained menu name does not correspond to an existing menu, then that menu will be created as a child of the menu preceeding the most recent dot or, if there is none, then as a child of this MenuBar.

equals

public boolean equals(Object other_object)
CytoscapeMenuBars are unique -- this equals() method returns true iff the other object == this.

Overrides:
equals in class Object

getIdentifier

public String getIdentifier()
implements CommunityMember

Returns:
identifier

setIdentifier

public void setIdentifier(String new_identifier)
imlements Reidentifiable


isReidentificationEnabled

public boolean isReidentificationEnabled()
imlements Reidentifiable

Returns:
true (always)

toString

public String toString()
Delegates to getIdentifier().

Overrides:
toString in class Component

createJMenu

public JMenu createJMenu(String title)
Factory method for instantiating objects of type JMenu


createJMenuItem

protected JMenuItem createJMenuItem(Action action)
Factory method for instantiating the menuItems in the menu.


Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.