|
Cytoscape 3.0.0-beta1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GravityTracker
This interface sepecifies a tracker that will be used to insert items (submenus, menu items and separators) into a menu based on their "gravity" or "weight". Items with higher gravity will appear further down the menu.
| Field Summary | |
|---|---|
static double |
USE_ALPHABETIC_ORDER
|
| 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. |
Component |
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. |
| Field Detail |
|---|
static final double USE_ALPHABETIC_ORDER
| Method Detail |
|---|
Component getMenu()
void addMenuItem(JMenuItem newMenuItem,
double gravity)
newMenuItem - the new item to insert into the menugravity - the weight determining the insert position
(use USE_ALPHABETIC_ORDER if you want alphabetic ordering)
void addMenu(JMenu newSubmenu,
double gravity)
newSubmenu - the new submenu to insert into the menugravity - the weight determining the insert positionvoid addMenuSeparator(double gravity)
gravity - the weight determining the insert positionvoid removeComponent(Component component)
component - 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 | |||||||||