Class WMSLayerTree
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.imagery.WMSLayerTree
-
public class WMSLayerTree extends java.lang.Object
The layer tree of a WMS server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classWMSLayerTree.LayerTreeCellRendererprivate classWMSLayerTree.WMSTreeSelectionListener
-
Field Summary
Fields Modifier and Type Field Description private LatLoncheckBoundsprivate javax.swing.JTreelayerTreeprivate java.util.List<LayerDetails>selectedLayersprivate javax.swing.tree.DefaultTreeModeltreeDataprivate javax.swing.tree.MutableTreeNodetreeRootNode
-
Constructor Summary
Constructors Constructor Description WMSLayerTree()Constructs a newWMSLayerTree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddLayersToTreeData(javax.swing.tree.MutableTreeNode parent, java.util.Collection<LayerDetails> layers)javax.swing.JTreegetLayerTree()Returns theJTree.java.util.List<LayerDetails>getSelectedLayers()Returns the list of selected layers.javax.swing.tree.MutableTreeNodegetTreeRootNode()Returns the root node.voidsetCheckBounds(LatLon checkBounds)Set coordinate to check layer bounds when updating the tree.voidupdateTree(WMSImagery wms)Updates the whole tree with the given WMS imagery info.voidupdateTreeList(java.util.Collection<LayerDetails> layers)Updates the list of WMS layers.
-
-
-
Field Detail
-
treeRootNode
private final javax.swing.tree.MutableTreeNode treeRootNode
-
treeData
private final javax.swing.tree.DefaultTreeModel treeData
-
layerTree
private final javax.swing.JTree layerTree
-
selectedLayers
private final java.util.List<LayerDetails> selectedLayers
-
checkBounds
private LatLon checkBounds
-
-
Constructor Detail
-
WMSLayerTree
public WMSLayerTree()
Constructs a newWMSLayerTree.
-
-
Method Detail
-
getTreeRootNode
public javax.swing.tree.MutableTreeNode getTreeRootNode()
Returns the root node.- Returns:
- The root node
-
getLayerTree
public javax.swing.JTree getLayerTree()
Returns theJTree.- Returns:
- The
JTree
-
getSelectedLayers
public java.util.List<LayerDetails> getSelectedLayers()
Returns the list of selected layers.- Returns:
- the list of selected layers
-
setCheckBounds
public void setCheckBounds(LatLon checkBounds)
Set coordinate to check layer bounds when updating the tree.- Parameters:
checkBounds- the coordinate
-
addLayersToTreeData
void addLayersToTreeData(javax.swing.tree.MutableTreeNode parent, java.util.Collection<LayerDetails> layers)
-
updateTree
public void updateTree(WMSImagery wms)
Updates the whole tree with the given WMS imagery info. All previous content is removed- Parameters:
wms- The imagery info for a given WMS server
-
updateTreeList
public void updateTreeList(java.util.Collection<LayerDetails> layers)
Updates the list of WMS layers.- Parameters:
layers- The list of layers to add to the root node
-
-