Examples of GraphEdge


Examples of com.google.devtools.depan.model.GraphEdge

  }

  @Override
  public Object getValue(Object element, String property) {
    if (element instanceof GraphEdge) {
      GraphEdge edge = (GraphEdge) element;
      if (property.equals(COL_SOURCE)) {
        return edge.getHead().friendlyString();
      }
      if (property.equals(COL_RELATION)) {
        return edge.getRelation().toString();
      }
      if (property.equals(COL_TARGET)) {
        return edge.getTail().friendlyString();
      }

      EdgeDisplayProperty edgeProps = getDisplayProperty(edge);
      if (property.equals(COL_LINE_STYLE)) {
        return edgeProps.getLineStyle().ordinal();
View Full Code Here

Examples of com.google.devtools.depan.model.GraphEdge

    Object modifiedObject = ((TableItem) element).getData();
    if (!(modifiedObject instanceof GraphEdge)) {
      return;
    }

    GraphEdge edge = (GraphEdge) modifiedObject;
    EdgeDisplayProperty edgeProps = getMutableDisplayProperty(edge);

    if (property.equals(COL_LINE_STYLE) && (value instanceof Integer)) {
      edgeProps.setLineStyle(LineStyle.values()[(Integer) value]);
    } else if (property.equals(COL_ARROWHEAD) && (value instanceof Integer)) {
View Full Code Here

Examples of com.google.devtools.depan.model.GraphEdge

     * @return Text associated with this element for the given index.
     */
    @Override
    public String getColumnText(Object element, int columnIndex) {
      if (element instanceof GraphEdge) {
        GraphEdge edge = (GraphEdge) element;
        EdgeDisplayProperty edgeProps = getDisplayProperty(edge);
        switch (columnIndex) {
        case 0:
          // return the displayName of the path matcher term, trim just in case
          return edge.getHead().friendlyString();
        case 1:
          return edge.getRelation().toString();
        case 2:
          return edge.getTail().friendlyString();
        case 3:
          return edgeProps.getLineStyle().getDisplayName().toLowerCase();
        case 4:
          return edgeProps.getArrowhead().getDisplayName().toLowerCase();
        case 5:
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4graph.GraphEdge

      }
      DotDirection dir = bidirectional ? DotDirection.BOTH : (layoutBack ? DotDirection.BACK : DotDirection.FORWARD);
      DotStyle style = view.edgeStyle.resolve(rel);
      DotColor color = view.edgeColor.resolve(rel);
      int weight = view.weight.get(rel);
      GraphEdge e = new GraphEdge((layoutBack ? end : start), (layoutBack ? start : end), tuple, label, rel);
      if (color == DotColor.MAGIC && magicColor != null) e.set(magicColor); else e.set(color.getColor(view.getEdgePalette()));
      e.set(style);
      e.set(dir!=DotDirection.FORWARD, dir!=DotDirection.BACK);
      e.set(weight<1 ? 1 : (weight>100 ? 10000 : 100*weight));
      edges.put(e, tuple);
      return true;
   }
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

        controller.getGraph().showContextMenu(pm, p);
    }
   
    @Override
    public JPopupMenu getPopupMenu(GraphEdgeUi2D edgeUi, int x, int y) {
        GraphEdge edge = edgeUi.getEdge();
        JPopupMenu menu = null;
        if (edge instanceof PipelineActivityEdge) {
            menu = createMenuForPipelineActivityEdge((PipelineActivityEdge) edge);
        } else if (edge instanceof OperationActivityEdge) {
            menu = createMenuForOperationActivityEdge((OperationActivityEdge) edge);
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

        }
    }

    @Override
    public void nodesConnected(NodesConnectedEvent evt) {
        GraphEdge edge = evt.getNewEdge();
        updateEdge(edge);
        super.fireLayoutChanged(Arrays.asList(edge.from(), edge.to()));
    }
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

            if (destination instanceof OperationWrapper) {
                to = operationNodes.get(destination);
            } else if (destination instanceof EmailWrapper) {
                to = emailNodes.get(destination);
            }
            GraphEdge edge;
            if (route.getSourceActivity() != null) {
                edge = createScriptSourceEdge(route, from, (OperationWrapperNode) to);
            } else {
                edge = createOperationActivityEdge(route, from, to);
            }
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

            eventSupport.fireNodesConnected(edge);
        }
       
        private GraphEdge createScriptSourceEdge(Route route, OperationWrapperNode from, OperationWrapperNode to) {
            PipelineActivityNode activityNode = from.getChildFor(route.getSourceActivity());
            GraphEdge edge = new ScriptSourceEdge(activityNode, to);
            activityNode.addOutgoingRoute(edge);
            return edge;
        }
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

            activityNode.addOutgoingRoute(edge);
            return edge;
        }
       
        private GraphEdge createOperationActivityEdge(Route route, OperationWrapperNode from, AbstractGraphNode to) {
            GraphEdge edge = new OperationActivityEdge(from, to, route);
            from.addOutgoingRoute(edge);
            return edge;
        }
View Full Code Here

Examples of org.jitterbit.ui.graph.edge.GraphEdge

            }
            if (to != null) {
                // TODO: to may be null if the connecting node has already been removed. This is
                // not supposed to be possible according to the contract for RouteRemovedChange,
                // but it happens when removing a sibling route. Fix this inconsistency.
                GraphEdge edge = getEdgeForRemovedRoute(route, from, to);
                // TODO: edge may be null here if a Script that launches another Operation is removed.
                // This is another unfortunate side effect of the current event notification system
                if (edge != null) {
                    eventSupport.fireNodesDisconnected(edge);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.