Package CH.ifa.draw.framework

Examples of CH.ifa.draw.framework.Connector


    }
  }

  public void mouseUp(MouseEvent e, int x, int y)
  {
    Connector endConnector = null;
    if (moved)
    {
      Figure figure = null;
      if (startConnector != null)
      {
View Full Code Here


      {
        targetFigure.connectorVisibility(true);
      }
    }

    Connector connector = null;
    if (figure != null)
    {
      connector = findConnector(x, y, figure);
    }
    if (connector != targetConnector)
View Full Code Here

    {
      System.err.println("Control link target socket '" + target.getQualifier() + "' has no figure representation.");
      return null;
    }

    Connector start = sourceFigure.connectorAt(0, 0);
    Connector end = targetFigure.connectorAt(0, 0);

    link.unlink();

    FlowConnection flow = new FlowConnection(link, this);
    flow.connectStart(start);
View Full Code Here

      sourceFigure.setProcessVariableConnection((ProcessVariable) target, link);
    }
    else if (sourceFigure != null && targetFigure != null)
    {
      // Node -> Node
      Connector start = sourceFigure.connectorAt(0, 0);
      Connector end = targetFigure.connectorAt(0, 0);

      link.unlink();

      return new ParamConnection(link, start, end, this);
    }
View Full Code Here

    addEndConnectorChangeListener();

    // If necessary, reverse the connection
    if (shouldReverse(startFigure(), endFigure()))
    {
      Connector swap = startConnector;
      startConnector = this.endConnector;
      this.endConnector = swap;
    }
    layoutConnection();
View Full Code Here

  public void read(StorableInput dr)
    throws IOException
  {
    super.read(dr);
    Connector start = (Connector) dr.readStorable();
    if (start != null)
    {
      connectStart(start);
    }
    Connector end = (Connector) dr.readStorable();
    if (end != null)
    {
      connectEnd(end);
    }
    if (start != null && end != null)
View Full Code Here

      {
        targetFigure.connectorVisibility(true);
      }
    }

    Connector target = findConnectionTarget(p.x, p.y, view.drawing());
    if (target != null)
    {
      p = Geom.center(target.displayBox());
    }
    setPoint(p.x, p.y);
  }
View Full Code Here

  public void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)
  {
    DecorationMgr.removeDecorator(null, BasicFigure.DECO_OVERLAY, canConnectDecorator);
    ((WorkspaceDrawingView) view).redraw();

    Connector target = findConnectionTarget(x, y, view.drawing());
    if (target == null)
    {
      target = originalTarget;
    }
View Full Code Here

TOP

Related Classes of CH.ifa.draw.framework.Connector

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.