|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfi.paatti.research.paattiapplication.views.eventview.tools.Clickable
fi.paatti.research.paattiapplication.views.eventview.tools.ContextMenu
public class ContextMenu
ContextMenu is a simple clickable "container" that holds other clickables knows as MenuItems. ContextMenu acts merely as a larger click detector around the defined sub-clickables, returning the values of the selected menu items (if any).
![]() |
![]() |
| Nested Class Summary | |
|---|---|
class |
ContextMenu.MenuItem
MenuItem is a clickable that contains event tree tool enums used in controlling the tool states and the types of nodes to be added to the tree (if any). |
| Field Summary |
|---|
| Fields inherited from class fi.paatti.research.paattiapplication.views.eventview.tools.Clickable |
|---|
height, width, x, y |
| Constructor Summary | |
|---|---|
ContextMenu()
ContextMenu constructor. |
|
| Method Summary | |
|---|---|
ContextMenu.MenuItem |
getMenu(int x,
int y)
Returns the menu item found at (x,y) and hides the context menu. |
boolean |
isVisible()
Returns the visibilty state of the context menu. |
void |
paint(Graphics g)
Paints the items added to the context menu. |
void |
show(int x,
int y,
NodeFactory.TreeNode node)
Moves the context menu to the given coordinates and sets the menu visible, displaying a list of clickable items based on the type of the node given as a parameter. |
| Methods inherited from class fi.paatti.research.paattiapplication.views.eventview.tools.Clickable |
|---|
contains |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextMenu()
| Method Detail |
|---|
public void show(int x,
int y,
NodeFactory.TreeNode node)
x - the x coordinate.y - the y coordinate.node - the node that was clicked (if any).public boolean isVisible()
public ContextMenu.MenuItem getMenu(int x,
int y)
x - the x coordinate.y - the y coordinate.
public void paint(Graphics g)
paint in class Clickableg - graphics context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||