} else if (layer.getClass() == SelectionLayer.class) { ((Graphics2D)g).setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_ATOP, 0.3f)); g.setColor(((SelectionLayer)layer).getHighlightColor());
    public void paint(Graphics g) {        Graphics2D g2d = (Graphics2D)g;        Iterator li = myMap.getLayers();        MapLayer layer;        double currentZoom = zoom;        Rectangle clip = g.getClipBounds();		g2d.setStroke(new BasicStroke(2.0f));		        // Do an initial fill        g.setColor(new Color(64, 64, 64));        g.fillRect(clip.x, clip.y, clip.width, clip.height);        while (li.hasNext()) {        	if((layer = (MapLayer)li.next()) != null) {	            float opacity = layer.getOpacity();	            if (layer.isVisible() && opacity > 0.0f) {	                if (opacity < 1.0f) {	                    g2d.setComposite(AlphaComposite.getInstance(	                                AlphaComposite.SRC_ATOP, opacity));	                } else if (layer.getClass() == SelectionLayer.class) {						((Graphics2D)g).setComposite(AlphaComposite.getInstance(																   AlphaComposite.SRC_ATOP, 0.3f));						g.setColor(((SelectionLayer)layer).getHighlightColor());	                } else {	                    g2d.setComposite(AlphaComposite.SrcOver);	                }	                paint(g, layer, currentZoom);	            }        	}        }        if (getMode(PF_GRIDMODE)) {			g2d.setStroke(new BasicStroke());            g2d.setComposite(AlphaComposite.SrcOver);            paintGrid(g, currentZoom);        }		    }