private void updateLayerTreeSelection(Layer selectedLayer) { if (selectedLayer != null) { Layer[] layerPath = LayerUtils.getLayerPath(layerTreeModel.getRootLayer(), selectedLayer); if (layerPath.length > 0) { layerTree.setSelectionPath(new TreePath(layerPath)); } else { layerTree.clearSelection(); } } else { layerTree.clearSelection(); } }
private void updateLayerTreeSelection(Layer selectedLayer) { if (selectedLayer != null) { Layer[] layerPath = LayerUtils.getLayerPath(layerTreeModel.getRootLayer(), selectedLayer); if (layerPath.length > 0) { layerTree.setSelectionPath(new TreePath(layerPath)); } else { layerTree.clearSelection(); } } else { layerTree.clearSelection(); } }