uavsim.graphics.controls
Class A_ControlProperties

java.lang.Object
  extended by uavsim.graphics.controls.A_ControlProperties
Direct Known Subclasses:
A_ButtonProperties, A_KnobProperties

public abstract class A_ControlProperties
extends java.lang.Object

Provides the shared functionality for defining control properties.

Author:
Dan Tappan [22.06.11]

Field Summary
protected  CoordinateCartesianRelative _anchorRelative
          the center anchor relative to the center of the control's host instrument
protected  java.awt.Color _bodyColor
          the body color
protected  java.lang.String _label
          the label, which may be empty
protected  TextProperties _labelProperties
          the label properties
protected  java.awt.Color _outlineColor
          the outline color
protected  Scaler _outlineScale
          the relative scale of the outline to the body
 
Constructor Summary
A_ControlProperties(CoordinateCartesianRelative anchorRelative, Scaler outlineScale, java.awt.Color bodyColor, java.awt.Color outlineColor, java.lang.String label, TextProperties labelProperties)
          Creates an abstract properties descriptor for a control.
 
Method Summary
 CoordinateCartesianRelative getAnchorRelative()
          Gets the center anchor relative to the center of the control's host instrument.
 java.awt.Color getBodyColor()
          Gets the body color.
 java.lang.String getLabel()
          Gets the label, which may be empty.
 TextProperties getLabelProperties()
          Get the label properties.
 java.awt.Color getOutlineColor()
          Gets the outline color.
 Scaler getOutlineScale()
          Gets the relative scale of the outline to the body.
 boolean hasLabel()
          Returns whether there is a label.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_anchorRelative

protected final CoordinateCartesianRelative _anchorRelative
the center anchor relative to the center of the control's host instrument


_bodyColor

protected final java.awt.Color _bodyColor
the body color


_label

protected final java.lang.String _label
the label, which may be empty


_labelProperties

protected final TextProperties _labelProperties
the label properties


_outlineColor

protected final java.awt.Color _outlineColor
the outline color


_outlineScale

protected final Scaler _outlineScale
the relative scale of the outline to the body

Constructor Detail

A_ControlProperties

public A_ControlProperties(CoordinateCartesianRelative anchorRelative,
                           Scaler outlineScale,
                           java.awt.Color bodyColor,
                           java.awt.Color outlineColor,
                           java.lang.String label,
                           TextProperties labelProperties)
Creates an abstract properties descriptor for a control.

Parameters:
label - - the label, which may be empty
anchorRelative - - the center anchor relative to the center of the control's host instrument
outlineScale - - the relative scale of the outline to the body
bodyColor - - the body color
outlineColor - - the outline color
labelProperties - - the label properties
Method Detail

getAnchorRelative

public CoordinateCartesianRelative getAnchorRelative()
Gets the center anchor relative to the center of the control's host instrument.

Returns:
the anchor

getBodyColor

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

Returns:
the color

getLabel

public java.lang.String getLabel()
Gets the label, which may be empty.

Returns:
the label

getLabelProperties

public TextProperties getLabelProperties()
Get the label properties.

Returns:
the properties

getOutlineColor

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

Returns:
the color

getOutlineScale

public Scaler getOutlineScale()
Gets the relative scale of the outline to the body.

Returns:
the scale

hasLabel

public boolean hasLabel()
Returns whether there is a label. Technically there is always a label, but it may be empty.

Returns:
the state

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object