Class LayerManagerPanel

    • Constructor Detail

      • LayerManagerPanel

        public LayerManagerPanel​(Registry registry)
    • Method Detail

      • isTwoState

        public boolean isTwoState()
        Description copied from interface: Feature
        Indicates whether the feature can be either on or off, without any other states. This is used by the tool bar and menu-bar menus to determine whether the feature's enable/disable button or menu item should be displayed with an indicator that it's either on or off. In the case of a menu the indicator is a check box. In the case of a tool bar button the indicator is a dot above the button.
        Specified by:
        isTwoState in interface Feature
        Overrides:
        isTwoState in class AbstractFeature
        Returns:
        true if the feature has only two states, otherwise off.
      • expandGroup

        public void expandGroup​(java.lang.String groupName)
        Description copied from interface: LayerManager
        Expands the display of the group so that all layers are visibly listed.
        Specified by:
        expandGroup in interface LayerManager
        Parameters:
        groupName - the name of the group.
      • enableGroupSelection

        public void enableGroupSelection​(LayerPath path,
                                         boolean tf)
        Description copied from interface: LayerManager
        Enables or disables the ability to select a group as a whole and therby enable or disable all layers in that group. For some layer groups, such as the base group, it's not appropriate to turn them all on or all off.
        Specified by:
        enableGroupSelection in interface LayerManager
        Parameters:
        path - the path to the group.
        tf - true if group selection should be allowed, false if group selection should not be allowed.
      • treeNodesChanged

        public void treeNodesChanged​(javax.swing.event.TreeModelEvent event)
        Specified by:
        treeNodesChanged in interface javax.swing.event.TreeModelListener
      • handleLayerSelection

        protected void handleLayerSelection​(LayerTreeNode treeNode,
                                            LayerList layerList)
      • updateGroupSelections

        protected void updateGroupSelections()
      • updateGroupSelection

        protected void updateGroupSelection​(LayerTreeNode groupNode)
      • performSmartInsertion

        protected void performSmartInsertion​(LayerTreeNode treeNode,
                                             LayerList layerList)
      • insertAfterPreviousSibling

        protected boolean insertAfterPreviousSibling​(LayerTreeNode treeNode,
                                                     LayerList layerList)
      • insertBeforeSubsequentSibling

        protected boolean insertBeforeSubsequentSibling​(LayerTreeNode treeNode,
                                                        LayerList layerList)
      • treeNodesInserted

        public void treeNodesInserted​(javax.swing.event.TreeModelEvent event)
        Specified by:
        treeNodesInserted in interface javax.swing.event.TreeModelListener
      • treeNodesRemoved

        public void treeNodesRemoved​(javax.swing.event.TreeModelEvent event)
        Specified by:
        treeNodesRemoved in interface javax.swing.event.TreeModelListener
      • treeStructureChanged

        public void treeStructureChanged​(javax.swing.event.TreeModelEvent event)
        Specified by:
        treeStructureChanged in interface javax.swing.event.TreeModelListener
      • getDefaultGroupName

        public java.lang.String getDefaultGroupName()
      • getDefaultGroupPath

        public LayerPath getDefaultGroupPath()
        Description copied from interface: LayerManager
        Returns a path to the group node of the default layer group, which is the group holding the base layers.
        Specified by:
        getDefaultGroupPath in interface LayerManager
        Returns:
        a path to the default group node.
      • findLayerByTitle

        public Layer findLayerByTitle​(java.lang.String layerTitle,
                                      java.lang.String groupTitle)
        Specified by:
        findLayerByTitle in interface LayerManager
      • removeLayer

        public void removeLayer​(LayerNode layerNode)
      • getLayerFromPath

        public Layer getLayerFromPath​(LayerPath path)
        Description copied from interface: LayerManager
        Returns the layer at the end of a specified path.
        Specified by:
        getLayerFromPath in interface LayerManager
        Parameters:
        path - the path to the layer.
        Returns:
        the layer at the end of the path, or null if no layer is there.
      • createLayer

        protected void createLayer​(LayerNode layerNode)