/** Sets the layer-selection checkboxes to replicate the "current view". */ public void setToDefault() { final Zone zone = TabletopTool.getFrame().getCurrentZoneRenderer().getZone(); if (this == ExportLayers.LAYER_FOG) { ExportLayers.LAYER_FOG.setChecked(zone.hasFog()); } else if (this == ExportLayers.LAYER_VISIBILITY) { ExportLayers.LAYER_VISIBILITY.setChecked(zone.getVisionType() != Zone.VisionType.OFF); } else { setChecked(true); } }
public static void setDefaultChecked() { // everything defaults to 'on' since the layers don't really have on/off capability // outside of this screenshot code for (ExportLayers layer : ExportLayers.values()) { layer.setChecked(true); } // however, some psuedo-layers do have a state, so set that appropriately final Zone zone = TabletopTool.getFrame().getCurrentZoneRenderer().getZone(); ExportLayers.LAYER_VISIBILITY.setChecked(zone.getVisionType() != Zone.VisionType.OFF); ExportLayers.LAYER_FOG.setChecked(zone.hasFog()); }