com.supermap.mapping

Class ThemeLabelItem

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


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

    The label theme map is labeled by the points,lines and regions. And the label maps are allowed to set the range mode, where, the label has the same style in the same range and each range is the Themelabelitem object and each themelabelitem has its caption, style, start value and end value.

    The extent represented by each range is [Start, End). For example: the range point of label map has two items, which represent the range extent [0, 5) and [5, 10) respectively. Then, you need to set as follows: ThemeLabelItem[0].setStart(0), ThemeLabelItem[0].setEnd(5), ThemeLabelItem[1].setStart(5), ThemeLabelItem[1].setEnd(10).

    • Constructor Summary

      Constructors 
      Constructor and Description
      ThemeLabelItem()
      Initializes a new instance of the ThemeLabelItem class.
      ThemeLabelItem(double start, double end, TextStyle style)
      Initializes a new instance of the ThemeLabelItem structure with the specified start value, end value and style of the ThemeLabelItem object.
      ThemeLabelItem(double start, double end, TextStyle style, java.lang.String caption)
      Initializes a new instance of the ThemeLabelItem structure with the specified start value, end value, style and caption of the ThemeLabelItem object.
      ThemeLabelItem(ThemeLabelItem themeLabelItem)
      Copy constructor, initializes a new instance of the class which is identical with the specified ImportSettingGML object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCaption()
      Returns the caption of the label graph item.
      double getEnd()
      Returns the end range value for the label map item.
      double getStart()
      Returns the start range value for the label map item.
      TextStyle getStyle()
      Returns the display style of the label map item.
      boolean isVisible()
      Returns whether the label map item is visible.
      void setCaption(java.lang.String caption)
      Sets the caption of the label graph item.
      void setEnd(double end)
      Sets the end range value for the label map item.
      void setStart(double start)
      Sets the start range value for the label map item.
      void setStyle(TextStyle textStyle)
      Sets the display style of the label map item.
      void setVisible(boolean value)
      Sets whether the label map item is visible.
      java.lang.String toString()
      Returns the readable strings of a lables thematic map item with a specific format.
      • Methods inherited from class java.lang.Object

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

      • ThemeLabelItem

        public ThemeLabelItem()
        Initializes a new instance of the ThemeLabelItem class.
      • ThemeLabelItem

        public ThemeLabelItem(double start,
                              double end,
                              TextStyle style)
        Initializes a new instance of the ThemeLabelItem structure with the specified start value, end value and style of the ThemeLabelItem object.
        Parameters:
        start - The start value of the specified label map item.
        end - Returns the end value of the label map item.
        style - The display style of the ThemeLabelItem object.
      • ThemeLabelItem

        public ThemeLabelItem(double start,
                              double end,
                              TextStyle style,
                              java.lang.String caption)
        Initializes a new instance of the ThemeLabelItem structure with the specified start value, end value, style and caption of the ThemeLabelItem object.
        Parameters:
        start - The start value of the specified label map item.
        end - Returns the end value of the label map item.
        style - The display style of the ThemeLabelItem object.
        caption - The caption of the ThemeLabelItem object.
      • ThemeLabelItem

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

      • getCaption

        public java.lang.String getCaption()
        Returns the caption of the label graph item.
        Returns:
        The caption of the ThemeGraphItem.
        Default:
        The default value is "UntitledThemeLabelItem".
      • setCaption

        public void setCaption(java.lang.String caption)
        Sets the caption of the label graph item.
        Parameters:
        caption - The caption of the ThemeLabelItem object.
      • getStyle

        public TextStyle getStyle()
        Returns the display style of the label map item.
        Returns:
        The display style of the label map item.
        Default:
        The default value is {Alignment=TopLeft,BackColor=Color [A=255, R=0, G=0, B=0],BackOpaque=False,Bold=False,FontHeight=6,FontWidth=0,ForeColor=Color [A=255, R=0, G=0, B=0],IsSizeFixed=True,Italic=False,Outline=False,Rotation=0,Shadow=False,Strikeout=False,Underline=False,Weight=400}.
      • setStyle

        public void setStyle(TextStyle textStyle)
        Sets the display style of the label map item.
        Parameters:
        textStyle - The display style of the specified label map item.
      • isVisible

        public boolean isVisible()
        Returns whether the label map item is visible.
        Returns:
        Whether the label map item is visible.
        Default:
        The default value is true.
      • setVisible

        public void setVisible(boolean value)
        Sets whether the label map item is visible.
        Parameters:
        value - Whether the label map item is visible.
      • setStart

        public void setStart(double start)
        Sets the start range value for the label map item.

        Note: If the ThemeLabelItem object is the first item, the start value is the minimum value of the range. If the index of the ThemeLabelItem object is larger 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 range value for the specified label map item.
      • setEnd

        public void setEnd(double end)
        Sets the end range value for the label map item.

        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 - The end range value for the specified label map item.
      • getStart

        public double getStart()
        Returns the start range value for the label map item.

        Note: If the ThemeLabelItem object is the first item, the start value is the minimum value of the range. If the index of the ThemeLabelItem object is larger 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 range value for the label map item.
        Default:
        The default value is -3.4028235e+038
      • getEnd

        public double getEnd()
        Returns the end range value for the label map item.

        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 value of the ThemeLabelItem object in label map.
        Default:
        The default value is -3.4028235e+038
      • toString

        public java.lang.String toString()
        Returns the readable strings of a lables thematic map item with a specific format. The format is {Caption="china",Start=10 End=20, Visible=true,Style={name=,width=,height=,color=()} }.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The formatted string representing the current label map item.