|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.link.LinkActionRequest
public class LinkActionRequest
Class used to send a gesture to a server. In this case, a gesture can be a mouse click event, a mouse event, or a key event. This class defines how such notification is formatted and sent. The client can use the static write methods to put the object on the link, and the server creates an instance of this object to read the object off the link, and find out what the fields were.
Field Summary | |
---|---|
protected int |
clickCount
The click count of the mouse event. |
protected int |
descriptor
The mask describing the event. |
protected java.lang.String |
id
Graphic ID of an object selected by a gesture. |
protected char |
key
The character of the key that was pressed in a key event. |
protected float |
lat
The latitide location of the mouse event, in decimal degrees. |
protected float |
lon
The longitude location of the mouse event, in decimal degrees. |
protected int |
modifiers
The modifier of the event, that describes any keys that may have been pressed while the event occurred. |
protected LinkProperties |
properties
The properties object that contains any pertinent arguments. |
protected static float |
version
Version Number of request format. |
protected int |
x
The horizontal screen location of the mouse event, in pixels. |
protected int |
y
The vertical screen location of the mouse event, in pixels. |
Constructor Summary | |
---|---|
LinkActionRequest(Link link)
|
|
LinkActionRequest(Link link,
int descriptor,
java.lang.String sectionEnder)
Constructor used by a server to let the client know what types of gestures the server can receive. |
Method Summary | |
---|---|
int |
getDescriptor()
Get the masked int that describes the gesture. |
java.lang.String |
getGraphicID()
If this is null, it means that the gesture occurred on the map background and is not affiliated with a particular graphic. |
char |
getKey()
Get the keyboard key that was pressed from a key gesture. |
float |
getLat()
Get latitude of mouse gesture, in decimal degrees. |
java.lang.String |
getLinkStatus()
After reading the gesture response, this returns the section ending string terminating the gesture section, either Link.END_TOTAL or Link.END_SECTION. |
float |
getLon()
Get longitude of mouse gesture, in decimal degrees. |
int |
getModifiers()
Get the masked int that describes any modifing keys pressed with the gesture. |
LinkProperties |
getProperties()
Get the key-value args sent with the gesture. |
java.lang.String |
getType()
|
int |
getX()
Get horizontal pixel location of mouse gesture, from left side of map. |
int |
getY()
Get vertical pixel location of mouse gesture, from top of map. |
protected boolean |
isClientNotification()
Returns true if the query is to let the client know what gestures the server is interested in receiving. |
protected boolean |
isKeyEvent()
Returns true if the query is representing a key event. |
java.lang.String |
read(Link link)
Read the link and pull off the gesture, filling in the fields of this object. |
java.lang.String |
toString()
|
static void |
write(int descriptor,
java.awt.event.KeyEvent ke,
LinkProperties props,
Link link)
Write a KeyEvent on the link to the server. |
static void |
write(int descriptor,
java.awt.event.MouseEvent me,
float latPoint,
float lonPoint,
LinkProperties props,
Link link)
Write a MouseEvent on the link to the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int x
protected int y
protected float lat
protected float lon
protected int clickCount
protected int modifiers
protected char key
protected int descriptor
protected java.lang.String id
protected LinkProperties properties
protected static float version
Constructor Detail |
---|
public LinkActionRequest(Link link) throws java.io.IOException
java.io.IOException
public LinkActionRequest(Link link, int descriptor, java.lang.String sectionEnder) throws java.io.IOException
link
- the link to write to.descriptor
- a masked integer (see constants) describing
the event to receive.sectionEnder
- the endType string to use for this
description, either Link.END_TOTAL if this is the last
section to the client, or END_SECTION if there are more
sections following.
java.io.IOException
Method Detail |
---|
public java.lang.String getType()
public java.lang.String getLinkStatus()
public static void write(int descriptor, java.awt.event.MouseEvent me, float latPoint, float lonPoint, LinkProperties props, Link link) throws java.io.IOException
descriptor
- the MASK that describes the event.me
- the MouseEventlatPoint
- the latitude of the mouse event.lonPoint
- the longitude of the mouse event.props
- an array of strings representing key-value pairs.link
- the link to write the gesture to.
java.io.IOException
public static void write(int descriptor, java.awt.event.KeyEvent ke, LinkProperties props, Link link) throws java.io.IOException
descriptor
- the MASK that describes the event.ke
- the KeyEventprops
- Properties representing attributes.link
- the Link to write the gesture to.
java.io.IOException
public java.lang.String read(Link link) throws java.io.IOException
link
- the link to read from.
java.io.IOException
public float getLat()
public float getLon()
public int getX()
public int getY()
public char getKey()
public int getDescriptor()
public java.lang.String getGraphicID()
public int getModifiers()
public LinkProperties getProperties()
protected boolean isClientNotification()
protected boolean isKeyEvent()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |