Class KmlContainer

  • Direct Known Subclasses:
    KmlDocument, KmlFolder

    public abstract class KmlContainer
    extends KmlNode
    A KML container element holds one or more KML nodes and allows the creation of nested hierarchies.
    Since:
    100.4.0
    • Method Detail

      • getListItemType

        public KmlContainer.ListItemType getListItemType()
        Gets the container's list item type, which determines how visibility and selection should work in a table of contents, enabling either single or multiple selection of child nodes when shown in a list (for example, a legend).

        See 'listItemType' attribute of 'ListStyle' in the KML specification for more information. When the item type is KmlContainer.ListItemType.RADIO_FOLDER, making a node visible will hide its sibling nodes.

        Returns:
        the container's list item type.
        Since:
        100.4.0
        See Also:
        setListItemType(ListItemType)
      • setListItemType

        public void setListItemType​(KmlContainer.ListItemType listItemType)
        Sets the container's list item type, which determines how visibility and selection should work in a table of contents, enabling either single or multiple selection of child nodes when shown in a list (for example, a legend).

        See 'listItemType' attribute of 'ListStyle' in the KML specification for more information. When the item type is KmlContainer.ListItemType.RADIO_FOLDER, making a node visible will hide its sibling nodes. Sets the KML container's list item type.

        Parameters:
        listItemType - a ListItemType
        Throws:
        java.lang.IllegalArgumentException - if listItemType is null
        Since:
        100.6.0
        See Also:
        getListItemType()
      • getChildNodes

        public java.util.List<KmlNode> getChildNodes()
        Gets the KML container's child nodes. If this container node is refreshed the list will be invalidated and this method should be called again to get the new list.
        Returns:
        a modifiable list of child nodes
        Since:
        100.4.0
      • isOpen

        public boolean isOpen()
        Gets a value indicating that, when shown in a tree view, the node representing the KML container should be open.
        Returns:
        true if the node is open, false otherwise
        Since:
        100.4.0
      • setOpen

        public void setOpen​(boolean open)
        When shown in a tree view, the node representing the KML container should be open.
        Parameters:
        open - true to set the node open, false otherwise
        Since:
        100.4.0
      • isPartiallyVisible

        public boolean isPartiallyVisible()
        Gets a value indicating that the container node has mixed visibility.

        A KmlNode is considered partially visible if some of its child KmlNode are visible and some are not. Otherwise, it returns false if all child KmlNodes are either visible or invisible.

        Returns:
        true if the container node is partially visible, false otherwise
        Since:
        100.4.0