Package ucar.unidata.gis.maps
Class LatLonData
java.lang.Object
ucar.unidata.gis.maps.LatLonData
- Direct Known Subclasses:
MapDisplayControl.LatLonState
A data structure to hold display attributes for lat/lon lines
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
fast rendering flagprotected LatLonLines
The lat lon lines. -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ctorLatLonData
(boolean isLatitude, Color color, float defaultSpacing, float base, float lineWidth, int lineStyle, boolean fastRendering) The constructorLatLonData
(boolean isLatitude, Color color, float defaultSpacing, float lineWidth, int lineStyle) The ctroLatLonData
(boolean isLatitude, Color color, float defaultSpacing, float lineWidth, int lineStyle, boolean fastRendering) The constructorprotected
LatLonData
(LatLonData that) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionfloat
getBase()
Get the Base property.getColor()
Get the Color property.boolean
Get the FastRendering property.boolean
Get the IsLatitude property.Create, if needed, initialize and return the latlonlines object.int
Get the LineStyle property.float
Get the LineWidth property.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.float
Get the Spacing property.boolean
Get the Visible property.void
initWith
(LatLonData that) Initialize this object with the state from the given LatLonDatavoid
setBase
(float value) Set the Base property.void
Set the Color property.void
setFastRendering
(boolean value) Set the FastRendering property.void
setIsLatitude
(boolean value) Set the IsLatitude property.void
setLineStyle
(int value) Set the LineStyle property.void
setLineWidth
(float value) Set the LineWidth property.void
setMaxValue
(float value) Set the MaxValue property.void
setMinValue
(float value) Set the MinValue property.void
setSpacing
(float value) Set the Spacing property.void
setVisible
(boolean value) Set the Visible property.protected void
Gets called when any of the state has been changed.
-
Field Details
-
myLatLon
The lat lon lines. We create this when asked. -
fastRendering
protected boolean fastRenderingfast rendering flag
-
-
Constructor Details
-
LatLonData
public LatLonData()Default ctor -
LatLonData
public LatLonData(boolean isLatitude, Color color, float defaultSpacing, float lineWidth, int lineStyle) The ctro- Parameters:
isLatitude
- Is it lat or loncolor
- The colordefaultSpacing
- The spacinglineWidth
- The line widthlineStyle
- The line style
-
LatLonData
public LatLonData(boolean isLatitude, Color color, float defaultSpacing, float lineWidth, int lineStyle, boolean fastRendering) The constructor- Parameters:
isLatitude
- Is it lat or loncolor
- The colordefaultSpacing
- The spacinglineWidth
- The line widthlineStyle
- The line stylefastRendering
- true to use fast rendering
-
LatLonData
public LatLonData(boolean isLatitude, Color color, float defaultSpacing, float base, float lineWidth, int lineStyle, boolean fastRendering) The constructor- Parameters:
isLatitude
- Is it lat or loncolor
- The colordefaultSpacing
- The spacingbase
- The baselineWidth
- The line widthlineStyle
- The line stylefastRendering
- true to use fast rendering
-
LatLonData
Copy constructor- Parameters:
that
- the other latlondata object
-
-
Method Details
-
initWith
Initialize this object with the state from the given LatLonData- 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. -
getLatLonLines
Create, if needed, initialize and return the latlonlines object.- Returns:
- The
LatLonLines
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
-
setSpacing
public void setSpacing(float value) Set the Spacing property.- Parameters:
value
- The new value for Spacing
-
getSpacing
public float getSpacing()Get the Spacing property.- Returns:
- The Spacing
-
setBase
public void setBase(float value) Set the Base property.- Parameters:
value
- The new value for Base
-
getBase
public float getBase()Get the Base property.- Returns:
- The Base
-
setLineWidth
public void setLineWidth(float value) Set the LineWidth property.- Parameters:
value
- The new value for LineWidth
-
getLineWidth
public float getLineWidth()Get the LineWidth property.- Returns:
- The LineWidth
-
setLineStyle
public void setLineStyle(int value) Set the LineStyle property.- Parameters:
value
- The new value for LineStyle
-
getLineStyle
public int getLineStyle()Get the LineStyle property.- Returns:
- The LineStyle
-
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
-
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
-