|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.AbstractInteractor
public abstract class AbstractInteractor
An abstract class that implements Interactor. This class provides simple implementations of most of the required methods of interactors. The listener methods are all implemented, to make it easier to implement interactor subclasses.
Field Summary | |
---|---|
private boolean |
_consuming
The consuming flag. |
private boolean |
_enabled
The flag that says that layer events are enabled |
private boolean |
_motionEnabled
The flag that says that layer motion events are enabled |
private MouseFilter |
_mouseFilter
The mouse filter |
Constructor Summary | |
---|---|
AbstractInteractor()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean _consuming
private boolean _enabled
private boolean _motionEnabled
private MouseFilter _mouseFilter
Constructor Detail |
---|
public AbstractInteractor()
Method Detail |
---|
public boolean accept(LayerEvent event)
accept
in interface Interactor
public 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
public void mouseEntered(LayerEvent layerEvent)
mouseEntered
in interface LayerMotionListener
public void mouseExited(LayerEvent layerEvent)
mouseExited
in interface LayerMotionListener
public void mouseMoved(LayerEvent layerEvent)
mouseMoved
in interface LayerMotionListener
public void mousePressed(LayerEvent layerEvent)
mousePressed
in interface LayerListener
public void mouseReleased(LayerEvent layerEvent)
mouseReleased
in interface LayerListener
public void mouseClicked(LayerEvent layerEvent)
mouseClicked
in interface LayerListener
public void setConsuming(boolean flag)
public void setEnabled(boolean flag)
setEnabled
in interface Interactor
protected void setMotionEnabled(boolean flag)
public void setMouseFilter(MouseFilter filter)
setMouseFilter
in interface Interactor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |