Package ucar.visad.display
Class LatLonLabels
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
ucar.visad.display.TextDisplayable
ucar.visad.display.LatLonLabels
Class for creating lat/lon labels
-
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
ConstructorsConstructorDescriptionDefault ctorLatLonLabels
(String name) Create a LatLonLabels with the nameLatLonLabels
(String name, ScalarType textType) Create a default objectLatLonLabels
(String name, ScalarType textType, boolean isLatitude, float increment, float min, float max, float base, float[] labelLines) Create LatLonLabelsLatLonLabels
(LatLonLabels that) Copy constructorLatLonLabels
(ScalarType textType) Create a LatLonLabels with the type for the values -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Generate the label fieldfloat
getBase()
float
Get the interval between labels (degrees)Get the label formatfloat[]
float
getMax()
float
getMin()
Return the currently used ScalarType for display.boolean
Get whether to use 0-360 labels for longitudeboolean
void
setBase
(float base) void
setInterval
(float interval) Set the interval between labels (degrees)void
setLabelFormat
(String labelFormat) Set the interval between labels (degrees)void
setLabelLines
(float[] labelLines) void
setLatitude
(boolean isLatitude) void
setMax
(float max) void
setMin
(float min) void
setTextType
(ScalarType textType) Set the text type to use.void
setUse360
(boolean yesorno) Set whether to use 0-360 labels for longitudevoid
setValues
(float increment, float min, float max, float base, float[] labelLines) Set the values for this LatLonLabelsMethods inherited from class ucar.visad.display.TextDisplayable
cloneForDisplay, getDataRenderer, getFont, getHersheyFont, getJustification, getNumberFormat, getScreenLocked, getSphere, getTextSize, getverticalJustification, setCharacterRotation, setDisplayUnit, setFont, setJustification, setNumberFormat, setRotation, setScreenLocked, setSphere, setTextSize, setVerticalJustification, setVisible
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, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setUseFastRendering, 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, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
-
Constructor Details
-
LatLonLabels
Default ctor- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
LatLonLabels
Create a LatLonLabels with the name- Parameters:
name
- the name for the DataReference- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
LatLonLabels
Create a LatLonLabels with the type for the values- Parameters:
textType
- the type for the text- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
LatLonLabels
Create a default object- Parameters:
name
- the name for the DataReferencetextType
- the type for the values- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
LatLonLabels
public LatLonLabels(String name, ScalarType textType, boolean isLatitude, float increment, float min, float max, float base, float[] labelLines) throws VisADException, RemoteException Create LatLonLabels- Parameters:
name
- the name for the DataReferencetextType
- the type for the valuesisLatitude
- true if is latitudeincrement
- the incrementmin
- the minimum valuemax
- the maximum valuebase
- the base valuelabelLines
- the lines to label- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
LatLonLabels
Copy constructor- Parameters:
that
- the other LatLonLabels- Throws:
RemoteException
- Java RMI problemVisADException
- Problem creating VisAD object
-
-
Method Details
-
setValues
public void setValues(float increment, float min, float max, float base, float[] labelLines) throws VisADException, RemoteException Set the values for this LatLonLabels- Parameters:
increment
- the incrementmin
- the minimum valuemax
- the maximum valuebase
- the baselabelLines
- the label locations- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
getTextType
Return the currently used ScalarType for display.- Overrides:
getTextType
in classTextDisplayable
- Returns:
- the ScalarType
-
setTextType
Set the text type to use.- Overrides:
setTextType
in classTextDisplayable
- Parameters:
textType
- RealType or TextType to map to Display.Text- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
createLabels
Generate the label field- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create VisAD object
-
isLatitude
public boolean isLatitude()- Returns:
- the isLatitude
-
setLatitude
- Parameters:
isLatitude
- the isLatitude to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getBase
public float getBase()- Returns:
- the base
-
setBase
- Parameters:
base
- the base to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getMax
public float getMax()- Returns:
- the max
-
setMax
- Parameters:
max
- the max to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getMin
public float getMin()- Returns:
- the min
-
setMin
- Parameters:
min
- the min to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getInterval
public float getInterval()Get the interval between labels (degrees)- Returns:
- the increment
-
setInterval
Set the interval between labels (degrees)- Parameters:
interval
- the interval to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getUse360
public boolean getUse360()Get whether to use 0-360 labels for longitude- Returns:
- true if using 0-360
-
setUse360
Set whether to use 0-360 labels for longitude- Parameters:
yesorno
- true to use 0-360 labels for longitude- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getLabelFormat
Get the label format- Returns:
- the increment
-
setLabelFormat
Set the interval between labels (degrees)- Parameters:
labelFormat
- the label format- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-
getLabelLines
public float[] getLabelLines()- Returns:
- the labelLines
-
setLabelLines
- Parameters:
labelLines
- the labelLines to set- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating labels
-