@Override public double getWidth() { return circle.getRadius() * 2; }
@Override public double getHeight() { return circle.getRadius() * 2; }
/** * Draws this circle * * @param context the {@link Context2D} used to draw this circle. */ @Override public boolean prepare(Context2D context, Attributes attr, double alpha) { context.beginPath(); context.arc(0, 0, getRadius(), 0, Math.PI * 2, true); context.closePath(); return true; }
public WiresExampleTreeNode1( final Circle shape ) { circle = shape; bounding = new Circle( circle.getRadius() + ( BOUNDARY_SIZE / 2 ) ); bounding.setStrokeWidth( BOUNDARY_SIZE ); bounding.setAlpha( 0.1 ); plus.setTextAlign( TextAlign.CENTER ); plus.setTextBaseLine( TextBaseLine.MIDDLE ); plus.setFillColor( ColorName.CORNFLOWERBLUE ); plus.setStrokeColor( ColorName.BLUE ); add( circle ); }