com.supermap.mapping

Class ThemeGridRangeItem

  • java.lang.Object
    • com.supermap.mapping.ThemeGridRangeItem


  • public class ThemeGridRangeItem
    extends java.lang.Object
    The ThemeGridRangeItem class.

    The ThemeGridRangeItem class. In grid ranges map, the field, which is regarded as the thematic variable, can be separated into several ranges according to a certain range method. This class is used to set the start value, end value, caption, color and etc. for each range. The range of each range object is [Start, End).

    • Constructor Summary

      Constructors 
      Constructor and Description
      ThemeGridRangeItem()
      The default constructor for constructing a new ThemeGridRangeItem object.
      ThemeGridRangeItem(double start, double end, Color color)
      Initializes a new instance of the ThemeGridRangeItem class with the specified parameters.
      ThemeGridRangeItem(double start, double end, Color color, java.lang.String caption)
      Initializes a new instance of the ThemeGridRangeItem class with the specified parameters.
      ThemeGridRangeItem(ThemeGridRangeItem themeGridRangeItem)
      Copy constructor, initializes a new instance of the class which is identical with the specified ThemeGridRangeItem object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCaption()
      Returns the name of the grid range map item.
      Color getColor()
      Returns the style for each item of a grid ranges map.
      double getEnd()
      return the end value of the ThemeGridRangeItem object.
      double getStart()
      return the start value of the ThemeGridRangeItem object.
      boolean isVisible()
      Returns whether the grid ranges map item is visible.
      void setCaption(java.lang.String value)
      Set the name of the grid range map item.
      void setColor(Color color)
      Set the style for each item of a grid ranges map.
      void setEnd(double end)
      Set the end value of the ThemeGridRangeItem object.
      void setStart(double start)
      Set the start value of the ThemeGridRangeItem object.
      void setVisible(boolean value)
      Sets whether the grid ranges map item is visible.
      java.lang.String toString()
      Returns the readable strings of a grid ranges thematic map item with a specific format.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ThemeGridRangeItem

        public ThemeGridRangeItem()
        The default constructor for constructing a new ThemeGridRangeItem object.
      • ThemeGridRangeItem

        public ThemeGridRangeItem(double start,
                                  double end,
                                  Color color)
        Initializes a new instance of the ThemeGridRangeItem class with the specified parameters.
        Parameters:
        start - the start value of the ThemeGridRangeItem object.
        end - the end value of the ThemeGridRangeItem object.
        color - the color of the item of the ThemeGridRangeItem in grid ranges map.
      • ThemeGridRangeItem

        public ThemeGridRangeItem(double start,
                                  double end,
                                  Color color,
                                  java.lang.String caption)
        Initializes a new instance of the ThemeGridRangeItem class with the specified parameters.
        Parameters:
        start - the start value of the ThemeGridRangeItem object.
        end - the end value of the ThemeGridRangeItem object.
        color - the color of the item of the ThemeGridRangeItem in grid ranges map.
        caption - the caption of the ThemeGridRangeItem object in grid ranges map.
      • ThemeGridRangeItem

        public ThemeGridRangeItem(ThemeGridRangeItem themeGridRangeItem)
        Copy constructor, initializes a new instance of the class which is identical with the specified ThemeGridRangeItem object.
        Parameters:
        themeGridRangeItem - The specified ThemeGridRangeItem object.
    • Method Detail

      • getStart

        public double getStart()
        return the start value of the ThemeGridRangeItem object.

        Note: If the ThemeGridRangeItem object is the first item, the start value is the minimum value of the range. If the index of the ThemeGridRangeItem object is greater than one, the start value of the item must be identical with the end value of the previous item; otherwise an exception will be thrown .

        Returns:
        The start of ThemeGridRangeItem. The default is -3.40282346638529E+38
      • setStart

        public void setStart(double start)
        Set the start value of the ThemeGridRangeItem object.

        Note: If the ThemeGridRangeItem object is the first item, the start value is the minimum value of the range. If the index of the ThemeGridRangeItem object is greater than one, the start value of the item must be identical with the end value of the previous item; otherwise an exception will be thrown .

        Parameters:
        start - the start value of the ThemeGridRangeItem object.
      • getEnd

        public double getEnd()
        return the end value of the ThemeGridRangeItem object.

        If this item is the last one among the ranges, its end value is the maximum value of all ranges; if this item is not the last one, its end value must be the same as the start value of the next item, or the system will throw an exception.

        Returns:
        The end of ThemeGridRangeItem. The default is 3.40282346638529E+38
      • setEnd

        public void setEnd(double end)
        Set the end value of the ThemeGridRangeItem object.

        If this item is the last one among the ranges, its end value is the maximum value of all ranges; if this item is not the last one, its end value must be the same as the start value of the next item, or the system will throw an exception.

        Parameters:
        end - Returns the end value of the grid range map item.
      • getColor

        public Color getColor()
        Returns the style for each item of a grid ranges map.
        Returns:
        Returns the style for each item of a grid ranges map. Default is Color.black
      • setColor

        public void setColor(Color color)
        Set the style for each item of a grid ranges map.
        Parameters:
        color - the style for each item of a grid ranges map.
      • getCaption

        public java.lang.String getCaption()
        Returns the name of the grid range map item.
        Returns:
        the caption of the ThemeGridRangeItem object in grid ranges map. Default is UntitledThemeGridRangeItem
      • setCaption

        public void setCaption(java.lang.String value)
        Set the name of the grid range map item.
        Parameters:
        value - the name of the grid range map item.
      • isVisible

        public boolean isVisible()
        Returns whether the grid ranges map item is visible.
        Returns:
        Return true if the caption is visible; otherwise, false. The default is true.
      • setVisible

        public void setVisible(boolean value)
        Sets whether the grid ranges map item is visible.
        Parameters:
        value - whether the caption of ranges theme is visible or not. True is visible, and false is invisible.
      • toString

        public java.lang.String toString()
        Returns the readable strings of a grid ranges thematic map item with a specific format. The format is {Caption="china",Start=10 End=20, Visible=true,Color=()}
        Overrides:
        toString in class java.lang.Object
        Returns:
        The formatted string representing the grid ranges map item.