|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdiva.canvas.interactor.AbstractInteractor
diva.gui.toolbox.MenuCreator
public class MenuCreator
This interactor creates a menu when it is activated. By default, this interactor is associated with the right mouse button. This class is commonly used to create context sensitive menus for figures in a canvas.
| Field Summary | |
|---|---|
(package private) MenuFactory |
_factory
The menu factory. |
| Constructor Summary | |
|---|---|
MenuCreator(MenuFactory factory)
Construct a new interactor with a right button mouse filter. |
|
| Method Summary | |
|---|---|
private void |
_doEvent(LayerEvent e)
Process a mousePressed or mouseReleased event. |
MenuFactory |
getMenuFactory()
Return the menu factory. |
void |
mousePressed(LayerEvent e)
When a mouse press happens, ask the factory to create a menu and show it on the screen. |
void |
mouseReleased(LayerEvent e)
When a mouse press happens, ask the factory to create a menu and show it on the screen. |
void |
setMenuFactory(MenuFactory factory)
Set the menu factory. |
| Methods inherited from class diva.canvas.interactor.AbstractInteractor |
|---|
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
MenuFactory _factory
| Constructor Detail |
|---|
public MenuCreator(MenuFactory factory)
| Method Detail |
|---|
public MenuFactory getMenuFactory()
public void mousePressed(LayerEvent e)
mousePressed in interface LayerListenermousePressed in class AbstractInteractorpublic void mouseReleased(LayerEvent e)
mouseReleased in interface LayerListenermouseReleased in class AbstractInteractorpublic void setMenuFactory(MenuFactory factory)
private void _doEvent(LayerEvent e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||