EchoPoint
1.0

echopoint
Class ImageMap.Coords

java.lang.Object
  extended byechopoint.ImageMap.Coords
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ImageMap

public static class ImageMap.Coords
extends java.lang.Object
implements java.io.Serializable

The Coords object is a set of co-ordinates and an ActionCommand String. The co-ordinates can be used to represent a circle, rectangle or polygon. The contructor used will determine type of Coords object is created

See Also:
Serialized Form

Field Summary
static int CIRCLE
           
static int POLYGON
           
static int RECTANGLE
           
 
Constructor Summary
ImageMap.Coords(int[] polyCoords)
          Creates a new Polygon Coords object with the given dimensions with no ActionCommand string.
ImageMap.Coords(int[] polyCoords, java.lang.String actionCommand)
          Creates a new Polygon Coords object with the given dimensions with the given ActionCommand string.
ImageMap.Coords(int x, int y, int radius)
          Creates a new Circular Coords object with the given dimensions with no ActionCommand string.
ImageMap.Coords(int left, int top, int right, int bottom)
          Creates a new Rectangular Coords object with the given dimensions with no ActionCommand string.
ImageMap.Coords(int left, int top, int right, int bottom, java.lang.String actionCommand)
          Creates a new Rectangular Coords object with the given dimensions with the given actionCommand String.
ImageMap.Coords(int x, int y, int radius, java.lang.String actionCommand)
          Creates a new Circular Coords object with the given dimensions with the given ActionCommand string.
 
Method Summary
 java.lang.String getActionCommand()
          Returns the value of the ActionCommand.
 int getBottom()
          Returns the value of the bottom co-ord.
 int getLeft()
          Returns the value of the left co-ord.
 int[] getPolygonCoords()
          Returns the array of the polygon co-ords.
 int getRadius()
          Returns the value of the radius co-ord.
 int getRight()
          Returns the value of the right co-ord.
 int getTop()
          Returns the value of the top co-ord.
 int getType()
          Returns the type co-ords.
 int getX()
          Returns the value of the x co-ord.
 int getY()
          Returns the value of the y co-ord.
 void setActionCommand(java.lang.String newActionCommand)
          Sets the action command of the co-ords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECTANGLE

public static final int RECTANGLE
See Also:
Constant Field Values

CIRCLE

public static final int CIRCLE
See Also:
Constant Field Values

POLYGON

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

ImageMap.Coords

public ImageMap.Coords(int left,
                       int top,
                       int right,
                       int bottom)
Creates a new Rectangular Coords object with the given dimensions with no ActionCommand string.

Parameters:
left - The value of the left co-ord.
top - The value of the top co-ord.
right - The value of the right co-ord.
bottom - The value of the bottom co-ord.

ImageMap.Coords

public ImageMap.Coords(int left,
                       int top,
                       int right,
                       int bottom,
                       java.lang.String actionCommand)
Creates a new Rectangular Coords object with the given dimensions with the given actionCommand String.

Parameters:
left - The value of the left co-ord.
top - The value of the top co-ord.
right - The value of the right co-ord.
bottom - The value of the bottom co-ord.

ImageMap.Coords

public ImageMap.Coords(int x,
                       int y,
                       int radius)
Creates a new Circular Coords object with the given dimensions with no ActionCommand string.

Parameters:
x - The value of the x co-ord.
y - The value of the y co-ord.
radius - The value of the radius co-ord.

ImageMap.Coords

public ImageMap.Coords(int x,
                       int y,
                       int radius,
                       java.lang.String actionCommand)
Creates a new Circular Coords object with the given dimensions with the given ActionCommand string.

Parameters:
x - The value of the x co-ord.
y - The value of the y co-ord.
radius - The value of the radius co-ord.
actionCommand - The values of the ActionCommand

ImageMap.Coords

public ImageMap.Coords(int[] polyCoords)
Creates a new Polygon Coords object with the given dimensions with no ActionCommand string.

Parameters:
polyCoords - An integer array of co-ordinates

ImageMap.Coords

public ImageMap.Coords(int[] polyCoords,
                       java.lang.String actionCommand)
Creates a new Polygon Coords object with the given dimensions with the given ActionCommand string.

Parameters:
polyCoords - An integer array of co-ordinates
actionCommand - The values of the ActionCommand
Method Detail

getActionCommand

public java.lang.String getActionCommand()
Returns the value of the ActionCommand.

Returns:
The value of the ActionCommand.

getBottom

public int getBottom()
Returns the value of the bottom co-ord.

Returns:
The value of the bottom co-ord.

getLeft

public int getLeft()
Returns the value of the left co-ord.

Returns:
The value of the left co-ord.

getRight

public int getRight()
Returns the value of the right co-ord.

Returns:
The value of the right co-ord.

getTop

public int getTop()
Returns the value of the top co-ord.

Returns:
The value of the top co-ord.

getX

public int getX()
Returns the value of the x co-ord.

Returns:
The value of the x co-ord.

getY

public int getY()
Returns the value of the y co-ord.

Returns:
The value of the y co-ord.

getRadius

public int getRadius()
Returns the value of the radius co-ord.

Returns:
The value of the radius co-ord.

getPolygonCoords

public int[] getPolygonCoords()
Returns the array of the polygon co-ords.

Returns:
The array of the polygon co-ords.

getType

public int getType()
Returns the type co-ords. This can be :

Returns:
The type co-ords.

setActionCommand

public void setActionCommand(java.lang.String newActionCommand)
Sets the action command of the co-ords


EchoPoint
1.0