Class OpenStreetMapViewerTree

    • Field Detail

      • m_FixCheckBoxTree

        protected boolean m_FixCheckBoxTree
        whether we still need to fix the CheckBoxTree.
    • Constructor Detail

      • OpenStreetMapViewerTree

        public OpenStreetMapViewerTree​(String name)
        Initializes the tree viewer with the given name.
        Parameters:
        name - the name
      • OpenStreetMapViewerTree

        public OpenStreetMapViewerTree​(String name,
                                       boolean treeVisible)
        Initializes the tree viewer with the given name.
        Parameters:
        name - the name
        treeVisible - whether the tree is visible
    • Method Detail

      • setTreeVisible

        public void setTreeVisible​(boolean visible)
        Overrides:
        setTreeVisible in class org.openstreetmap.gui.jmapviewer.JMapViewerTree
      • fixCheckBoxTree

        protected void fixCheckBoxTree()
        Encloses the CheckBoxTree instance in a scrollpane.
        Parameters:
        tree - the tree to fix
      • setDividerLocation

        public boolean setDividerLocation​(int location)
        Sets the location of the divider. This is passed off to the look and feel implementation, and then listeners are notified. A value less than 0 implies the divider should be reset to a value that attempts to honor the preferred size of the left/top component. After notifying the listeners, the last divider location is updated, via setLastDividerLocation.
        Parameters:
        location - an int specifying a UI-specific value (typically a pixel count)
        Returns:
        true if successfully set
      • getDividerLocation

        public int getDividerLocation()
        Returns the last value passed to setDividerLocation. The value returned from this method may differ from the actual divider location (if setDividerLocation was passed a value bigger than the curent size).
        Returns:
        an integer specifying the location of the divider, -1 if failed to locate splitpane
      • getLayers

        protected void getLayers​(TreeNode node,
                                 List<org.openstreetmap.gui.jmapviewer.AbstractLayer> layers)
        Traverses the tree, recording the layers.
        Parameters:
        node - the current node to inspect
        layers - for storing the layers
      • getLayers

        public List<org.openstreetmap.gui.jmapviewer.AbstractLayer> getLayers()
        Returns all the layers.
        Returns:
        the layers
      • getVisibleLayers

        public List<org.openstreetmap.gui.jmapviewer.AbstractLayer> getVisibleLayers()
        Returns all the visible layers.
        Returns:
        the visible layers
      • isLayerVisible

        public boolean isLayerVisible​(String name)
        Checks whether the specified layer is visible.
        Parameters:
        name - the layer to check
        Returns:
        true if visible