gestalt.input
Class EventHandler

java.lang.Object
  extended by gestalt.input.EventHandler
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
JoglEventHandler

public class EventHandler
extends java.lang.Object
implements Drawable


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

EVENT_FLIP_MOUSE_Y

public static boolean EVENT_FLIP_MOUSE_Y

EVENT_CENTER_MOUSE

public static boolean EVENT_CENTER_MOUSE

mouseButton

public int mouseButton

mouseDown

public boolean mouseDown

mouseClicked

public boolean mouseClicked

mouseReleased

public boolean mouseReleased

mouseX

public int mouseX

mouseY

public int mouseY

normalized_mouseX

public float normalized_mouseX

normalized_mouseY

public float normalized_mouseY

pmouseX

public int pmouseX

pmouseY

public int pmouseY

mousewheel

public int mousewheel

keyPressed

public boolean keyPressed

key

public char key

keyCode

public int keyCode

keyDown

public boolean keyDown

keyReleased

public boolean keyReleased

shift

public boolean shift
Constructor Detail

EventHandler

public EventHandler()
Method Detail

draw

public void draw(GLContext theContext)
Description copied from interface: Drawable
this method is used to draw the drawable, when the context is ready. although the behavior sometimes varies and doesn t always need to have a visual representation depending on the implementation.

Specified by:
draw in interface Drawable
Parameters:
theContext - GLContext

keyPressed

public boolean keyPressed(char theChar)

addMouseListener

public void addMouseListener(GestaltMouseListener theMouseListener)

removeMouseListener

public void removeMouseListener(GestaltMouseListener theMouseListener)

addKeyListener

public void addKeyListener(GestaltKeyListener theKeyListener)

removeKeyListner

public void removeKeyListner(GestaltKeyListener theKeyListener)

isActive

public boolean isActive()
Description copied from interface: Drawable
returns whether the drawable is active. it is commonly implemented so that the drawables 'draw' method will be ommitted if 'isActive' return false, although this behavior can vary depending on the implementation.

Specified by:
isActive in interface Drawable
Returns:
boolean

add

public void add(Drawable theDrawable)
Description copied from interface: Drawable
this method is commonly used to store children of a drawable.

Specified by:
add in interface Drawable
Parameters:
theDrawable - Drawable

getSortValue

public float getSortValue()
Description copied from interface: Drawable
returns the last sort value.

Specified by:
getSortValue in interface Drawable
Returns:
float

setSortValue

public void setSortValue(float theSortValue)
Description copied from interface: Drawable
caches the current sort value.

Specified by:
setSortValue in interface Drawable
Parameters:
theSortValue - float

getSortData

public float[] getSortData()
Description copied from interface: Drawable
returns the data upon which a sort value is calculated.

Specified by:
getSortData in interface Drawable
Returns:
float[]

isSortable

public boolean isSortable()
Description copied from interface: Drawable
returns true if the 'drawable' should be sorted before drawing.

Specified by:
isSortable in interface Drawable
Returns:
boolean


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009