ucar.unidata.view.sounding
Class ScaleLabels

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.LineDrawing
              extended by ucar.unidata.view.sounding.ScaleLabels
Direct Known Subclasses:
AerologicalDisplay.PressureAxisLabels, AerologicalDisplay.TemperatureAxisLabels

public abstract class ScaleLabels
extends LineDrawing

Provides support for displaying scale-labels along an axis.

Version:
$Id: ScaleLabels.java,v 1.22 2005/05/13 18:33:37 jeffmc Exp $
Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class ucar.visad.display.LineDrawing
COLOR, LINE_STYLE, LINE_WIDTH, POINT_SIZE
 
Fields inherited from class ucar.visad.display.DisplayableData
MANIPULABLE, VISIBLE
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
protected ScaleLabels(ScaleLabels that)
          Constructs from another instance.
protected ScaleLabels(String name, RealType axisType)
          Constructs from a name for the displayable and the type of the axis.
 
Method Summary
 void setFormat(NumberFormat format)
          Sets the format for the labels.
protected  void setLabels()
          Sets the labels.
 void setLabelValues(float[] values)
          Sets the values for the labels.
 void setPositionValues(float[] values)
          Sets the position of the labels.
 void setRealType(RealType realType)
          Sets the type of the axis.
 void setSize(double size)
          Sets the size of the labels.
 void setXAlignment(float alignment)
          Sets the X-alignment of the labels.
 
Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setPointSize, setRGB, setRGB, setRGBA, setRGBA
 
Methods inherited from class ucar.visad.display.DisplayableData
addAction, cloneForDisplay, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, toString
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScaleLabels

protected ScaleLabels(String name,
                      RealType axisType)
               throws RemoteException,
                      VisADException
Constructs from a name for the displayable and the type of the axis.

Parameters:
name - The name for the displayable.
axisType - The type of the axis. May be null.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

ScaleLabels

protected ScaleLabels(ScaleLabels that)
               throws RemoteException,
                      VisADException
Constructs from another instance.

Parameters:
that - The other instance.
Throws:
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
Method Detail

setSize

public void setSize(double size)
             throws VisADException,
                    RemoteException
Sets the size of the labels.

Parameters:
size - The size of the labels (1 is normal).
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setXAlignment

public void setXAlignment(float alignment)
                   throws VisADException,
                          RemoteException
Sets the X-alignment of the labels.

Parameters:
alignment - The X-alignment of the labels. One of Component.LEFT_ALIGNMENT, Component.RIGHT_ALIGNMENT.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setRealType

public void setRealType(RealType realType)
                 throws VisADException,
                        RemoteException
Sets the type of the axis.

Parameters:
realType - The type of the axis.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setFormat

public void setFormat(NumberFormat format)
               throws RemoteException,
                      VisADException
Sets the format for the labels.

Parameters:
format - The format for the labels.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setLabelValues

public void setLabelValues(float[] values)
                    throws VisADException,
                           RemoteException
Sets the values for the labels.

Parameters:
values - The values for the labels.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setLabels

protected void setLabels()
                  throws VisADException,
                         RemoteException
Sets the labels.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setPositionValues

public void setPositionValues(float[] values)
                       throws VisADException,
                              RemoteException
Sets the position of the labels.

Parameters:
values - The position of the labels.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.