示例#1
0
  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();
  }
示例#2
0
  @Override
  protected void outlineShape(Graphics graphics) {
    if (borderColor != null) {
      graphics.setForegroundColor(borderColor);
    }

    // delegate outlining the shape to the painter
    painter.outlineShape(graphics, getBounds());
  }
示例#3
0
 @Override
 protected void fillShape(Graphics graphics) {
   // delegate filling the shape to the painter
   painter.fillShape(graphics, getBounds());
 }
示例#4
0
 @Override
 public Insets getInsets() {
   return painter.getInsets();
 }