public class MenuCreator extends AbstractInteractor
Modifier and Type | Field and Description |
---|---|
(package private) MenuFactory |
_factory
The menu factory.
|
Constructor and Description |
---|
MenuCreator(MenuFactory factory)
Construct a new interactor with a right button mouse filter.
|
Modifier and Type | Method and Description |
---|---|
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.
|
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter
MenuFactory _factory
public MenuCreator(MenuFactory factory)
public MenuFactory getMenuFactory()
public void mousePressed(LayerEvent e)
mousePressed
in interface LayerListener
mousePressed
in class AbstractInteractor
public void mouseReleased(LayerEvent e)
mouseReleased
in interface LayerListener
mouseReleased
in class AbstractInteractor
public void setMenuFactory(MenuFactory factory)