- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
@Override public Rectangle2D.Double getFigureDrawingArea() { Rectangle2D.Double b = super.getFigureDrawingArea(); // Grow for connectors Geom.grow(b, 10d, 10d); return b; }
@Override protected void drawStroke(Graphics2D g) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularDrawGrowth(this); Geom.grow(r, grow, grow); g.draw(new Line2D.Double(r.x,r.y,r.x+r.width-1,r.y)); } }
@Override protected void drawStroke(final Graphics2D g) { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularDrawGrowth(this); Geom.grow(r, grow, grow); g.draw(r); }
@Override protected void drawFill(final Graphics2D g) { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularFillGrowth(this); Geom.grow(r, grow, grow); g.fill(r); }
@Override protected void drawStroke(final Graphics2D g) { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularDrawGrowth(this); Geom.grow(r, grow, grow); g.draw(r); }
@Override protected void drawFill(Graphics2D g) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularFillGrowth(this); Geom.grow(r, grow, grow); g.fill(r); }
@Override protected void drawStroke(Graphics2D g) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularDrawGrowth(this); Geom.grow(r, grow, grow); g.draw(r); } // SHAPE AND BOUNDS
@Override protected void drawFill(final Graphics2D g) { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularFillGrowth(this); Geom.grow(r, grow, grow); g.fill(r); }
@Override protected void drawFill(Graphics2D g) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularFillGrowth(this); Geom.grow(r, grow, grow); g.fill(r); }
@Override protected void drawStroke(Graphics2D g) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularDrawGrowth(this); Geom.grow(r, grow, grow); g.draw(r); }
@Override public Rectangle2D.Double getFigureDrawingArea() { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularHitGrowth(this); Geom.grow(r, grow, grow); return r; }
@Override public Rectangle2D.Double getDrawingArea() { Rectangle2D.Double r = (Rectangle2D.Double) ellipse.getBounds2D(); double grow = AttributeKeys.getPerpendicularHitGrowth(this); Geom.grow(r, grow+1, grow+1); return r; }
@Override public Rectangle2D.Double getDrawingArea() { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d; Geom.grow(r, grow, grow); return r; }
@Override public Rectangle2D.Double getDrawingArea() { final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone(); final double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d; Geom.grow(r, grow, grow); return r; }
@Override public Rectangle2D.Double getDrawingArea() { Rectangle2D.Double r = (Rectangle2D.Double) roundrect.getBounds2D(); double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1; Geom.grow(r, grow, grow); return r; }
@Override public Rectangle2D.Double getDrawingArea() { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d; Geom.grow(r, grow, grow); return r; } /**
@Override public Rectangle2D.Double getDrawingArea() { Rectangle2D rx = getTransformedShape().getBounds2D(); Rectangle2D.Double r = (rx instanceof Rectangle2D.Double) ? (Rectangle2D.Double) rx : new Rectangle2D.Double(rx.getX(), rx.getY(), rx.getWidth(), rx.getHeight()); if (get(TRANSFORM) == null) { double g = ODGAttributeKeys.getPerpendicularHitGrowth(this) * 2; Geom.grow(r, g, g); } else { double strokeTotalWidth = AttributeKeys.getStrokeTotalWidth(this); double width = strokeTotalWidth / 2d; width *= Math.max(get(TRANSFORM).getScaleX(), get(TRANSFORM).getScaleY()); Geom.grow(r, width, width); } return r; }
/** * Checks if a Point2D.Double is inside the figure. */ @Override public boolean figureContains(Point2D.Double p) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d; Geom.grow(r, grow, grow); return r.contains(p); }
/** * Checks if a Point2D.Double is inside the figure. */ @Override public boolean contains(Point2D.Double p) { Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone(); double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d; Geom.grow(r, grow, grow); return r.contains(p); }
public Rectangle2D.Double getFigureDrawBounds() { double width = AttributeKeys.getStrokeTotalWidth(this) / 2d; if (get(STROKE_JOIN) == BasicStroke.JOIN_MITER) { width *= get(STROKE_MITER_LIMIT); } width++; Rectangle2D.Double r = getBounds(); Geom.grow(r, width, width); return r; }