graph.drawImage(tileManager.wreckMarkerFor(entity), 0, 0, this);
Image wreck = tileManager.wreckMarkerFor(entity); if ( null != wreck ) { graph.drawImage( wreck, 0, 0, this ); }
        public void prepare() {            // figure out size            String shortName = entity.getShortName();            Font font = new Font("SansSerif", Font.PLAIN, 10);            Rectangle modelRect = new Rectangle(47, 55,                                 getFontMetrics(font).stringWidth(shortName) + 1,                                 getFontMetrics(font).getAscent());            // create image for buffer            Image tempImage;            Graphics graph;            try {                tempImage = createImage(bounds.width, bounds.height);                graph = tempImage.getGraphics();            } catch (NullPointerException ex) {                // argh!  but I want it!                return;            }            // fill with key color            graph.setColor(new Color(TRANSPARENT));            graph.fillRect(0, 0, bounds.width, bounds.height);            // draw entity image            graph.drawImage(tileManager.wreckMarkerFor(entity), 0, 0, this);            // draw box with shortName            Color text = Color.lightGray;            Color bkgd = Color.darkGray;            Color bord = Color.black;            graph.setFont(font);            graph.setColor(bord);            graph.fillRect(modelRect.x, modelRect.y, modelRect.width, modelRect.height);            modelRect.translate(-1, -1);            graph.setColor(bkgd);            graph.fillRect(modelRect.x, modelRect.y, modelRect.width, modelRect.height);            graph.setColor(text);            graph.drawString(shortName, modelRect.x + 1, modelRect.y + modelRect.height - 1);            // create final image            this.image = createImage(new FilteredImageSource(tempImage.getSource(),                    new KeyAlphaFilter(TRANSPARENT)));        }