maslab.telemetry.channel
Class VectorChannel

java.lang.Object
  extended by maslab.telemetry.channel.Channel
      extended by maslab.telemetry.channel.VectorChannel

public class VectorChannel
extends Channel

Channel for sending vector graphics to the BotClient.


Field Summary
static int CIRCLE
           
static int DELETE
           
static int DOT
           
static int LINE
           
static Logger log
           
 
Constructor Summary
VectorChannel(java.lang.String name)
          Create a new VectorChannel
 
Method Summary
 void delete(int handle)
          Delete a previously drawn object.
 int drawCircle(int x, int y, int r)
          Draw a circle.
 int drawLine(int x1, int y1, int x2, int y2)
          Draw a line.
 void setColor(java.awt.Color c)
          Set the current drawing color.
 
Methods inherited from class maslab.telemetry.channel.Channel
addCommandListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static Logger log

LINE

public static final int LINE
See Also:
Constant Field Values

DOT

public static final int DOT
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

CIRCLE

public static final int CIRCLE
See Also:
Constant Field Values
Constructor Detail

VectorChannel

public VectorChannel(java.lang.String name)
Create a new VectorChannel

Parameters:
name - The channel name.
Method Detail

drawLine

public int drawLine(int x1,
                    int y1,
                    int x2,
                    int y2)
Draw a line.

Parameters:
x1 - First x coordinate.
y1 - First y coordinate.
x2 - Second x coordinate.
y2 - Second y coordinate
Returns:
A handle that may be used to delete the line later.

setColor

public void setColor(java.awt.Color c)
Set the current drawing color. Subsequent objects will be drawn with this color.

Parameters:
c - A color.

drawCircle

public int drawCircle(int x,
                      int y,
                      int r)
Draw a circle.

Parameters:
x - Center x coordinate.
y - Center y coordinate.
r - Radius.
Returns:
A handle that may be used to delete this circle later.

delete

public void delete(int handle)
Delete a previously drawn object.

Parameters:
handle - The handle returned from a previous drawing operation.