g2.fill(menuIconShape); g2.drawImage(menuIconImage, (int)Math.round(menuIconShape.getX()), (int)Math.round(menuIconShape.getY()),null);
    public void paint(PPaintContext context)    {        Graphics2D g2 = context.getGraphics();        Paint oldPaint = g2.getPaint();        Font oldFont = g2.getFont();        Color oldColor = g2.getColor();        g2.setPaint(Color.yellow);        g2.fill(border);        g2.setPaint(new Color(153,153,153,128));        g2.drawImage(getImage(),0,0,null);        g2.fill(openIconShape);        g2.drawImage(openIconImage,                     (int)Math.round(openIconShape.getX()),                     (int)Math.round(openIconShape.getY()),null);        g2.fill(closeIconShape);        g2.drawImage(closeIconImage,                     (int)Math.round(closeIconShape.getX()),                     (int)Math.round(closeIconShape.getY()),null);        g2.fill(annotateIconShape);        g2.drawImage(annotateIconImage,                     (int)Math.round(annotateIconShape.getX()),                     (int)Math.round(annotateIconShape.getY()),null);        g2.setFont(nameFont);        g2.setColor(Color.yellow);                String wellName =            (String)parentThumbnail.getModel().getValue(UIConstants.WELL_KEY_STRING);                    StringPainter.drawString(g2,wellName,4,26);        g2.setFont(oldFont);        g2.setColor(oldColor);                if(multipleModeOn)        {            g2.setPaint(Color.yellow);            g2.setColor(Color.yellow);            String whichSelected =                (parentThumbnail.getMultipleImageIndex()+1)                + "/"                + (String.valueOf(parentThumbnail.getMultipleImageSize()));                            Rectangle2D selectedBounds =                g2.getFontMetrics(multiFont).getStringBounds(whichSelected,g2);                        Rectangle2D totalBounds =                getBounds().getBounds2D();                        g2.setFont(multiFont);            StringPainter.drawString(g2,whichSelected,                          (float)((totalBounds.getWidth()-selectedBounds.getWidth())/2),                          (float)(totalBounds.getHeight()-selectedBounds.getHeight()-5));                        g2.fill(prevImageShape);            g2.fill(nextImageShape);            g2.setFont(oldFont);            g2.setPaint(oldPaint);            g2.setColor(oldColor);                    }                Rectangle2D bounds = getBounds().getBounds2D();               /*        double width = bounds.getWidth();        double height = bounds.getHeight();        DrawStyle noteStyle = DrawStyles.ANNOTATION_NODE_STYLE;        DrawStyle oldStyle = noteStyle.applyStyle(g2);        PaintShapeGenerator generator = PaintShapeGenerator.getInstance();        Shape note = generator.getAnnotationNoteShape(width-32,height-38);        Shape glass = generator.getOuterMagnifierShape(width-32,height-68);        g2.fill(note);        g2.draw(note);        g2.fill(glass);        g2.draw(glass);        oldStyle.applyStyle(g2);        */    }