/** * Sets the active tab of the dashboard to the layer controls and makes the first layer (TODO: fix * that!) of the given ViewManager the active layer. * * @param vm The ViewManager to make active. * @param doShow Whether or not the layer controls should become the active tab in the dashboard. */ private void focusLayerControlsOn(ViewManager vm, boolean doShow) { List<DisplayControlImpl> controls = vm.getControlsForLegend(); if (controls != null && !controls.isEmpty()) { DisplayControlImpl control = controls.get(0); if (doShow) { GuiUtils.showComponentInTabs(control.getOuterContents(), false); } } }