Cytoscape 3.0.1 API

org.cytoscape.application.swing
Class CyMenuItem

java.lang.Object
  extended by org.cytoscape.application.swing.CyMenuItem

public final class CyMenuItem
extends Object

A simple wrapper class that allows a JMenuItem to be associated with a gravity value which defines where in a menu the item should fall.


Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Constructor Summary
CyMenuItem(JMenuItem menuItem, float gravity)
          Constructor.
 
Method Summary
 float getMenuGravity()
          Returns the gravity used to place the menu item in a menu.
 JMenuItem getMenuItem()
          Returns the menu item to be placed in a menu according to the specified menu gravity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CyMenuItem

public CyMenuItem(JMenuItem menuItem,
                  float gravity)
Constructor.

Parameters:
menuItem - to JMenuItem to be added to the menu.
gravity - the gravity of the menu item to be added.
Method Detail

getMenuItem

public JMenuItem getMenuItem()
Returns the menu item to be placed in a menu according to the specified menu gravity.

Returns:
the menu item to be placed in a menu according to the specified menu gravity.

getMenuGravity

public float getMenuGravity()
Returns the gravity used to place the menu item in a menu. Gravity is a numeric value associated with each menu item. MenuItems in the same menu pull-down are sorted in ascending order based on their gravity values.

Returns:
The gravity used to place the menu item in a menu.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.