com.supermap.data

Class SymbolGroup



  • public class SymbolGroup
    extends InternalHandleDisposable
    The SymbolGroup class.

    This class provides a logical structure for managing groups and symbols in symbol libraries. Operations such as importing and exporting symbols are provided by the SymbolLibrary class.

    Below is the illustration for the structure of marker, line, and fill symbol libraries.

    The structure of symbol libraries is similar to the structure of Windows explorer. In the root of the disk, there can be 0 or more folders or files, with each of the folders containing 0 or more folders or files. The root group, symbol groups, and symbols of the symbol library are similar to the root of the disk, folders, and files respectively. The root group can contain 0 or more symbol groups or symbols, with each of the symbol groups containing 0 or more symbols groups and symbols.

    As shown below, the red dashed rectangle indicates the root group of the symbol library. The root group is a symbol group with the highest level in the symbol library. Each symbol group, including the root group, can contain 0 or more symbol groups or symbols. All symbol groups in a group compose a object and each symbol group can have only one object at most. The object is used to manage (create or delete) all symbol groups in it. We can see that the yellow rectangle indicates a symbol group, corresponding to a , that contains multiple symbol groups and symbols, which compose a object. The symbol group in the yellow rectangle is the parent group of the three symbol groups in the pink rectangle. The three symbol groups in the pink rectangle are the child groups of the symbol group in the yellow rectangle.

    Note: Groups and child groups are used to store symbols logically in a tree hierarchy, which would bring convenience for symbol management and usage.

    In summary, a contains a unique SymbolLibrary object, which can contain at most 1 SymbolGroup object and 0 or several Symbol objects. The SymbolGroup object is the collection of SymbolGroups objects, which contributes to the tree hierarchical management of symbols.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Release the resource occupy by this object.
      Symbol get(int index)
      Returns the Symbol object with the specified index in the SymbolGroup object.
      SymbolGroups getChildGroups()
      Returns the child groups of this SymbolGroup object.
      int getCount()
      Returns the count of the Symbol objects of this SymbolGroup object.
      SymbolLibrary getLibrary()
      Returns the SymbolLibrary object which is related with the SymbolGroup object.
      java.lang.String getName()
      Returns the name of the SymbolGroup object.
      SymbolGroup getParent()
      Returns the parent group of this SymbolGroup object.
      int indexOf(int id)
      Returns the index of the Symbol object in the SymbolGroup object with the specified ID.
      void setName(java.lang.String name)
      Sets a name
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getParent

        public SymbolGroup getParent()
        Returns the parent group of this SymbolGroup object. The root group of a symbol library doesn't have a parent group.

        Below is the illustration for the structure of marker, line, and fill symbol libraries.

        The structure of symbol libraries is similar to the structure of Windows explorer. In the root of the disk, there can be 0 or more folders or files, with each of the folders containing 0 or more folders or files. The root group, symbol groups, and symbols of the symbol library are similar to the root of the disk, folders, and files respectively. The root group can contain 0 or more symbol groups or symbols, with each of the symbol groups containing 0 or more symbols groups and symbols.

        As shown below, the red dashed rectangle indicates the root group of the symbol library. The root group is a symbol group with the highest level in the symbol library. Each symbol group, including the root group, can contain 0 or more symbol groups or symbols. All symbol groups in a group compose a object and each symbol group can have only one object at most. The object is used to manage (create or delete) all symbol groups in it. We can see that the yellow rectangle indicates a symbol group, corresponding to a , that contains multiple symbol groups and symbols, which compose a object. The symbol group in the yellow rectangle is the parent group of the three symbol groups in the pink rectangle. The three symbol groups in the pink rectangle are the child groups of the symbol group in the yellow rectangle.

        Note: Groups and child groups are used to store symbols logically in a tree hierarchy, which would bring convenience for symbol management and usage.

        In summary, a contains a unique SymbolLibrary object, which can contain at most 1 SymbolGroup object and 0 or several Symbol objects. The SymbolGroup object is the collection of SymbolGroups objects, which contributes to the tree hierarchical management of symbols.

        Returns:
        the parent group
      • getChildGroups

        public SymbolGroups getChildGroups()
        Returns the child groups of this SymbolGroup object.

        Below is the illustration for the structure of marker, line, and fill symbol libraries.

        The structure of symbol libraries is similar to the structure of Windows explorer. In the root of the disk, there can be 0 or more folders or files, with each of the folders containing 0 or more folders or files. The root group, symbol groups, and symbols of the symbol library are similar to the root of the disk, folders, and files respectively. The root group can contain 0 or more symbol groups or symbols, with each of the symbol groups containing 0 or more symbols groups and symbols.

        As shown below, the red dashed rectangle indicates the root group of the symbol library. The root group is a symbol group with the highest level in the symbol library. Each symbol group, including the root group, can contain 0 or more symbol groups or symbols. All symbol groups in a group compose a object and each symbol group can have only one object at most. The object is used to manage (create or delete) all symbol groups in it. We can see that the yellow rectangle indicates a symbol group, corresponding to a , that contains multiple symbol groups and symbols, which compose a object. The symbol group in the yellow rectangle is the parent group of the three symbol groups in the pink rectangle. The three symbol groups in the pink rectangle are the child groups of the symbol group in the yellow rectangle.

        Note: Groups and child groups are used to store symbols logically in a tree hierarchy, which would bring convenience for symbol management and usage.

        In summary, a contains a unique SymbolLibrary object, which can contain at most 1 SymbolGroup object and 0 or several Symbol objects. The SymbolGroup object is the collection of SymbolGroups objects, which contributes to the tree hierarchical management of symbols.

        Returns:
        the child groups of this SymbolGroup object.
      • getName

        public java.lang.String getName()
        Returns the name of the SymbolGroup object. If the name has existed in the parent group of this SymbolGroup object it will throw an exception.
        Returns:
        the name of the group
      • get

        public Symbol get(int index)
        Returns the Symbol object with the specified index in the SymbolGroup object.
        Parameters:
        index - the specified index
        Returns:
        the Symbol object with the specified index in the SymbolGroup object.
      • getLibrary

        public SymbolLibrary getLibrary()
        Returns the SymbolLibrary object which is related with the SymbolGroup object.
        Returns:
        the SymbolLibrary object which is related with the SymbolGroup object.
      • getCount

        public int getCount()
        Returns the count of the Symbol objects of this SymbolGroup object.
        Returns:
        the count of the Symbol objects of this SymbolGroup object.
      • indexOf

        public int indexOf(int id)
        Returns the index of the Symbol object in the SymbolGroup object with the specified ID.
        Parameters:
        id - The ID to be tested.
        Returns:
        The index of the Symbol object in the SymbolGroup object with the specified ID.
      • dispose

        public void dispose()
        Release the resource occupy by this object.
      • setName

        public void setName(java.lang.String name)
        Sets a name
        Parameters:
        name - Name