i3mclient.shapeboard
Class Shape

java.lang.Object
  |
  +--i3mclient.shapeboard.Shape
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CircleShape, LineShape, RectangleShape

public abstract class Shape
extends Object
implements Serializable

A shape for ShapeBoard.

Author:
Henning Schaefer
See Also:
Serialized Form

Constructor Summary
Shape()
          Constructor.
 
Method Summary
abstract  void drawShape(GC gc)
          Draw the shape.
 Rectangle getBoundingBox()
          Return the bounding box around the shape.
 Color getColor()
          Return the color of the shape.
 int getX()
          Returns the horizontal position.
 int getX2()
          Returns the second horizontal position.
 boolean getXOR()
          Get the xorFlag.
 int getY()
          Returns the vertical position.
 int getY2()
          Returns the second vertical position.
 void setColor(Color setColor)
          Set the color of the shape.
 void setX(int setX)
          Set the horizontal position of the shape.
 void setX2(int setX2)
          Set the second horizontal position of the shape.
 void setXOR(boolean xorFlag)
          Set the xorFlag.
 void setY(int setY)
          Set the vertical position of the shape.
 void setY2(int setY2)
          Set the second vertical position of the shape.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shape

public Shape()
Constructor.

Method Detail

setX

public void setX(int setX)
Set the horizontal position of the shape.

Parameters:
setX - The horizontal position

setY

public void setY(int setY)
Set the vertical position of the shape.

Parameters:
setY - The vertical position

getX

public int getX()
Returns the horizontal position.

Returns:
The horizontal position

getY

public int getY()
Returns the vertical position.

Returns:
The vertical position

setX2

public void setX2(int setX2)
Set the second horizontal position of the shape.

Parameters:
setX2 - The second horizontal position

setY2

public void setY2(int setY2)
Set the second vertical position of the shape.

Parameters:
setY2 - The second vertical position

getX2

public int getX2()
Returns the second horizontal position.

Returns:
The second horizontal position

getY2

public int getY2()
Returns the second vertical position.

Returns:
The second vertical position

setColor

public void setColor(Color setColor)
Set the color of the shape.

Parameters:
setColor - The new color of the shape

getColor

public Color getColor()
Return the color of the shape.

Returns:
The color of the shape.

setXOR

public void setXOR(boolean xorFlag)
Set the xorFlag.

Parameters:
xorFlag - True or false

getXOR

public boolean getXOR()
Get the xorFlag.

Returns:
Xor mode or not

getBoundingBox

public Rectangle getBoundingBox()
Return the bounding box around the shape.

Returns:
The bounding rectangle

drawShape

public abstract void drawShape(GC gc)
Draw the shape.

Parameters:
gc - The GC on which the shape will be drawn