Package research.connector

Examples of research.connector.Connector


        dw.writeStorable(getEndConnector());
    }

    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) {
            //updateConnection();
View Full Code Here


    public UndoActivity(DrawingView newView) {
      super(newView);
    }

    protected Connector replaceConnector(ConnectionFigure connection) {
      Connector tempEndConnector = connection.getEndConnector();
      connection.connectEnd(getOldConnector());
      return tempEndConnector;
    }
View Full Code Here

            if (getTargetFigure() != null) {
                FigureHelper.setConnectorVisible(getTargetFigure(), true);
            }
        }

        Connector target = findConnectionTarget(p.x, p.y, view.getDrawing());
        if (target != null) {
            p = Geom.center(target.getDisplayBox());
        }

        setPoint(p.x, p.y);
    }
View Full Code Here

    /**
     * Connects the figure to the new target. If there is no
     * new target the connection reverts to its original one.
     */
    public void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view) {
        Connector target = findConnectionTarget(x, y, view.getDrawing());
        if (target == null) {
            target = fOriginalTarget;
        }

        setPoint(x, y);
        connect(target);

        //getConnection().updateConnection();
        getConnection().layoutConnection();

        Connector oldConnector = ((UndoActivity)
                getUndoActivity()).getOldConnector();
        // there has been no change so there is nothing to undo
        if ((oldConnector == null)
                || (target() == null)
                || (oldConnector.owner() == target().owner())) {
            setUndoActivity(null);
        } else {
            getUndoActivity().setAffectedFigures(new SingleFigureEnumerator(getConnection()));
        }

View Full Code Here

  String endId = (String)end.getAttribute("id");//--featureId
  String type = (String)conn.getAttribute("type");
  String newNodeId = (String)newNode.getAttribute("id");
 
  if (conn instanceof PLConnection) {
      Connector connector = conn.getStartConnector();
     
      if (connector == null) { //--change plConnection start
    boolean bReturn = modelValidation.canChangeConnection(endId, startId, false, newNodeId, bChangeStart);
    if (bReturn)
        bReturn = modelValidation.canChangeConnection(endId, startId, true, newNodeId, bChangeStart);
    return bReturn;
      }
     
      int nDirection = connector.getDirection();
      if (nDirection == Connector.EAST_DIRECTION || nDirection == Connector.SOUTH_DIRECTION) //--sink
    return modelValidation.canChangeConnection(endId, startId, false, newNodeId, bChangeStart);
      else
    return modelValidation.canChangeConnection(endId, startId, true, newNodeId, bChangeStart);
  }
View Full Code Here

TOP

Related Classes of research.connector.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.