Package ucar.visad.display
Class ScaleLabels
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
ucar.visad.display.ScaleLabels
Provides support for labeling the scale of an axis.
- Version:
- $Revision: 1.9 $
- Author:
- Steven R. Emmerson
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
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, renderer, VISIBLE
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
-
Constructor Summary
ConstructorsModifierConstructorDescriptionScaleLabels
(String name, RealType realType) Constructs from a name and a axis RealType.protected
ScaleLabels
(ScaleLabels that) Constructs from another instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addScalarMaps
(LocalDisplay display) Adds the non-spatial ScalarMap-s of this instance to a VisAD display.Returns a clone of this instance suitable for another VisAD display.void
set
(Gridded1DSet set) Sets the labels from a set of values.protected void
setAlignment
(TextControl control) Sets the alignment of text in a TextControl according to the alignment property.void
setFormat
(NumberFormat format) Sets the format of the labels.protected void
Sets the labels from internal information.void
setLabelValues
(float[] values) Sets the labels from an array of values.void
setPositionValues
(float[] positionValues) Sets the position of the labels from an array of positions.void
setSize
(double size) Sets the size of the labels.protected void
setSize
(TextControl control) Sets the size of text in a TextControl according to the size property.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, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, showme, toString
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, 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
-
Constructor Details
-
ScaleLabels
Constructs from a name and a axis RealType.- Parameters:
name
- The name for this instance.realType
- The type of the axis.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
ScaleLabels
Constructs from another instance.- Parameters:
that
- The other instance.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
setSize
Sets the size of the labels. method.- Parameters:
size
- The size of the labels (1 = normal).- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
setSize
Sets the size of text in a TextControl according to the size property.- Parameters:
control
- The TextControl.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setXAlignment
Sets the X-alignment of the labels.- Parameters:
alignment
- The X-alignment of the labels. One of Component.CENTER_ALIGNMENT, Component.RIGHT_ALIGNMENT, or Component.LEFT_ALIGNMENT.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
setAlignment
Sets the alignment of text in a TextControl according to the alignment property.- Parameters:
control
- The TextControl.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setFormat
Sets the format of the labels.- Parameters:
format
- The format of the labels.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
set
Sets the labels from a set of values.- Parameters:
set
- The set of values.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setLabelValues
Sets the labels from an array of values.- Parameters:
values
- The array of values.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setLabels
Sets the labels from internal information.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setPositionValues
Sets the position of the labels from an array of positions.- Parameters:
positionValues
- The position for the labels along the axis.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addScalarMaps
Adds the non-spatial ScalarMap-s of this instance to a VisAD display.- Parameters:
display
- The VisAD display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Overrides:
cloneForDisplay
in classDisplayableData
- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-