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

java.lang.Object
  extended by uavsim.graphics.instruments.TickDescriptor<_UNIT_>
Type Parameters:
_UNIT_ - - the unit that the ticks are based on

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

Defines a tick descriptor.

Author:
Dan Tappan [29.06.11]

Field Summary
private  java.awt.Color _color
          the tick color
private  Interval<_UNIT_> _interval
          the interval over which the ticks range
private  ScalerPair _radiiScalers
          the scalers for the inner and outer arc radii
private  Scaler _width
          the width scale of the tick relative to the instrument size
 
Constructor Summary
TickDescriptor(Interval<_UNIT_> interval, double innerRadiusScale, double outerRadiusScale, double width, java.awt.Color color)
          Creates a tick descriptor.
TickDescriptor(Interval<_UNIT_> interval, ScalerPair radiiScalers, Scaler width, java.awt.Color color)
          Creates a tick descriptor.
 
Method Summary
 java.awt.Color getColor()
          Gets the tick color.
 Interval<_UNIT_> getInterval()
          Gets the interval over which the ticks range.
 ScalerPair getRadii()
          Gets the scalers for the inner and outer arc radii.
 Scaler getWidth()
          Gets the width scale of the tick relative to the instrument size.
 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 tick color


_interval

private final Interval<_UNIT_ extends I_Unitable<_UNIT_>> _interval
the interval over which the ticks range


_radiiScalers

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


_width

private final Scaler _width
the width scale of the tick relative to the instrument size

Constructor Detail

TickDescriptor

public TickDescriptor(Interval<_UNIT_> interval,
                      double innerRadiusScale,
                      double outerRadiusScale,
                      double width,
                      java.awt.Color color)
Creates a tick descriptor. [xxx Law of Demeter helper to keep configuration constants smaller; note difference between scale/scaler]

Parameters:
interval - -the interval over which the ticks range
innerRadiusScale - - the scaler for the inner arc radius
outerRadiusScale - - the scaler for the outer arc radius
width - -the width scale of the tick relative to the instrument size
color - -the tick color

TickDescriptor

public TickDescriptor(Interval<_UNIT_> interval,
                      ScalerPair radiiScalers,
                      Scaler width,
                      java.awt.Color color)
Creates a tick descriptor.

Parameters:
interval - -the interval over which the ticks range
radiiScalers - -the scalers for the inner and outer arc radii
width - -the width scale of the tick relative to the instrument size
color - -the tick color
Method Detail

getColor

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

Returns:
the color

getInterval

public Interval<_UNIT_> getInterval()
Gets the interval over which the ticks range.

Returns:
the interval

getRadii

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

Returns:
the scalers

getWidth

public Scaler getWidth()
Gets the width scale of the tick relative to the instrument size.

Returns:
the scale

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object