Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

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.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static String DEFAULT_MENU_SPECIFIER
           
 
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 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
 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, 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, getComponents, 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, setLayout, transferFocusBackward, 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, 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, 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
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MENU_SPECIFIER

public static final String DEFAULT_MENU_SPECIFIER
See Also:
Constant Field Values
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


www.cytoscape.org