|
Cytoscape 3.0.0-beta1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cytoscape.util.swing.MenuGravityTracker
public final class MenuGravityTracker
This class inserts menu items and separators in a menu based on their "gravity". Items with higher gravity appear further down the menu.
| Field Summary |
|---|
| Fields inherited from interface org.cytoscape.util.swing.GravityTracker |
|---|
USE_ALPHABETIC_ORDER |
| Constructor Summary | |
|---|---|
MenuGravityTracker(JMenu menu)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addMenu(JMenu newSubmenu,
double gravity)
Adds a new submenu into a position based on "gravity" of the new item. |
void |
addMenuItem(JMenuItem newMenuItem,
double gravity)
Adds a new menu item into a position based on "gravity" of the new item. |
void |
addMenuSeparator(double gravity)
Adds a separator into a position based on "gravity" of the new item. |
JMenu |
getMenu()
Returns the JPopupMenu or JMenu that this gravity tracker tracks. |
void |
removeComponent(Component component)
Removes an item from this tracker and the corresponding menu. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MenuGravityTracker(JMenu menu)
menu - The JMenu associated with this MenuGravityTracker.| Method Detail |
|---|
public JMenu getMenu()
GravityTracker
getMenu in interface GravityTracker
public void addMenuItem(JMenuItem newMenuItem,
double gravity)
GravityTracker
addMenuItem in interface GravityTrackernewMenuItem - the new item to insert into the menugravity - the weight determining the insert position
(use USE_ALPHABETIC_ORDER if you want alphabetic ordering)
public void addMenu(JMenu newSubmenu,
double gravity)
GravityTracker
addMenu in interface GravityTrackernewSubmenu - the new submenu to insert into the menugravity - the weight determining the insert positionpublic void addMenuSeparator(double gravity)
GravityTracker
addMenuSeparator in interface GravityTrackergravity - the weight determining the insert positionpublic void removeComponent(Component component)
GravityTracker
removeComponent in interface GravityTrackercomponent - the item that is to be removed
|
Cytoscape 3.0.0-beta1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||