|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.input.Action
org.deken.game.input.InputMouseAction
public class InputMouseAction
Title: InputMouseAction
Description: InputAction stores the value of an input from the mouse and the list of InputListeners that want to be notified when the input action occurs. Actions are identified by the InputMonitor.Mouse enum.
Copyright: Copyright (c) 2006
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deken.game.input.Action |
---|
Action.Behavior, Action.State |
Field Summary |
---|
Fields inherited from class org.deken.game.input.Action |
---|
amount, behavior, consumed, id, state |
Constructor Summary | |
---|---|
InputMouseAction(InputMonitor.Mouse mouseID,
Action.Behavior behavior)
|
Method Summary | |
---|---|
void |
activate()
This signals that the key was pressed, or that the mouse event occurred. |
void |
activate(int amount)
This is not used for InputMouseAction. |
boolean |
add(InputMouseListener listener)
Over-rides the add() in InputAction, to take an InputMouseListener. |
boolean |
contains(InputMouseListener listener)
|
void |
deactivate()
This signals that the input has ceased to be pressed or mouse stopped moving. |
int |
getAmountX()
Returns the amount changed, since last update. |
int |
getAmountY()
Returns the amount changed, since last update. |
InputMonitor.Mouse |
getMouseID()
|
java.lang.String |
getName()
Returns the name of the InputMouseAction based on the InputMonitor.Mouse name. |
int |
getXPosition()
|
int |
getYPosition()
|
boolean |
isEqual(InputMonitor.Mouse mouse)
|
boolean |
isMovement()
Returns if this InputMouseAction is for any type of movement of the Mouse, excluding wheel movement and button clicks. |
protected void |
notifyListeners()
Over-ride the notifyListeners from InputAction. |
boolean |
remove(InputMouseListener listener)
Removes the InputListener passed in from this InputAction. |
void |
reset()
Resets this InputAction to an un-active state. |
void |
setXPosition(int xPosition)
|
void |
setYPosition(int yPosition)
|
Methods inherited from class org.deken.game.input.Action |
---|
consumed, getId, isActive, isConsumed, setId, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InputMouseAction(InputMonitor.Mouse mouseID, Action.Behavior behavior)
mouseID
- InputMonitor.Mousebehavior
- intMethod Detail |
---|
public void activate(int amount)
amount
- intpublic void activate()
activate
in class Action
public boolean add(InputMouseListener listener)
listener
- InputMouseListener
public boolean contains(InputMouseListener listener)
public void deactivate()
deactivate
in class Action
public int getAmountX()
public int getAmountY()
public java.lang.String getName()
public InputMonitor.Mouse getMouseID()
public int getXPosition()
public int getYPosition()
public boolean isEqual(InputMonitor.Mouse mouse)
public boolean isMovement()
public boolean remove(InputMouseListener listener)
listener
- InputMouseListener
public void reset()
public void setXPosition(int xPosition)
xPosition
- intpublic void setYPosition(int yPosition)
yPosition
- intprotected void notifyListeners()
notifyListeners
in class Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |