Package ucar.visad.display
Class TextDisplayable
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
ucar.visad.display.TextDisplayable
- Direct Known Subclasses:
LatLonLabels,RingLabels
Super class for displaying text data
- Version:
- $Revision: 1.17 $
- Author:
- IDV Development Team
-
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_SIZEFields inherited from class ucar.visad.display.DisplayableData
MANIPULABLE, renderer, VISIBLEFields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructorTextDisplayable(String name) Construct with the given name.TextDisplayable(String name, ScalarType textType) Construct with the given name.TextDisplayable(String name, ScalarType textType, boolean screenLocked) Construct with the given name.protectedConstructs from another instance.TextDisplayable(ScalarType textType) Construct with the given name. -
Method Summary
Modifier and TypeMethodDescriptionClone thisDisplayableso it can go into a different display.protected DataRendererGet the renderer for this TextDisplayablegetFont()Get the font for labels.Get the font for labels.Get the currently used text justificationGet the formatting for text object if values.booleanGet whether this is a screen locked display or notbooleanGet the sphere propertyfloatGet the currently used text sizeReturn the currently used ScalarType for display.Get the currently used text vertical justificationvoidsetCharacterRotation(double rotation) Set the character rotationvoidsetDisplayUnit(Unit unit) Set the units for the displayed rangevoidSet the Font for allvoidsetJustification(TextControl.Justification justification) Set the justification for all labelsvoidsetNumberFormat(NumberFormat format) Set the formatting for all labelsvoidsetRotation(double rotation) Set the rotationvoidsetScreenLocked(boolean locked) Set the screenlocked attributevoidsetSphere(boolean sphere) Set the whether we're on a spherevoidsetTextSize(float size) Set the size for all labelsvoidsetTextType(ScalarType textType) Set the text type to use.voidsetVerticalJustification(TextControl.Justification verticalJustification) Set the vertical justification for all labelsvoidsetVisible(boolean visible) Sets the visibility property.Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setPointSize, setRGB, setRGB, setRGBA, setRGBAMethods inherited from class ucar.visad.display.DisplayableData
addAction, dataChange, destroy, getActive, getAnimationSet, getData, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setUseFastRendering, showme, toStringMethods 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, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
-
Constructor Details
-
TextDisplayable
Default constructor- Throws:
VisADException- necessary VisAD object couldn't be createdRemoteException- remote error
-
TextDisplayable
Construct with the given name.- Parameters:
name- name must contain no spaces.- Throws:
VisADException- necessary VisAD object couldn't be createdRemoteException- remote error
-
TextDisplayable
Construct with the given name.- Parameters:
textType- type to map to Display.Text may not be null- Throws:
VisADException- necessary VisAD object couldn't be createdRemoteException- remote error
-
TextDisplayable
Construct with the given name.- Parameters:
name- name to identify this objecttextType- type to map to Display.Text- Throws:
VisADException- necessary VisAD object couldn't be createdRemoteException- remote error
-
TextDisplayable
public TextDisplayable(String name, ScalarType textType, boolean screenLocked) throws VisADException, RemoteException Construct with the given name.- Parameters:
name- name to identify this objecttextType- type to map to Display.TextscreenLocked- true to use a screen locked renderer- Throws:
VisADException- necessary VisAD object couldn't be createdRemoteException- remote error
-
TextDisplayable
Constructs from another instance.- Parameters:
that- The other instance.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
-
Method Details
-
setTextType
Set the text type to use.- Parameters:
textType- RealType or TextType to map to Display.Text- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
getTextType
Return the currently used ScalarType for display.- Returns:
- the ScalarType
-
setNumberFormat
Set the formatting for all labels- Parameters:
format- Number format- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
setVisible
Sets the visibility property.- Overrides:
setVisiblein classDisplayableData- Parameters:
visible- Whether or not this instance should be displayed.- Throws:
RemoteException- Java RMI failure.VisADException- VisAD failure.
-
getNumberFormat
Get the formatting for text object if values. May be null (if not set)- Returns:
- format used for labeling
-
setScreenLocked
Set the screenlocked attribute- Parameters:
locked- true to set screen locked- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getScreenLocked
public boolean getScreenLocked()Get whether this is a screen locked display or not- Returns:
- true if screen locked
-
setTextSize
Set the size for all labels- Parameters:
size- size (1.0 default)- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getTextSize
public float getTextSize()Get the currently used text size- Returns:
- size of text
-
setSphere
Set the whether we're on a sphere- Parameters:
sphere- true if sphere- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getSphere
public boolean getSphere()Get the sphere property- Returns:
- true if sphere
-
setJustification
public void setJustification(TextControl.Justification justification) throws VisADException, RemoteException Set the justification for all labels- Parameters:
justification- The justification- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getJustification
Get the currently used text justification- Returns:
- justification
-
setVerticalJustification
public void setVerticalJustification(TextControl.Justification verticalJustification) throws VisADException, RemoteException Set the vertical justification for all labels- Parameters:
verticalJustification- The justification- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getverticalJustification
Get the currently used text vertical justification- Returns:
- justification
-
setFont
Set the Font for all- Parameters:
font- font for text (Font or HersheyFont)- Throws:
RemoteException- Java RMI errorVisADException- VisAD error or not a valid font object
-
setRotation
Set the rotation- Parameters:
rotation- rotation- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
setCharacterRotation
Set the character rotation- Parameters:
rotation- rotation- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getFont
Get the font for labels. May be null (if not set or using HersheyFont)- Returns:
- font used for labeling
-
getHersheyFont
Get the font for labels. May be null (if not set or using HersheyFont)- Returns:
- font used for labeling
-
setDisplayUnit
Set the units for the displayed range- Overrides:
setDisplayUnitin classDisplayable- Parameters:
unit- Unit for display- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
cloneForDisplay
Clone thisDisplayableso it can go into a different display.- Overrides:
cloneForDisplayin classDisplayableData- Returns:
- clone of this object
- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getDataRenderer
Get the renderer for this TextDisplayable- Overrides:
getDataRendererin classDisplayableData- Returns:
- renderer
- Throws:
VisADException- problem creating renderer
-