Package edu.indiana.extreme.xbaya.graph.Port

Examples of edu.indiana.extreme.xbaya.graph.Port.Kind


    /**
     * @see edu.indiana.extreme.xbaya.graph.GraphFactory#createEdge(edu.indiana.extreme.xbaya.graph.Port,
     *      edu.indiana.extreme.xbaya.graph.Port)
     */
    public EdgeImpl createEdge(Port fromPort, Port toPort) {
        Kind fromKind = fromPort.getKind();
        Kind toKind = toPort.getKind();
        if (!((fromKind == Kind.DATA_OUT && toKind == Kind.DATA_IN)
                || (fromKind == Kind.CONTROL_OUT && toKind == Kind.CONTROL_IN) || (fromKind == Kind.EPR && toKind == Kind.DATA_IN))) {
            throw new XBayaRuntimeException();
        }
        EdgeImpl edge;
View Full Code Here


        super.portTypeChanged(port);

        List<DataPort> inputPorts = getInputPorts();
        List<DataPort> outputPorts = getOutputPorts();

        Kind kind = port.getKind();
        int index;
        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port);
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
View Full Code Here

        List<DataPort> inputPorts = getInputPorts();
        List<DataPort> outputPorts = getOutputPorts();
        int size = outputPorts.size();

        Kind kind = port.getKind();
        int index;
        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port) % size;
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
View Full Code Here

        List<DataPort> inputPorts = getInputPorts();
        List<DataPort> outputPorts = getOutputPorts();
        int size = outputPorts.size();

        Kind kind = port.getKind();
        int index;
        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port) % size;
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
View Full Code Here

        super.portTypeChanged(port);

        List<DataPort> inputPorts = getInputPorts();
        List<DataPort> outputPorts = getOutputPorts();

        Kind kind = port.getKind();
        int index;
        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port);
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
View Full Code Here

  /**
   * @param g
   */
  public void paint(Graphics2D g) {

    Kind kind = this.port.getKind();
    Color color = null;
    switch (kind) {
    case DATA_IN:
      color = this.selected ? SELECTED_COLOR : DATA_IN_COLOR;
      break;
View Full Code Here

    this.graph.getGUI().paint(g);

    // Draws a creating edge.
    if (this.draggedPort != null) {
      Point p1, p2;
      Kind kind = this.draggedPort.getKind();
      if (kind == Kind.DATA_OUT || kind == Kind.CONTROL_OUT
          || kind == Kind.EPR) {
        p1 = this.draggedPort.getGUI().getPosition();
        p2 = this.mousePoint;
      } else if (kind == Kind.DATA_IN || kind == Kind.CONTROL_IN) {
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.graph.Port.Kind

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.