@Nonnull public static Path createArrowToTop(int lineLength) { Path arrowHeadPath = new Path(); arrowHeadPath.getStyleClass().add("arrow"); arrowHeadPath.getElements().add(new MoveTo(0, -ARROW_LENGTH)); //start @ top of arrow arrowHeadPath.getElements().add(new LineTo(ARROW_WIDTH_HALF, 0)); //bottom right arrowHeadPath.getElements().add(new LineTo(-ARROW_WIDTH_HALF, 0)); //bottom left arrowHeadPath.getElements().add(new LineTo(0, -ARROW_LENGTH)); //back to top of arrow arrowHeadPath.getElements().add(new MoveTo(0, 0)); //middle bottom arrowHeadPath.getElements().add(new LineTo(0, lineLength)); //middle bottom return arrowHeadPath; } }
private Node createInsertionMarker(double lineHeight) { double lineWidth = lineHeight / 15d; double arrowSide = lineHeight / 2d; double arrowHeight = arrowSide / 2d; Path marker = new Path(); marker.getElements().add(new MoveTo(- arrowSide / 2d, - arrowHeight)); marker.getElements().add(new LineTo(+ arrowSide / 2d, - arrowHeight)); marker.getElements().add(new LineTo(+ lineWidth / 2d, 0)); marker.getElements().add(new LineTo(+ lineWidth / 2d, lineHeight)); marker.getElements().add(new LineTo(+ arrowSide / 2d, lineHeight + arrowHeight)); marker.getElements().add(new LineTo(- arrowSide / 2d, lineHeight + arrowHeight)); marker.getElements().add(new LineTo(- lineWidth / 2d, lineHeight)); marker.getElements().add(new LineTo(- lineWidth / 2d, 0)); marker.getElements().add(new ClosePath()); marker.setVisible(false); marker.getStyleClass().add("insertion-marker"); //$NON-NLS-1$ marker.setMouseTransparent(true); return marker; }
protected void initStyle() { connectionPath.getStyleClass().setAll( "vnode-new-connection", "vnode-new-connection-" + getSender().getType()); receiverConnectorUI.getStyleClass().setAll( "vnode-new-connection-receiver", "vnode-new-connection-receiver-" + getSender().getType()); receiverConnectorUI.setStrokeWidth(3); // }
protected void initStyle() { connectionPath.getStyleClass().setAll( "vnode-connection", "vnode-connection-" + type); receiverConnectorUI.getStyleClass().setAll( "vnode-connection-receiver", "vnode-connection-receiver-" + type); getReceiverUI().setFill(new Color(0, 1.0, 0, 0.0)); getReceiverUI().setStroke(new Color(0, 1.0, 0, 0.0)); getReceiverUI().setStrokeWidth(3); }
path.getStyleClass().add("border"); //$NON-NLS-1$ path.setManaged(false);