Package ucar.unidata.idv.control
Class MapDisplayControl.LatLonLabelState
java.lang.Object
ucar.unidata.gis.maps.LatLonLabelData
ucar.unidata.idv.control.MapDisplayControl.LatLonLabelState
- Enclosing class:
MapDisplayControl
This class holds the state associated with a given lat/lon
-
Field Summary
Fields inherited from class ucar.unidata.gis.maps.LatLonLabelData
fastRendering, myLatLonLabels
-
Constructor Summary
ConstructorsConstructorDescriptionParameterless ctorLatLonLabelState
(boolean isLatitude, float spacing) The ctorCtor for creating from a LatLonData -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply the visibility to the myLatLonprotected boolean
Overwrite the base class method to take into account the display's visibilityprotected void
init
(MapDisplayControl mapDisplayControl) Set the MapDisplayControlvoid
initWith
(LatLonLabelData that) Copy the state from the given LatLonDatavoid
setAlignment
(String value) Set the alignment pointvoid
setBaseValue
(float value) Set the basevoid
Set the colorvoid
setFastRendering
(boolean value) Set the fast rendering flagvoid
Set the fontvoid
setInterval
(float value) Set the spacing of the linesvoid
setLabelFormat
(String value) Set the label formatvoid
setLabelLines
(float[] values) Set the label lines of the linesvoid
setSphere
(boolean value) Set the sphere flagvoid
setUse360
(boolean value) Set the use360 propertyvoid
setVisible
(boolean value) Set the visibilityvoid
Called by the base class when one of the latlon values have changed.toString()
to stringMethods inherited from class ucar.unidata.gis.maps.LatLonLabelData
formatLabelLines, getAlignment, getBaseValue, getColor, getFastRendering, getFont, getInterval, getIsLatitude, getLabelFormat, getLabelLines, getLatLonLabels, getMaxValue, getMinValue, getSphere, getUse360, getVisible, parseLabelLineString, setIsLatitude, setLabelsLineString, setMaxValue, setMinValue
-
Constructor Details
-
LatLonLabelState
public LatLonLabelState()Parameterless ctor -
LatLonLabelState
Ctor for creating from a LatLonData- Parameters:
that
- The object to copy from
-
LatLonLabelState
public LatLonLabelState(boolean isLatitude, float spacing) The ctor- Parameters:
isLatitude
- Is this latitude or longitudespacing
- Line spacing
-
-
Method Details
-
init
Set the MapDisplayControl- Parameters:
mapDisplayControl
- The display I am part of
-
initWith
Copy the state from the given LatLonData- Overrides:
initWith
in classLatLonLabelData
- Parameters:
that
- The LatLonData to copy from
-
setColor
Set the color- Overrides:
setColor
in classLatLonLabelData
- Parameters:
value
- the new Color
-
setVisible
public void setVisible(boolean value) Set the visibility- Overrides:
setVisible
in classLatLonLabelData
- Parameters:
value
- true to be visible
-
setFastRendering
public void setFastRendering(boolean value) Set the fast rendering flag- Overrides:
setFastRendering
in classLatLonLabelData
- Parameters:
value
- true to turn on fast rendering
-
setLabelLines
public void setLabelLines(float[] values) Set the label lines of the lines- Overrides:
setLabelLines
in classLatLonLabelData
- Parameters:
values
- the label lines
-
setInterval
public void setInterval(float value) Set the spacing of the lines- Overrides:
setInterval
in classLatLonLabelData
- Parameters:
value
- the line spacing
-
setBaseValue
public void setBaseValue(float value) Set the base- Overrides:
setBaseValue
in classLatLonLabelData
- Parameters:
value
- the line width
-
setFont
Set the font- Overrides:
setFont
in classLatLonLabelData
- Parameters:
value
- the label font
-
setAlignment
Set the alignment point- Overrides:
setAlignment
in classLatLonLabelData
- Parameters:
value
- the alignment point
-
setLabelFormat
Set the label format- Overrides:
setLabelFormat
in classLatLonLabelData
- Parameters:
value
- the label format
-
setSphere
public void setSphere(boolean value) Set the sphere flag- Overrides:
setSphere
in classLatLonLabelData
- Parameters:
value
- the sphere flag
-
setUse360
public void setUse360(boolean value) Set the use360 property- Overrides:
setUse360
in classLatLonLabelData
- Parameters:
value
- true to use 0-360 for longitudes
-
checkVisibility
protected void checkVisibility()Apply the visibility to the myLatLon -
getRealVisibility
protected boolean getRealVisibility()Overwrite the base class method to take into account the display's visibility- Overrides:
getRealVisibility
in classLatLonLabelData
- Returns:
- THe actual visibility to use
-
stateChanged
public void stateChanged()Called by the base class when one of the latlon values have changed.- Overrides:
stateChanged
in classLatLonLabelData
-
toString
to string
-