public WiresTreeNodeConnector() { setStrokeColor( ShapesUtils.RGB_STROKE_SHAPE ) .setStrokeWidth( ShapesUtils.RGB_STROKE_WIDTH_SHAPE ) .setFillColor( ShapesUtils.RGB_FILL_SHAPE ) .setLineCap( LineCap.ROUND ) .setStrokeWidth( 3 ) .setDraggable( false ); }
@Override public Line create(JSONObject node, ValidationContext ctx) { return new Line(node); } }
/** * Gets the end-points of this line. * * @return Point2DArray */ public Point2DArray getPoints() { return getAttributes().getPoints(); }
double previousLineWidth = line.getStrokeWidth(); line.setStrokeWidth(previousLineWidth / scale); DashArray previousDashes = line.getDashArray(); line.setDashArray(dashes); Point2DArray points = line.getPoints(); line.drawWithTransforms(context); line.setStrokeWidth(previousLineWidth); // restore stroke width line.setDashArray(previousDashes);
public boolean prepare(Context2D context, Attributes attr, double alpha) Point2DArray list = getPoints(); DashArray dash = getDashArray(); if (setStrokeParams(context, attr, alpha)) drawDashedLine(context, p0.getX(), p0.getY(), p1.getX(), p1.getY(), data, attr.getStrokeWidth() / 2);
/** * Sets the end-points of this line. * The points should be a 2-element {@link Point2DArray} * * @param points * @return this Line */ public Line setPoints(Point2DArray points) { getAttributes().setPoints(points); return this; }