Package org.apache.airavata.xbaya.graph

Examples of org.apache.airavata.xbaya.graph.Edge


                setDefaultValue(null);
                setMetadata(null);
            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
View Full Code Here


    /**
     * @see org.apache.airavata.xbaya.graph.Port#getFromPort()
     */
    public Port getFromPort() {
        if (this.edges.size() > 0) {
            Edge edge = this.edges.get(0);
            return edge.getFromPort();
        } else {
            return null;
        }
    }
View Full Code Here

                setDefaultValue(null);
                setMetadata(null);
            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
View Full Code Here

        GraphPiece piece = null;

        // Starts from edge because it is drawn first, which means it's at the
        // bottom.
        double minEdgeDist = Double.MAX_VALUE;
        Edge closestEdge = null;
        for (Edge edge : this.graph.getEdges()) {
            double dist = edge.getGUI().getMiddlePosition().distance(point);
            if (dist < minEdgeDist) {
                closestEdge = edge;
                minEdgeDist = dist;
View Full Code Here

   */
  public static boolean isAllInputsLabeled(Node node) {
    List<DataPort> inputPorts = node.getInputPorts();
    for (DataPort dataPort : inputPorts) {
      // 0 because its got only one
      Edge edge = dataPort.getEdge(0);
      if (edge == null || edge.getLabel() == null) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

   */
  public static boolean isAllInputsConnected(Node node) {
    List<DataPort> inputPorts = node.getInputPorts();
    for (DataPort dataPort : inputPorts) {
      // 0 because its got only one
      Edge edge = dataPort.getEdge(0);
      if (edge == null) {
        return false;
      }
    }
    return true;
View Full Code Here

    @Override
    public QName getParameterType() {
        List<DataEdge> edges = getEdges();
        QName parameterType = super.getParameterType();
        if (parameterType == null && getEdges().size() > 0) {
            Edge edge = edges.get(0);
            WSPort fromPort = (WSPort) edge.getFromPort();
            setParameterType(fromPort.getType());
        }
        return parameterType;
    }
View Full Code Here

                setDefaultValue(null);
                setMetadata(null);
            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
View Full Code Here

            }

            this.draggedPort = port;

        } else if (selected instanceof Edge) {
            Edge edge = (Edge) selected;
            selectEdge(edge);
        } else {
            /*
             * If nothing is selected
             */
 
View Full Code Here

     * @param toPort
     */
    private void connect(Port fromPort, Port toPort) {
        try {
            // check the validity of the connection.
            Edge edge = this.graph.addEdge(fromPort, toPort);
            selectEdge(edge);
        } catch (GraphException e) {
            logger.error(e.getMessage(), e);
            this.engine.getErrorWindow().warning(e.getMessage());
        } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.graph.Edge

Copyright © 2018 www.massapicom. 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.