uavsim.graphics.instruments
Class NeedleDescriptor

java.lang.Object
  extended by uavsim.graphics.instruments.NeedleDescriptor

public class NeedleDescriptor
extends java.lang.Object

Defines a needle descriptor.

Author:
Dan Tappan [29.06.11]

Field Summary
private  Scaler _baseRadius
          the scaler for the needle base radius relative to the instrument size
private  Scaler _baseWidth
          the scaler for the needle base width relative to the instrument size
private  java.awt.Color _color
          the needle color
private  Scaler _tipRadius
          the scaler for the needle tip radius relative to the instrument size
private  Scaler _tipWidth
          the scaler for the needle tip width relative to the instrument size
 
Constructor Summary
NeedleDescriptor(double baseRadiusScale, double baseWidthScale, double tipRadiusScale, double tipWidthScale, java.awt.Color color)
          Creates a needle descriptor.
NeedleDescriptor(Scaler baseRadius, Scaler baseWidth, Scaler tipRadius, Scaler tipWidth, java.awt.Color color)
          Creates a needle descriptor.
 
Method Summary
 Scaler getBaseRadiusScaler()
          Gets the scaler for the needle base radius relative to the instrument size.
 Scaler getBaseWidthScaler()
          Gets the scaler for the needle base width relative to the instrument size.
 java.awt.Color getColor()
          Gets the needle color.
 Scaler getTipRadiusScaler()
          Gets the scaler for the needle tip radius relative to the instrument size.
 Scaler getTipWidthScaler()
          Gets the scaler for the needle tip width 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

_baseRadius

private final Scaler _baseRadius
the scaler for the needle base radius relative to the instrument size


_baseWidth

private final Scaler _baseWidth
the scaler for the needle base width relative to the instrument size


_color

private final java.awt.Color _color
the needle color


_tipRadius

private final Scaler _tipRadius
the scaler for the needle tip radius relative to the instrument size


_tipWidth

private final Scaler _tipWidth
the scaler for the needle tip width relative to the instrument size

Constructor Detail

NeedleDescriptor

public NeedleDescriptor(double baseRadiusScale,
                        double baseWidthScale,
                        double tipRadiusScale,
                        double tipWidthScale,
                        java.awt.Color color)
Creates a needle descriptor. [xxx Law of Demeter helper to keep configuration constants smaller]

Parameters:
baseRadiusScale - - the scaler for the needle base radius relative to the instrument size
baseWidthScale - - the scaler for the needle base width relative to the instrument size
tipRadiusScale - - the scaler for the needle tip radius relative to the instrument size
tipWidthScale - - the scaler for the needle tip width relative to the instrument size
color - - the needle color

NeedleDescriptor

public NeedleDescriptor(Scaler baseRadius,
                        Scaler baseWidth,
                        Scaler tipRadius,
                        Scaler tipWidth,
                        java.awt.Color color)
Creates a needle descriptor.

Parameters:
baseRadius - - the scaler for the needle base radius relative to the instrument size
baseWidth - - the scaler for the needle base width relative to the instrument size
tipRadius - - the scaler for the needle tip radius relative to the instrument size
tipWidth - - the scaler for the needle tip width relative to the instrument size
color - - the needle color
Method Detail

getBaseRadiusScaler

public Scaler getBaseRadiusScaler()
Gets the scaler for the needle base radius relative to the instrument size.

Returns:
the scaler

getBaseWidthScaler

public Scaler getBaseWidthScaler()
Gets the scaler for the needle base width relative to the instrument size.

Returns:
the scaler

getColor

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

Returns:
the color

getTipRadiusScaler

public Scaler getTipRadiusScaler()
Gets the scaler for the needle tip radius relative to the instrument size.

Returns:
the scaler

getTipWidthScaler

public Scaler getTipWidthScaler()
Gets the scaler for the needle tip width relative to the instrument size.

Returns:
the scaler

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object