synergynetframework.awt
Class AWTAppRenderer

java.lang.Object
  extended by synergynetframework.awt.AWTAppRenderer
All Implemented Interfaces:
IMultiTouchEventListener

public abstract class AWTAppRenderer
extends java.lang.Object
implements IMultiTouchEventListener

Utility base class for building AWT based multi-touch applications. Listens for multi-touch input, and keeps a track of 'blobs'. Blobs are stored in the coordinate space determined by the height and width, set via setSize.

Author:
dcs0ah1

Constructor Summary
AWTAppRenderer()
           
 
Method Summary
 void cursorChanged(MultiTouchCursorEvent event)
          Cursor is on the table, and moves, or rotates, or changes in some way.
 void cursorClicked(MultiTouchCursorEvent event)
          Cursor clicked.
 void cursorPressed(MultiTouchCursorEvent event)
          Cursor press arriving on the table.
 void cursorReleased(MultiTouchCursorEvent event)
          Cursor left the table.
 java.util.Map<java.lang.Long,Blob> getBlobs()
          Get the current blob map.
 void objectAdded(MultiTouchObjectEvent event)
          Object/fiducial is added to the table.
 void objectChanged(MultiTouchObjectEvent event)
          Object/fiducial is changed - position or rotation.
 void objectRemoved(MultiTouchObjectEvent event)
          Object/fiducial is removed from the table.
abstract  void render(java.awt.Graphics2D g2d)
          Render.
 void setSize(java.awt.Dimension d)
          Sets the size of the coordinate space that blobs will be reported in.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTAppRenderer

public AWTAppRenderer()
Method Detail

cursorChanged

public void cursorChanged(MultiTouchCursorEvent event)
Description copied from interface: IMultiTouchEventListener
Cursor is on the table, and moves, or rotates, or changes in some way.

Specified by:
cursorChanged in interface IMultiTouchEventListener
Parameters:
event - the event

cursorClicked

public void cursorClicked(MultiTouchCursorEvent event)
Description copied from interface: IMultiTouchEventListener
Cursor clicked. The sensitivity of the clicking detection is the responsibility of the appropriate IMultiTouchInputService. Event order is cursorPressed, cursorReleased, cursorClicked.

Specified by:
cursorClicked in interface IMultiTouchEventListener
Parameters:
event - the event

cursorPressed

public void cursorPressed(MultiTouchCursorEvent event)
Description copied from interface: IMultiTouchEventListener
Cursor press arriving on the table.

Specified by:
cursorPressed in interface IMultiTouchEventListener
Parameters:
event - the event

cursorReleased

public void cursorReleased(MultiTouchCursorEvent event)
Description copied from interface: IMultiTouchEventListener
Cursor left the table.

Specified by:
cursorReleased in interface IMultiTouchEventListener
Parameters:
event - the event

getBlobs

public java.util.Map<java.lang.Long,Blob> getBlobs()
Get the current blob map.

Returns:
the blobs

objectAdded

public void objectAdded(MultiTouchObjectEvent event)
Description copied from interface: IMultiTouchEventListener
Object/fiducial is added to the table.

Specified by:
objectAdded in interface IMultiTouchEventListener
Parameters:
event - the event

objectChanged

public void objectChanged(MultiTouchObjectEvent event)
Description copied from interface: IMultiTouchEventListener
Object/fiducial is changed - position or rotation.

Specified by:
objectChanged in interface IMultiTouchEventListener
Parameters:
event - the event

objectRemoved

public void objectRemoved(MultiTouchObjectEvent event)
Description copied from interface: IMultiTouchEventListener
Object/fiducial is removed from the table.

Specified by:
objectRemoved in interface IMultiTouchEventListener
Parameters:
event - the event

render

public abstract void render(java.awt.Graphics2D g2d)
Render.

Parameters:
g2d - the g2d

setSize

public void setSize(java.awt.Dimension d)
Sets the size of the coordinate space that blobs will be reported in. This should typically match the AWT component that will draw the blobs.

Parameters:
d - the new size