Class WMSLayerTree
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.imagery.WMSLayerTree
-
public class WMSLayerTree extends 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 JTree
layerTree
private List<LayerDetails>
selectedLayers
private DefaultTreeModel
treeData
private 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(MutableTreeNode parent, Collection<LayerDetails> layers)
JTree
getLayerTree()
Returns theJTree
.List<LayerDetails>
getSelectedLayers()
Returns the list of selected layers.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(Collection<LayerDetails> layers)
Updates the list of WMS layers.
-
-
-
Field Detail
-
treeRootNode
private final MutableTreeNode treeRootNode
-
treeData
private final DefaultTreeModel treeData
-
selectedLayers
private final List<LayerDetails> selectedLayers
-
checkBounds
private LatLon checkBounds
-
-
Constructor Detail
-
WMSLayerTree
public WMSLayerTree()
Constructs a newWMSLayerTree
.
-
-
Method Detail
-
getTreeRootNode
public MutableTreeNode getTreeRootNode()
Returns the root node.- Returns:
- The root node
-
getLayerTree
public JTree getLayerTree()
Returns theJTree
.- Returns:
- The
JTree
-
getSelectedLayers
public 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(MutableTreeNode parent, 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(Collection<LayerDetails> layers)
Updates the list of WMS layers.- Parameters:
layers
- The list of layers to add to the root node
-
-