jview
Class GestureLink

java.lang.Object
  extended by jview.GestureLink
All Implemented Interfaces:
AWTEventListener, EventListener, ExitCleaning

public class GestureLink
extends Object
implements AWTEventListener, ExitCleaning

This class is the client class to a InputEventLinking instance. The correct usage could be summarized as:


Field Summary
private  Component display
          This is the component we link up.
private  InputEventLinking robot
          This is the gesture robot that will mimick our movements.
 
Constructor Summary
GestureLink()
          Create a new gesture link.
GestureLink(String linkto)
          Create a new gesture link and links it to the named server.
 
Method Summary
 boolean attachTo(Component c)
          We attach this component to the robot on the server side.
 void eventDispatched(AWTEvent event)
          We relay the event received to the server, it the server can interpret the event.
 void exit()
          On exit, we remove ourtself from the toolkit as a listener.
 boolean linkTo(String server)
          We try to look up the server at the given name.
static void main(String[] arg)
          In the standalone version we try to connect to a gesture robot bound as the argument.
private  void transfer(InputEvent ie)
          We savly transfer the input event to a non-null robot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

robot

private InputEventLinking robot
This is the gesture robot that will mimick our movements.


display

private Component display
This is the component we link up.

Constructor Detail

GestureLink

public GestureLink()
Create a new gesture link. Before the linking can take place, a linked component must be attached.


GestureLink

public GestureLink(String linkto)
Create a new gesture link and links it to the named server. Before the linking can take place, a linked component must be attached.

Method Detail

exit

public void exit()
On exit, we remove ourtself from the toolkit as a listener.

Specified by:
exit in interface ExitCleaning

linkTo

public boolean linkTo(String server)
We try to look up the server at the given name. This method should always be called before attachTo(java.awt.Component)


attachTo

public boolean attachTo(Component c)
We attach this component to the robot on the server side. Only if the component's size can be determined, we add ourself as a listener to the root toolkit.


eventDispatched

public void eventDispatched(AWTEvent event)
We relay the event received to the server, it the server can interpret the event. In particular, these are MouseEvents if the mouse was moved or dragged, if a button was pressed or released (but not clicked, this event is ignored), or if the mouse wheel was turned, or key-pressed and key-released events.

Specified by:
eventDispatched in interface AWTEventListener

transfer

private void transfer(InputEvent ie)
We savly transfer the input event to a non-null robot.


main

public static void main(String[] arg)
                 throws RemoteException
In the standalone version we try to connect to a gesture robot bound as the argument.

Throws:
RemoteException