if (currentMap != null && currentLayer >= 0) { MapLayer layer = getCurrentLayer(); layer.setOpacity(opacitySlider.getValue() / 100.0f);
if (e.getSource() == opacitySlider) { if (currentMap != null && currentLayer >= 0) { MapLayer layer = getCurrentLayer(); layer.setOpacity(opacitySlider.getValue() / 100.0f);
    public void stateChanged(ChangeEvent e) {        // At the moment, this can only be movement in the opacity slider        if (currentMap != null && currentLayer >= 0) {            MapLayer layer = getCurrentLayer();            layer.setOpacity(opacitySlider.getValue() / 100.0f);            /*MapLayerStateEdit mlse = new MapLayerStateEdit(currentMap);            mlse.setPresentationName("Opacity Change");            undoSupport.postEdit(mlse);*/        }    }