|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.util.InputAdapter
public class InputAdapter
An implement implementation of the InputListener interface
| Constructor Summary | |
|---|---|
InputAdapter()
|
|
| Method Summary | |
|---|---|
void |
controllerButtonPressed(int controller,
int button)
Notification that a button control has been pressed on the controller. |
void |
controllerButtonReleased(int controller,
int button)
Notification that a button control has been released on the controller. |
void |
controllerDownPressed(int controller)
Notification that the down control has been pressed on the controller. |
void |
controllerDownReleased(int controller)
Notification that the down control has been released on the controller. |
void |
controllerLeftPressed(int controller)
Notification that the left control has been pressed on the controller. |
void |
controllerLeftReleased(int controller)
Notification that the left control has been released on the controller. |
void |
controllerRightPressed(int controller)
Notification that the right control has been pressed on the controller. |
void |
controllerRightReleased(int controller)
Notification that the right control has been released on the controller. |
void |
controllerUpPressed(int controller)
Notification that the up control has been pressed on the controller. |
void |
controllerUpReleased(int controller)
Notification that the up control has been released on the controller. |
void |
inputEnded()
Notification that all input events have been sent for this frame |
void |
inputStarted()
Notification that input is about to be processed |
boolean |
isAcceptingInput()
Check if this input listener is accepting input |
void |
keyPressed(int key,
char c)
Notification that a key was pressed |
void |
keyReleased(int key,
char c)
Notification that a key was released |
void |
mouseClicked(int button,
int x,
int y,
int clickCount)
Notification that a mouse button was clicked. |
void |
mouseDragged(int oldx,
int oldy,
int newx,
int newy)
Notification that mouse cursor was dragged |
void |
mouseMoved(int oldx,
int oldy,
int newx,
int newy)
Notification that mouse cursor was moved |
void |
mousePressed(int button,
int x,
int y)
Notification that a mouse button was pressed |
void |
mouseReleased(int button,
int x,
int y)
Notification that a mouse button was released |
void |
mouseWheelMoved(int change)
Notification that the mouse wheel position was updated |
void |
setAcceptingInput(boolean acceptingInput)
Indicate if we should be accepting input of any sort |
void |
setInput(Input input)
Set the input that events are being sent from |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputAdapter()
| Method Detail |
|---|
public void controllerButtonPressed(int controller,
int button)
ControllerListener
controllerButtonPressed in interface ControllerListenercontroller - The index of the controller on which the control
was pressed.button - The index of the button pressed (starting at 1)ControllerListener.controllerButtonPressed(int, int)
public void controllerButtonReleased(int controller,
int button)
ControllerListener
controllerButtonReleased in interface ControllerListenercontroller - The index of the controller on which the control
was released.button - The index of the button released (starting at 1)ControllerListener.controllerButtonReleased(int, int)public void controllerDownPressed(int controller)
ControllerListener
controllerDownPressed in interface ControllerListenercontroller - The index of the controller on which the control
was pressed.ControllerListener.controllerDownPressed(int)public void controllerDownReleased(int controller)
ControllerListener
controllerDownReleased in interface ControllerListenercontroller - The index of the controller on which the control
was released.ControllerListener.controllerDownReleased(int)public void controllerLeftPressed(int controller)
ControllerListener
controllerLeftPressed in interface ControllerListenercontroller - The index of the controller on which the control
was pressed.ControllerListener.controllerLeftPressed(int)public void controllerLeftReleased(int controller)
ControllerListener
controllerLeftReleased in interface ControllerListenercontroller - The index of the controller on which the control
was released.ControllerListener.controllerLeftReleased(int)public void controllerRightPressed(int controller)
ControllerListener
controllerRightPressed in interface ControllerListenercontroller - The index of the controller on which the control
was pressed.ControllerListener.controllerRightPressed(int)public void controllerRightReleased(int controller)
ControllerListener
controllerRightReleased in interface ControllerListenercontroller - The index of the controller on which the control
was released.ControllerListener.controllerRightReleased(int)public void controllerUpPressed(int controller)
ControllerListener
controllerUpPressed in interface ControllerListenercontroller - The index of the controller on which the control
was pressed.ControllerListener.controllerUpPressed(int)public void controllerUpReleased(int controller)
ControllerListener
controllerUpReleased in interface ControllerListenercontroller - The index of the controller on which the control
was released.ControllerListener.controllerUpReleased(int)public void inputEnded()
ControlledInputReciever
inputEnded in interface ControlledInputRecieverControlledInputReciever.inputEnded()public boolean isAcceptingInput()
ControlledInputReciever
isAcceptingInput in interface ControlledInputRecieverControlledInputReciever.isAcceptingInput()public void setAcceptingInput(boolean acceptingInput)
acceptingInput - True if we should accept input
public void keyPressed(int key,
char c)
KeyListener
keyPressed in interface KeyListenerkey - The key code that was pressed (@see org.newdawn.slick.Input)c - The character of the key that was pressedKeyListener.keyPressed(int, char)
public void keyReleased(int key,
char c)
KeyListener
keyReleased in interface KeyListenerkey - The key code that was released (@see org.newdawn.slick.Input)c - The character of the key that was releasedKeyListener.keyReleased(int, char)
public void mouseMoved(int oldx,
int oldy,
int newx,
int newy)
MouseListener
mouseMoved in interface MouseListeneroldx - The old x position of the mouseoldy - The old y position of the mousenewx - The new x position of the mousenewy - The new y position of the mouseMouseListener.mouseMoved(int, int, int, int)
public void mousePressed(int button,
int x,
int y)
MouseListener
mousePressed in interface MouseListenerbutton - The index of the button (starting at 0)x - The x position of the mouse when the button was pressedy - The y position of the mouse when the button was pressedMouseListener.mousePressed(int, int, int)
public void mouseReleased(int button,
int x,
int y)
MouseListener
mouseReleased in interface MouseListenerbutton - The index of the button (starting at 0)x - The x position of the mouse when the button was releasedy - The y position of the mouse when the button was releasedMouseListener.mouseReleased(int, int, int)public void mouseWheelMoved(int change)
MouseListener
mouseWheelMoved in interface MouseListenerchange - The amount of the wheel has movedMouseListener.mouseWheelMoved(int)public void setInput(Input input)
ControlledInputReciever
setInput in interface ControlledInputRecieverinput - The input instance sending eventsControlledInputReciever.setInput(org.newdawn.slick.Input)
public void mouseClicked(int button,
int x,
int y,
int clickCount)
MouseListener
mouseClicked in interface MouseListenerbutton - The index of the button (starting at 0)x - The x position of the mouse when the button was pressedy - The y position of the mouse when the button was pressedclickCount - The number of times the button was clickedMouseListener.mouseClicked(int, int, int, int)
public void mouseDragged(int oldx,
int oldy,
int newx,
int newy)
MouseListener
mouseDragged in interface MouseListeneroldx - The old x position of the mouseoldy - The old y position of the mousenewx - The new x position of the mousenewy - The new y position of the mousepublic void inputStarted()
ControlledInputReciever
inputStarted in interface ControlledInputRecieverControlledInputReciever.inputStarted()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||