public abstract class AbstractInteractor extends java.lang.Object implements Interactor
Constructor and Description |
---|
AbstractInteractor() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(LayerEvent event)
Test if the interactor accepts the given event.
|
MouseFilter |
getMouseFilter()
Get the mouse filter used by this interactor to
decide whether to accept an event.
|
boolean |
isConsuming()
Test the consuming flag of this interactor.
|
boolean |
isEnabled()
Test the enabled flag of this interactor.
|
boolean |
isMotionEnabled()
Test the motion enabled flag of this interactor.
|
void |
mouseClicked(LayerEvent layerEvent)
Do nothing.
|
void |
mouseDragged(LayerEvent layerEvent)
Do nothing.
|
void |
mouseEntered(LayerEvent layerEvent)
Do nothing.
|
void |
mouseExited(LayerEvent layerEvent)
Do nothing.
|
void |
mouseMoved(LayerEvent layerEvent)
Do nothing.
|
void |
mousePressed(LayerEvent layerEvent)
Do nothing.
|
void |
mouseReleased(LayerEvent layerEvent)
Do nothing.
|
void |
setConsuming(boolean flag)
Set the consuming flag of this layer.
|
void |
setEnabled(boolean flag)
Set the enabled flag of this interactor.
|
protected void |
setMotionEnabled(boolean flag)
Set the motion enabled flag of this interactor.
|
void |
setMouseFilter(MouseFilter filter)
Set the mouse filter of this interactor.
|
public boolean accept(LayerEvent event)
accept
in interface Interactor
event
- The eventpublic MouseFilter getMouseFilter()
getMouseFilter
in interface Interactor
public boolean isConsuming()
isConsuming
in interface Interactor
public boolean isEnabled()
isEnabled
in interface Interactor
public boolean isMotionEnabled()
isMotionEnabled
in interface Interactor
public void mouseDragged(LayerEvent layerEvent)
mouseDragged
in interface LayerListener
layerEvent
- The eventpublic void mouseEntered(LayerEvent layerEvent)
mouseEntered
in interface LayerMotionListener
layerEvent
- The eventpublic void mouseExited(LayerEvent layerEvent)
mouseExited
in interface LayerMotionListener
layerEvent
- The eventpublic void mouseMoved(LayerEvent layerEvent)
mouseMoved
in interface LayerMotionListener
layerEvent
- The eventpublic void mousePressed(LayerEvent layerEvent)
mousePressed
in interface LayerListener
layerEvent
- The eventpublic void mouseReleased(LayerEvent layerEvent)
mouseReleased
in interface LayerListener
layerEvent
- The eventpublic void mouseClicked(LayerEvent layerEvent)
mouseClicked
in interface LayerListener
layerEvent
- The eventpublic void setConsuming(boolean flag)
flag
- The consuming flagpublic void setEnabled(boolean flag)
setEnabled
in interface Interactor
flag
- the enabled flagprotected void setMotionEnabled(boolean flag)
flag
- the motion flagpublic void setMouseFilter(MouseFilter filter)
setMouseFilter
in interface Interactor
filter
- The filter