public final class JMenuTracker extends Object
Module: swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Constructor and Description |
---|
JMenuTracker(JMenuBar rootMenuBar)
This constructor allows you to specify a root menubar that all parent-less
menus will be added to.
|
JMenuTracker(JPopupMenu rootPopupMenu)
This constructor allows you to specify a root JPopupMenu that all parent-less
menus will be added to.
|
Modifier and Type | Method and Description |
---|---|
GravityTracker |
getGravityTracker(String menuString)
This method will fetch an existing menu or create a new one if a menu
with the specified name does not exist.
|
public JMenuTracker(JPopupMenu rootPopupMenu)
rootPopupMenu
- the popup menu that all parent-less items will be added to based on
their gravitypublic JMenuTracker(JMenuBar rootMenuBar)
rootMenuBar
- the popup menu that all parent-less items will be added to based on
their gravitypublic GravityTracker getGravityTracker(String menuString)
menuString
- A '.' delimited string identifying menu names.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.