uavsim.graphics.instruments
Class ArcDescriptor<_UNIT_ extends I_Unitable<_UNIT_>>

java.lang.Object
  extended by uavsim.graphics.instruments.ArcDescriptor<_UNIT_>
Type Parameters:
_UNIT_ - - the unit of the arc

public class ArcDescriptor<_UNIT_ extends I_Unitable<_UNIT_>>
extends java.lang.Object

Defines an arc over an interval of a unit.

Author:
Dan Tappan [29.06.11]

Field Summary
private  java.awt.Color _color
          the arc color
private  boolean _isFilled
          whether to fill the arc or outline it
private  boolean _isMoon
          whether to connect the end points of the arc inner radius to form a half moon
private  ScalerPair _radiiScalers
          the scalers for the inner and outer arc radii
private  Interval<_UNIT_> _scale
          the arc interval
 
Constructor Summary
ArcDescriptor(Interval<_UNIT_> scale, double radius1Scale, double radius2Scale, boolean isFilled, boolean isMoon, java.awt.Color color)
          Creates an arc descriptor.
ArcDescriptor(Interval<_UNIT_> scale, ScalerPair radiiScalers, boolean isFilled, boolean isMoon, java.awt.Color color)
          Creates an arc descriptor.
 
Method Summary
 java.awt.Color getColor()
          Gets the arc color.
 Interval<_UNIT_> getInterval()
          Gets the arc interval.
 ScalerPair getRadiiScalers()
          Gets the scalers for the inner and outer arc radii.
 boolean isFilled()
          Gets whether to fill the arc or outline it.
 boolean isMoon()
          Gets whether to connect the end points of the arc inner radius to form a half moon.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_color

private final java.awt.Color _color
the arc color


_isFilled

private final boolean _isFilled
whether to fill the arc or outline it


_isMoon

private final boolean _isMoon
whether to connect the end points of the arc inner radius to form a half moon


_radiiScalers

private final ScalerPair _radiiScalers
the scalers for the inner and outer arc radii


_scale

private final Interval<_UNIT_ extends I_Unitable<_UNIT_>> _scale
the arc interval

Constructor Detail

ArcDescriptor

public ArcDescriptor(Interval<_UNIT_> scale,
                     double radius1Scale,
                     double radius2Scale,
                     boolean isFilled,
                     boolean isMoon,
                     java.awt.Color color)
Creates an arc descriptor. [xxx Law of Demeter helper to keep configuration constants smaller; note difference between scale/scaler]

Parameters:
scale - - the arc interval
radius1Scale - - the scaler for the inner arc radius
radius2Scale - - the scaler for the outer arc radius
isFilled - - whether to fill the arc or outline it
isMoon - - whether to connect the end points of the arc inner radius to form a half moon
color - - the arc color

ArcDescriptor

public ArcDescriptor(Interval<_UNIT_> scale,
                     ScalerPair radiiScalers,
                     boolean isFilled,
                     boolean isMoon,
                     java.awt.Color color)
Creates an arc descriptor.

Parameters:
scale - - the arc interval [xxx odd that this is math degrees but clockwise]
radiiScalers - - the scalers for the inner and outer arc radii
isFilled - - whether to fill the arc or outline it
isMoon - - whether to connect the end points of the arc inner radius to form a half moon
color - - the arc color
Method Detail

getColor

public java.awt.Color getColor()
Gets the arc color.

Returns:
the color

getInterval

public Interval<_UNIT_> getInterval()
Gets the arc interval.

Returns:
the interval

getRadiiScalers

public ScalerPair getRadiiScalers()
Gets the scalers for the inner and outer arc radii.

Returns:
the scalers

isFilled

public boolean isFilled()
Gets whether to fill the arc or outline it.

Returns:
the state

isMoon

public boolean isMoon()
Gets whether to connect the end points of the arc inner radius to form a half moon.

Returns:
the state

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object