@Override protected Shape provideShape(Graphics2D g, Object comp, int width, int height) { return calculateShape(width,height); } }
@Override protected Shape provideShape(Graphics2D g, Object comp, int width, int height) { return calculateShape(width,height); } }
@Override protected Shape provideShape(Graphics2D g, Object comp, int width, int height) { return calculateShape(width,height); } }
public Shape provideShape(Graphics2D g, T comp, int width, int height) { return calculateShape(width,height); }
protected void doPaint(Graphics2D g, T component, int width, int height) { RectangularShape shape = calculateShape(width, height); switch (getStyle()) { case BOTH: drawBackground(g,shape,width,height); drawBorder(g,shape,width,height); break; case FILLED: drawBackground(g,shape,width,height); break; case OUTLINE: drawBorder(g,shape,width,height); break; case NONE: break; } // background // border // leave the clip to support masking other painters GraphicsUtilities.mergeClip(g,shape); /* Area area = new Area(g.getClip()); area.intersect(new Area(shape));//new Rectangle(0,0,width,height))); g.setClip(area);*/ //g.setClip(shape); }