Package ucar.unidata.gis.maps
Class LatLonLabelData
java.lang.Object
ucar.unidata.gis.maps.LatLonLabelData
- Direct Known Subclasses:
MapDisplayControl.LatLonLabelState
A data structure to hold display attributes for lat/lon labels
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
fast rendering flagprotected LatLonLabels
The lat lon labels. -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ctorLatLonLabelData
(boolean isLatitude, float interval) The ctorLatLonLabelData
(boolean isLatitude, float interval, float min, float max, float base) The ctorLatLonLabelData
(boolean isLatitude, float interval, float minValue, float maxValue, float baseValue, float[] labelLines, String alignment, Object labelFont, Color color, boolean fastRendering) The ctorprotected
Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatLabelLines
(float[] vals) Format the label lines as a stringGet the Alignment property.float
Get the BaseValue property.getColor()
Get the Color property.boolean
Get the FastRendering property.getFont()
Get the Font property.float
Get the Interval property.boolean
Get the IsLatitude property.Get the label format propertyfloat[]
Get the LabelLines property.Create, if needed, initialize and return the latlonlines object.float
Get the MaxValue property.float
Get the MinValue property.protected boolean
Meant to be overwrote by a derived class that needs to determine its own visibility.boolean
Get the sphere propertyboolean
Get the Use360 property.boolean
Get the Visible property.void
initWith
(LatLonLabelData that) Initialize this object with the state from the given LatLonLabelDatastatic float[]
parseLabelLineString
(String llString) Parse the label line stringvoid
setAlignment
(String value) Set the Alignment property.void
setBaseValue
(float value) Set the BaseValue property.void
Set the Color property.void
setFastRendering
(boolean value) Set the FastRendering property.void
Set the Font property.void
setInterval
(float value) Set the Interval property.void
setIsLatitude
(boolean value) Set the IsLatitude property.void
setLabelFormat
(String format) Set the label format (DD, DD:MM, etc)void
setLabelLines
(float[] value) Set the LabelLines property.void
setLabelsLineString
(String value) Set the LabelLines from a stringvoid
setMaxValue
(float value) Set the MaxValue property.void
setMinValue
(float value) Set the MinValue property.void
setSphere
(boolean sphere) Set the whether we're on a spherevoid
setUse360
(boolean value) Set the use360 property.void
setVisible
(boolean value) Set the Visible property.protected void
Gets called when any of the state has been changed.
-
Field Details
-
myLatLonLabels
The lat lon labels. We create this when asked. -
fastRendering
protected boolean fastRenderingfast rendering flag
-
-
Constructor Details
-
LatLonLabelData
public LatLonLabelData()Default ctor -
LatLonLabelData
public LatLonLabelData(boolean isLatitude, float interval) The ctor- Parameters:
isLatitude
- Is it lat or loninterval
- The interval
-
LatLonLabelData
public LatLonLabelData(boolean isLatitude, float interval, float min, float max, float base) The ctor- Parameters:
isLatitude
- Is it lat or loninterval
- The intervalmin
- minimum valuemax
- maximum valuebase
- base value
-
LatLonLabelData
public LatLonLabelData(boolean isLatitude, float interval, float minValue, float maxValue, float baseValue, float[] labelLines, String alignment, Object labelFont, Color color, boolean fastRendering) The ctor- Parameters:
isLatitude
- Is it lat or loninterval
- The intervalminValue
- The min valuemaxValue
- The max valuebaseValue
- The base valuelabelLines
- the label linesalignment
- the alignment #ucar.unidata.ui.drawing.GlyphlabelFont
- the font (Font or HersheyFont)color
- The colorfastRendering
- true to use fast rendering
-
LatLonLabelData
Copy constructor- Parameters:
that
- the other latlondata object
-
-
Method Details
-
initWith
Initialize this object with the state from the given LatLonLabelData- Parameters:
that
- The other object
-
stateChanged
protected void stateChanged()Gets called when any of the state has been changed. Is here so a subclass can be easily notified when something changes. -
getLatLonLabels
Create, if needed, initialize and return the latlonlines object.- Returns:
- The
LatLonLabels
object - Throws:
VisADException
- the visad exceptionRemoteException
- the remote exception
-
getRealVisibility
protected boolean getRealVisibility()Meant to be overwrote by a derived class that needs to determine its own visibility.- Returns:
- The actual visibility to apply to the lines
-
setColor
Set the Color property.- Parameters:
value
- The new value for Color
-
getColor
Get the Color property.- Returns:
- The Color
-
setInterval
public void setInterval(float value) Set the Interval property.- Parameters:
value
- The new value for Interval
-
getInterval
public float getInterval()Get the Interval property.- Returns:
- The Interval
-
setBaseValue
public void setBaseValue(float value) Set the BaseValue property.- Parameters:
value
- The new value for BaseValue
-
getBaseValue
public float getBaseValue()Get the BaseValue property.- Returns:
- The BaseValue
-
setIsLatitude
public void setIsLatitude(boolean value) Set the IsLatitude property.- Parameters:
value
- The new value for IsLatitude
-
getIsLatitude
public boolean getIsLatitude()Get the IsLatitude property.- Returns:
- The IsLatitude
-
setMinValue
public void setMinValue(float value) Set the MinValue property.- Parameters:
value
- The new value for MinValue
-
getMinValue
public float getMinValue()Get the MinValue property.- Returns:
- The MinValue
-
setMaxValue
public void setMaxValue(float value) Set the MaxValue property.- Parameters:
value
- The new value for MaxValue
-
getMaxValue
public float getMaxValue()Get the MaxValue property.- Returns:
- The MaxValue
-
setLabelLines
public void setLabelLines(float[] value) Set the LabelLines property.- Parameters:
value
- The new value for LabelLines
-
setLabelsLineString
Set the LabelLines from a string- Parameters:
value
- The new string for LabelLines
-
parseLabelLineString
Parse the label line string- Parameters:
llString
- the label line string- Returns:
- the array of float values
-
formatLabelLines
Format the label lines as a string- Parameters:
vals
- the values- Returns:
- the string
-
getLabelLines
public float[] getLabelLines()Get the LabelLines property.- Returns:
- The LabelLines
-
setVisible
public void setVisible(boolean value) Set the Visible property.- Parameters:
value
- The new value for Visible
-
getVisible
public boolean getVisible()Get the Visible property.- Returns:
- The Visible
-
setFastRendering
public void setFastRendering(boolean value) Set the FastRendering property.- Parameters:
value
- The new value for FastRendering
-
getFastRendering
public boolean getFastRendering()Get the FastRendering property.- Returns:
- The FastRendering
-
setFont
Set the Font property.- Parameters:
value
- The new value for Font
-
getFont
Get the Font property.- Returns:
- The Font
-
setAlignment
Set the Alignment property.- Parameters:
value
- The new value for Alignment
-
getAlignment
Get the Alignment property.- Returns:
- The Alignment
-
setSphere
public void setSphere(boolean sphere) Set the whether we're on a sphere- Parameters:
sphere
- true if sphere
-
getSphere
public boolean getSphere()Get the sphere property- Returns:
- true if sphere
-
setLabelFormat
Set the label format (DD, DD:MM, etc)- Parameters:
format
- the label format
-
getLabelFormat
Get the label format property- Returns:
- the label format
-
setUse360
public void setUse360(boolean value) Set the use360 property.- Parameters:
value
- The new value for use360
-
getUse360
public boolean getUse360()Get the Use360 property.- Returns:
- The Use360
-