@SuppressWarnings("unchecked") public SetConnectionSourceNodeCommand(final Node<? extends View<?>, Edge> sourceNode, final Edge<? extends View, Node> edge, final Connection connection) { this(null != sourceNode ? sourceNode.getUUID() : null, edge.getUUID(), connection); this.sourceNode = sourceNode; this.edge = edge; this.targetNode = edge.getTargetNode(); }
public ActionsToolbox(final Supplier<AbstractCanvasHandler> canvasHandlerSupplier, final Element<?> element, final V view) { this.uuid = element.getUUID(); this.view = view; this.canvasHandlerSupplier = canvasHandlerSupplier; }
@SuppressWarnings("unchecked") private static Node getParent(final Node node) { List<Edge> inEdges = node.getInEdges(); if (null != inEdges && !inEdges.isEmpty()) { for (final Edge edge : inEdges) { if (edge.getContent() instanceof Child) { return edge.getSourceNode(); } } } return null; }
@SuppressWarnings("unchecked") public SetConnectionTargetNodeCommand(final Node<? extends View<?>, Edge> targetNode, final Edge<? extends View, Node> edge, final Connection connection) { this(null != targetNode ? targetNode.getUUID() : null, edge.getUUID(), connection); this.edge = PortablePreconditions.checkNotNull("edge", edge); this.sourceNode = edge.getSourceNode(); this.targetNode = targetNode; }
private ViewConnector getInEdgeViewConnector(Node node) { List<Edge> edges = node.getInEdges(); if (edges != null) { for (Edge edge : edges) { if (edge.getContent() instanceof ViewConnector) { return (ViewConnector) edge.getContent(); } } } return null; }
private ViewConnector getOutEdgeViewConnector(Node node) { List<Edge> edges = node.getOutEdges(); if (edges != null) { for (Edge edge : edges) { if (edge.getContent() instanceof ViewConnector) { return (ViewConnector) edge.getContent(); } } } return null; }
private static boolean isRelationshipConnector(Edge e) { return e.getContent() instanceof Parent || e.getContent() instanceof Child || e.getContent() instanceof Dock; } }
public SafeDeleteNodeCommand(final Node<?, Edge> node, final Options options) { this(node.getUUID(), options); this.node = node; }
private ViewConnector getInEdgeViewConnector(Node node) { List<Edge> edges = node.getInEdges(); if (edges != null) { for (Edge edge : edges) { if (edge.getContent() instanceof ViewConnector) { return (ViewConnector) edge.getContent(); } } } return null; }
private ViewConnector getOutEdgeViewConnector(Node node) { List<Edge> edges = node.getOutEdges(); if (edges != null) { for (Edge edge : edges) { if (edge.getContent() instanceof ViewConnector) { return (ViewConnector) edge.getContent(); } } } return null; }
private static boolean isRelationshipConnector(Edge e) { return e.getContent() instanceof Parent || e.getContent() instanceof Child || e.getContent() instanceof Dock; } }
public UpdateElementPropertyValueCommand(final Node<?, Edge> node, final String propertyId, final Object value) { this(node.getUUID(), propertyId, value); this.node = node; }
public AddDockedNodeCommand(final Node parent, final Node candidate) { this(parent.getUUID(), candidate); this.parent = parent; }
@Override public String toString() { return "MorphNodeCommand [candidate=" + candidate.getUUID() + ", morphTarget=" + morphTarget + "]"; } }
@Override public String toString() { return "AddDockedNodeCommand [parent=" + parentUUID + ", candidate=" + candidate.getUUID() + "]"; } }
public AddChildNodeCommand(final Node<?, Edge> parent, final Node candidate, final Point2D location) { this(parent.getUUID(), candidate, location); this.parent = parent; }