Class LatLonLabelData

java.lang.Object
ucar.unidata.gis.maps.LatLonLabelData
Direct Known Subclasses:
MapDisplayControl.LatLonLabelState

public class LatLonLabelData extends Object
A data structure to hold display attributes for lat/lon labels
  • Field Details

    • myLatLonLabels

      protected LatLonLabels myLatLonLabels
      The lat lon labels. We create this when asked.
    • fastRendering

      protected boolean fastRendering
      fast rendering flag
  • Constructor Details

    • LatLonLabelData

      public LatLonLabelData()
      Default ctor
    • LatLonLabelData

      public LatLonLabelData(boolean isLatitude, float interval)
      The ctor
      Parameters:
      isLatitude - Is it lat or lon
      interval - The interval
    • LatLonLabelData

      public LatLonLabelData(boolean isLatitude, float interval, float min, float max, float base)
      The ctor
      Parameters:
      isLatitude - Is it lat or lon
      interval - The interval
      min - minimum value
      max - maximum value
      base - 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 lon
      interval - The interval
      minValue - The min value
      maxValue - The max value
      baseValue - The base value
      labelLines - the label lines
      alignment - the alignment #ucar.unidata.ui.drawing.Glyph
      labelFont - the font (Font or HersheyFont)
      color - The color
      fastRendering - true to use fast rendering
    • LatLonLabelData

      protected LatLonLabelData(LatLonLabelData that)
      Copy constructor
      Parameters:
      that - the other latlondata object
  • Method Details

    • initWith

      public void initWith(LatLonLabelData that)
      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

      public LatLonLabels getLatLonLabels() throws VisADException, RemoteException
      Create, if needed, initialize and return the latlonlines object.
      Returns:
      The LatLonLabels object
      Throws:
      VisADException - the visad exception
      RemoteException - 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

      public void setColor(Color value)
      Set the Color property.
      Parameters:
      value - The new value for Color
    • getColor

      public 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

      public void setLabelsLineString(String value)
      Set the LabelLines from a string
      Parameters:
      value - The new string for LabelLines
    • parseLabelLineString

      public static float[] parseLabelLineString(String llString)
      Parse the label line string
      Parameters:
      llString - the label line string
      Returns:
      the array of float values
    • formatLabelLines

      public static String formatLabelLines(float[] vals)
      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

      public void setFont(Object value)
      Set the Font property.
      Parameters:
      value - The new value for Font
    • getFont

      public Object getFont()
      Get the Font property.
      Returns:
      The Font
    • setAlignment

      public void setAlignment(String value)
      Set the Alignment property.
      Parameters:
      value - The new value for Alignment
    • getAlignment

      public String 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

      public void setLabelFormat(String format)
      Set the label format (DD, DD:MM, etc)
      Parameters:
      format - the label format
    • getLabelFormat

      public String 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