synergynetframework.jme.cursorsystem.elements
Class MultiTouchButton

java.lang.Object
  extended by synergynetframework.jme.cursorsystem.MultiTouchElement
      extended by synergynetframework.jme.cursorsystem.elements.MultiTouchButton

public class MultiTouchButton
extends MultiTouchElement

The Class MultiTouchButton.


Nested Class Summary
static interface MultiTouchButton.MultiTouchButtonListener
          The listener interface for receiving multiTouchButton events.
 
Field Summary
 
Fields inherited from class synergynetframework.jme.cursorsystem.MultiTouchElement
AXIS_Z, DIRECTION_UP
 
Constructor Summary
MultiTouchButton(com.jme.scene.Spatial s)
          Instantiates a new multi touch button.
 
Method Summary
 void addButtonListener(MultiTouchButton.MultiTouchButtonListener l)
          Adds the button listener.
 void cursorChanged(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor changed.
 void cursorClicked(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor clicked.
 void cursorPressed(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor pressed.
 void cursorReleased(ScreenCursor c, MultiTouchCursorEvent event)
          Cursor released.
 double getDragDistanceFromCursorPressedEvent()
          Gets the drag distance from cursor pressed event.
 MultiTouchCursorEvent getLastChangedEvent()
          Gets the last changed event.
 MultiTouchCursorEvent getLastClickedEvent()
          Gets the last clicked event.
 MultiTouchCursorEvent getLastPressedEvent()
          Gets the last pressed event.
 MultiTouchCursorEvent getLastReleasedEvent()
          Gets the last released event.
 java.lang.Object getProperty(java.lang.String key)
          Gets the property.
 void removeButtonListener(MultiTouchButton.MultiTouchButtonListener l)
          Removes the button listener.
 void setLastChangedEvent(MultiTouchCursorEvent lastChangedEvent)
          Sets the last changed event.
 void setLastClickedEvent(MultiTouchCursorEvent lastClickedEvent)
          Sets the last clicked event.
 void setLastPressedEvent(MultiTouchCursorEvent lastPressedEvent)
          Sets the last pressed event.
 void setLastReleasedEvent(MultiTouchCursorEvent lastReleasedEvent)
          Sets the last released event.
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets the property.
 
Methods inherited from class synergynetframework.jme.cursorsystem.MultiTouchElement
addWorldCursorRecord, getCurrentScreenAngleDifferenceFromOrigin, getCurrentScreenCursorsAngle, getCurrentTargetSpatialRotationFromCursorChange, getName, getNumRegisteredCursors, getOriginScreenCursorsAngle, getPickDataForCursorID, getPickingSpatial, getPickResultFromCursorIndex, getScaleAtOrigin, getScreenCursorByID, getScreenCursorByIndex, getScreenCursorOriginForCursorID, getTargetSpatial, getTranslationAtOrigin, getWorldLocations, isActive, isPickMeOnly, registerScreenCursor, setActive, setName, setPickMeOnly, unregisterScreenCursor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTouchButton

public MultiTouchButton(com.jme.scene.Spatial s)
Instantiates a new multi touch button.

Parameters:
s - the s
Method Detail

addButtonListener

public void addButtonListener(MultiTouchButton.MultiTouchButtonListener l)
Adds the button listener.

Parameters:
l - the l

cursorChanged

public void cursorChanged(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor changed.

Specified by:
cursorChanged in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorClicked

public void cursorClicked(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor clicked.

Specified by:
cursorClicked in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorPressed

public void cursorPressed(ScreenCursor c,
                          MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor pressed.

Specified by:
cursorPressed in class MultiTouchElement
Parameters:
c - the c
event - the event

cursorReleased

public void cursorReleased(ScreenCursor c,
                           MultiTouchCursorEvent event)
Description copied from class: MultiTouchElement
Cursor released.

Specified by:
cursorReleased in class MultiTouchElement
Parameters:
c - the c
event - the event

getDragDistanceFromCursorPressedEvent

public double getDragDistanceFromCursorPressedEvent()
Gets the drag distance from cursor pressed event.

Returns:
the drag distance from cursor pressed event

getLastChangedEvent

public MultiTouchCursorEvent getLastChangedEvent()
Gets the last changed event.

Returns:
the last changed event

getLastClickedEvent

public MultiTouchCursorEvent getLastClickedEvent()
Gets the last clicked event.

Returns:
the last clicked event

getLastPressedEvent

public MultiTouchCursorEvent getLastPressedEvent()
Gets the last pressed event.

Returns:
the last pressed event

getLastReleasedEvent

public MultiTouchCursorEvent getLastReleasedEvent()
Gets the last released event.

Returns:
the last released event

getProperty

public java.lang.Object getProperty(java.lang.String key)
Gets the property.

Parameters:
key - the key
Returns:
the property

removeButtonListener

public void removeButtonListener(MultiTouchButton.MultiTouchButtonListener l)
Removes the button listener.

Parameters:
l - the l

setLastChangedEvent

public void setLastChangedEvent(MultiTouchCursorEvent lastChangedEvent)
Sets the last changed event.

Parameters:
lastChangedEvent - the new last changed event

setLastClickedEvent

public void setLastClickedEvent(MultiTouchCursorEvent lastClickedEvent)
Sets the last clicked event.

Parameters:
lastClickedEvent - the new last clicked event

setLastPressedEvent

public void setLastPressedEvent(MultiTouchCursorEvent lastPressedEvent)
Sets the last pressed event.

Parameters:
lastPressedEvent - the new last pressed event

setLastReleasedEvent

public void setLastReleasedEvent(MultiTouchCursorEvent lastReleasedEvent)
Sets the last released event.

Parameters:
lastReleasedEvent - the new last released event

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets the property.

Parameters:
key - the key
value - the value