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 class
WMSLayerTree.LayerTreeCellRenderer
private class
WMSLayerTree.WMSTreeSelectionListener
-
Field Summary
Fields Modifier and Type Field Description private LatLon
checkBounds
private javax.swing.JTree
layerTree
private java.util.List<LayerDetails>
selectedLayers
private javax.swing.tree.DefaultTreeModel
treeData
private javax.swing.tree.MutableTreeNode
treeRootNode
-
Constructor Summary
Constructors Constructor Description WMSLayerTree()
Constructs a newWMSLayerTree
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addLayersToTreeData(javax.swing.tree.MutableTreeNode parent, java.util.Collection<LayerDetails> layers)
javax.swing.JTree
getLayerTree()
Returns theJTree
.java.util.List<LayerDetails>
getSelectedLayers()
Returns the list of selected layers.javax.swing.tree.MutableTreeNode
getTreeRootNode()
Returns the root node.void
setCheckBounds(LatLon checkBounds)
Set coordinate to check layer bounds when updating the tree.void
updateTree(WMSImagery wms)
Updates the whole tree with the given WMS imagery info.void
updateTreeList(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
-
-