|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| 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 Interactorpublic MouseFilter getMouseFilter()
getMouseFilter in interface Interactorpublic boolean isConsuming()
isConsuming in interface Interactorpublic boolean isEnabled()
isEnabled in interface Interactorpublic boolean isMotionEnabled()
isMotionEnabled in interface Interactorpublic void mouseDragged(LayerEvent layerEvent)
mouseDragged in interface LayerListenerpublic void mouseEntered(LayerEvent layerEvent)
mouseEntered in interface LayerMotionListenerpublic void mouseExited(LayerEvent layerEvent)
mouseExited in interface LayerMotionListenerpublic void mouseMoved(LayerEvent layerEvent)
mouseMoved in interface LayerMotionListenerpublic void mousePressed(LayerEvent layerEvent)
mousePressed in interface LayerListenerpublic void mouseReleased(LayerEvent layerEvent)
mouseReleased in interface LayerListenerpublic void mouseClicked(LayerEvent layerEvent)
mouseClicked in interface LayerListenerpublic void setConsuming(boolean flag)
public void setEnabled(boolean flag)
setEnabled in interface Interactorprotected void setMotionEnabled(boolean flag)
public void setMouseFilter(MouseFilter filter)
setMouseFilter in interface Interactor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||