@Override protected void doPaint(Graphics2D g, Object component, int width, int height) { Shape shape = provideShape(g, component, 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; } // background // border // leave the clip to support masking other painters ShapeUtils.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); }
@Override protected void doPaint(Graphics2D g, Object component, int width, int height) { Shape shape = provideShape(g, component, 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; } // background // border // leave the clip to support masking other painters ShapeUtils.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); }
@Override protected void doPaint(Graphics2D g, Object component, int width, int height) { Shape shape = provideShape(g, component, 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; } // background // border // leave the clip to support masking other painters ShapeUtils.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); }
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); }