uavsim.graphics
Class A_ShapeDescriptor<_SHAPE_>

java.lang.Object
  extended by uavsim.graphics.A_ShapeDescriptor<_SHAPE_>
Type Parameters:
_SHAPE_ - - the shape
Direct Known Subclasses:
BoxDescriptor, CircleDescriptor

public abstract class A_ShapeDescriptor<_SHAPE_>
extends java.lang.Object

Defines the shared elements of basic geometric shapes (e.g., box, circle) with a body fill color and an outline with a color and thickness.

Author:
Dan Tappan [14.07.11]

Field Summary
protected  java.awt.Color _bodyColor
          the body color
protected  java.awt.Color _outlineColor
          the outline color
protected  Scaler _outlineScale
          the outline scale
private  _SHAPE_ _shape
          the shape
 
Constructor Summary
A_ShapeDescriptor(_SHAPE_ shape, java.awt.Color bodyColor, Scaler outlineScale, java.awt.Color outlineColor)
          Creates an abstract shape descriptor.
 
Method Summary
 java.awt.Color getBodyColor()
          Gets the body color.
 java.awt.Color getOutlineColor()
          Gets the outline color.
 Scaler getOutlineScale()
          Gets the outline scale.
 _SHAPE_ getShape()
          Gets the shape.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_bodyColor

protected final java.awt.Color _bodyColor
the body color


_outlineColor

protected final java.awt.Color _outlineColor
the outline color


_outlineScale

protected final Scaler _outlineScale
the outline scale


_shape

private final _SHAPE_ _shape
the shape

Constructor Detail

A_ShapeDescriptor

public A_ShapeDescriptor(_SHAPE_ shape,
                         java.awt.Color bodyColor,
                         Scaler outlineScale,
                         java.awt.Color outlineColor)
Creates an abstract shape descriptor.

Parameters:
shape - - the shape
bodyColor - - the body color
outlineScale - - the outline scale
outlineColor - - the outline color
Method Detail

getBodyColor

public java.awt.Color getBodyColor()
Gets the body color.

Returns:
the color

getOutlineColor

public java.awt.Color getOutlineColor()
Gets the outline color.

Returns:
the color

getOutlineScale

public Scaler getOutlineScale()
Gets the outline scale.

Returns:
the scale.

getShape

public _SHAPE_ getShape()
Gets the shape.

Returns:
the shape

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object