|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.input.Input
com.jme.input.MouseInput
com.jmex.awt.input.AWTMouseInput
public class AWTMouseInput
AWTMouseInput
| Field Summary | |
|---|---|
static int |
WHEEL_AMP
|
| Fields inherited from class com.jme.input.MouseInput |
|---|
INPUT_AWT, INPUT_LWJGL, listeners |
| Constructor Summary | |
|---|---|
protected |
AWTMouseInput()
|
| Method Summary | |
|---|---|
void |
clear()
|
void |
clearButton(int buttonCode)
|
protected void |
destroy()
destroy cleans up the native mouse interface. |
int |
getButtonCount()
|
int |
getButtonIndex(java.lang.String buttonName)
getButtonIndex gets the button code for a given button
name. |
java.lang.String |
getButtonName(int buttonIndex)
getButtonName gets the button name for a given button
code. |
int |
getWheelDelta()
getWheelDelta gets the change in the mouse wheel. |
int |
getWheelRotation()
|
int |
getXAbsolute()
getXAbsolute gets the absolute x axis value. |
int |
getXDelta()
getXDelta gets the change along the x axis. |
int |
getYAbsolute()
getYAbsolute gets the absolute y axis value. |
int |
getYDelta()
getYDelta gets the change along the y axis. |
boolean |
isButtonDown(int buttonCode)
isButtonDown returns true if a given button is pressed,
false if it is not pressed. |
boolean |
isCursorVisible()
isCursorVisible |
boolean |
isDragOnly()
|
boolean |
isEnabled()
|
void |
mouseClicked(java.awt.event.MouseEvent arg0)
|
void |
mouseDragged(java.awt.event.MouseEvent arg0)
|
void |
mouseEntered(java.awt.event.MouseEvent arg0)
|
void |
mouseExited(java.awt.event.MouseEvent arg0)
|
void |
mouseMoved(java.awt.event.MouseEvent arg0)
|
void |
mousePressed(java.awt.event.MouseEvent arg0)
|
void |
mouseReleased(java.awt.event.MouseEvent arg0)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent arg0)
|
void |
setCursorPosition(int x,
int y)
|
void |
setCursorVisible(boolean v)
setCursorVisible sets the visibility of the hardware cursor. |
void |
setDragOnly(boolean dragOnly)
|
void |
setEnabled(boolean enabled)
|
void |
setHardwareCursor(java.awt.Cursor cursor)
|
void |
setHardwareCursor(java.net.URL file)
setHardwareCursor sets the image to use for the hardware cursor. |
void |
setHardwareCursor(java.net.URL file,
Image[] images,
int[] delays,
int xHotspot,
int yHotspot)
This method will set an animated hardware cursor. |
void |
setHardwareCursor(java.net.URL file,
int xHotspot,
int yHotspot)
setHardwareCursor sets the image and hotspot position to use for the hardware cursor. |
void |
setRelativeDelta(java.awt.Component c)
|
static void |
setup(java.awt.Canvas glCanvas,
boolean dragOnly)
Set up a canvas to fire mouse events via the input system. |
void |
update()
Updates the state of the mouse (position and button states). |
| Methods inherited from class com.jme.input.MouseInput |
|---|
addListener, containsListener, destroyIfInitalized, get, getListeners, getProvider, isInited, removeListener, removeListeners, setProvider, setProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int WHEEL_AMP
| Constructor Detail |
|---|
protected AWTMouseInput()
| Method Detail |
|---|
protected void destroy()
MouseInputdestroy cleans up the native mouse interface.
Destroy is protected now - please is MouseInput.destroyIfInitalized().
destroy in class MouseInputpublic int getButtonIndex(java.lang.String buttonName)
MouseInputgetButtonIndex gets the button code for a given button
name.
getButtonIndex in class MouseInputbuttonName - the name to get the code for.
public boolean isButtonDown(int buttonCode)
MouseInputisButtonDown returns true if a given button is pressed,
false if it is not pressed.
isButtonDown in class MouseInputbuttonCode - the button code to check.
public java.lang.String getButtonName(int buttonIndex)
MouseInputgetButtonName gets the button name for a given button
code.
getButtonName in class MouseInputbuttonIndex - the code to get the name for.
public int getWheelDelta()
MouseInputgetWheelDelta gets the change in the mouse wheel.
getWheelDelta in class MouseInputpublic int getXDelta()
MouseInputgetXDelta gets the change along the x axis.
getXDelta in class MouseInputpublic int getYDelta()
MouseInputgetYDelta gets the change along the y axis.
getYDelta in class MouseInputpublic int getXAbsolute()
MouseInputgetXAbsolute gets the absolute x axis value.
getXAbsolute in class MouseInputpublic int getYAbsolute()
MouseInputgetYAbsolute gets the absolute y axis value.
getYAbsolute in class MouseInputpublic void update()
MouseInput
update in class MouseInputpublic void setCursorVisible(boolean v)
MouseInputsetCursorVisible sets the visibility of the hardware cursor.
setCursorVisible in class MouseInputv - true turns the cursor on false turns it offpublic boolean isCursorVisible()
MouseInputisCursorVisible
isCursorVisible in class MouseInputpublic void setHardwareCursor(java.net.URL file)
MouseInputsetHardwareCursor sets the image to use for the hardware cursor.
setHardwareCursor in class MouseInputfile - URL to cursor imagepublic void setHardwareCursor(java.awt.Cursor cursor)
public void setHardwareCursor(java.net.URL file,
int xHotspot,
int yHotspot)
MouseInputsetHardwareCursor sets the image and hotspot position to use for the hardware cursor.
setHardwareCursor in class MouseInputfile - URL to cursor imagexHotspot - Cursor X hotspot positionyHotspot - Cursor Y hotspot position
public void setHardwareCursor(java.net.URL file,
Image[] images,
int[] delays,
int xHotspot,
int yHotspot)
MouseInput
setHardwareCursor in class MouseInputfile - in this method file is only used as a key for cursor cashingimages - the animation framesdelays - delays between changing each framexHotspot - from image leftyHotspot - from image bottom
public void setCursorPosition(int x,
int y)
setCursorPosition in class MouseInputpublic int getWheelRotation()
getWheelRotation in class MouseInputpublic int getButtonCount()
getButtonCount in class MouseInputpublic void setRelativeDelta(java.awt.Component c)
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - The enabled to set.public boolean isDragOnly()
public void setDragOnly(boolean dragOnly)
dragOnly - The dragOnly to set.public void mouseClicked(java.awt.event.MouseEvent arg0)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent arg0)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerpublic void mouseDragged(java.awt.event.MouseEvent arg0)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent arg0)
mouseMoved in interface java.awt.event.MouseMotionListener
public static void setup(java.awt.Canvas glCanvas,
boolean dragOnly)
glCanvas - canvas that should be listened todragOnly - true to enable mouse input to jME only when the mouse is draggedpublic void clear()
clear in class MouseInputpublic void clearButton(int buttonCode)
clearButton in class MouseInput
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||