|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgestalt.input.EventHandler
public class EventHandler
| Field Summary | |
|---|---|
static boolean |
EVENT_CENTER_MOUSE
|
static boolean |
EVENT_FLIP_MOUSE_Y
|
char |
key
|
int |
keyCode
|
boolean |
keyDown
|
boolean |
keyPressed
|
boolean |
keyReleased
|
int |
mouseButton
|
boolean |
mouseClicked
|
boolean |
mouseDown
|
boolean |
mouseReleased
|
int |
mousewheel
|
int |
mouseX
|
int |
mouseY
|
float |
normalized_mouseX
|
float |
normalized_mouseY
|
int |
pmouseX
|
int |
pmouseY
|
boolean |
shift
|
| Constructor Summary | |
|---|---|
EventHandler()
|
|
| Method Summary | |
|---|---|
void |
add(Drawable theDrawable)
this method is commonly used to store children of a drawable. |
void |
addKeyListener(GestaltKeyListener theKeyListener)
|
void |
addMouseListener(GestaltMouseListener theMouseListener)
|
void |
draw(GLContext theContext)
this method is used to draw the drawable, when the context is ready. |
float[] |
getSortData()
returns the data upon which a sort value is calculated. |
float |
getSortValue()
returns the last sort value. |
boolean |
isActive()
returns whether the drawable is active. |
boolean |
isSortable()
returns true if the 'drawable' should be sorted before drawing. |
boolean |
keyPressed(char theChar)
|
void |
removeKeyListner(GestaltKeyListener theKeyListener)
|
void |
removeMouseListener(GestaltMouseListener theMouseListener)
|
void |
setSortValue(float theSortValue)
caches the current sort value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean EVENT_FLIP_MOUSE_Y
public static boolean EVENT_CENTER_MOUSE
public int mouseButton
public boolean mouseDown
public boolean mouseClicked
public boolean mouseReleased
public int mouseX
public int mouseY
public float normalized_mouseX
public float normalized_mouseY
public int pmouseX
public int pmouseY
public int mousewheel
public boolean keyPressed
public char key
public int keyCode
public boolean keyDown
public boolean keyReleased
public boolean shift
| Constructor Detail |
|---|
public EventHandler()
| Method Detail |
|---|
public void draw(GLContext theContext)
Drawable
draw in interface DrawabletheContext - GLContextpublic boolean keyPressed(char theChar)
public void addMouseListener(GestaltMouseListener theMouseListener)
public void removeMouseListener(GestaltMouseListener theMouseListener)
public void addKeyListener(GestaltKeyListener theKeyListener)
public void removeKeyListner(GestaltKeyListener theKeyListener)
public boolean isActive()
Drawable
isActive in interface Drawablepublic void add(Drawable theDrawable)
Drawable
add in interface DrawabletheDrawable - Drawablepublic float getSortValue()
Drawable
getSortValue in interface Drawablepublic void setSortValue(float theSortValue)
Drawable
setSortValue in interface DrawabletheSortValue - floatpublic float[] getSortData()
Drawable
getSortData in interface Drawablepublic boolean isSortable()
Drawable
isSortable in interface Drawable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||