public ShapePlot(Shape shape) { setTitleHeight(0); setAxisSizeZ(0); ShapePainter painter = new ShapePainter(shape); addPainter(painter, Plot2D.DATA_LAYER); painter.adjustAxis(getAxis()); AxisUtils.padAxis2d(getAxis()); getAxis().validate(); }
@Override protected void outlineShape(Graphics graphics) { if (borderColor != null) { graphics.setForegroundColor(borderColor); } // delegate outlining the shape to the painter painter.outlineShape(graphics, getBounds()); }
@Override protected void fillShape(Graphics graphics) { // delegate filling the shape to the painter painter.fillShape(graphics, getBounds()); }
@Override public Insets getInsets() { return painter.getInsets(); }