Package org.locationtech.udig.printing.model

Examples of org.locationtech.udig.printing.model.Connection


    if (newSource.equals(oldTarget)) {
      return false;
    }
    // return false, if the connection exists already
    for (Iterator iter = newSource.getSourceConnections().iterator(); iter.hasNext();) {
      Connection conn = (Connection) iter.next();
      // return false if a newSource -> oldTarget connection exists already
      // and it is a different instance than the connection-field
      if (conn.getTarget().equals(oldTarget) &&  !conn.equals(connection)) {
        return false;
      }
    }
    return true;
  }
View Full Code Here


    if (newTarget.equals(oldSource)) {
      return false;
    }
    // return false, if the connection exists already
    for (Iterator iter = newTarget.getTargetConnections().iterator(); iter.hasNext();) {
      Connection conn = (Connection) iter.next();
      // return false if a oldSource -> newTarget connection exists already
      // and it is a differenct instance that the connection-field
      if (conn.getSource().equals(oldSource) && !conn.equals(connection)) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

    if (source.equals(target)) {
      return false;
    }
    Iterator iter = source.getSourceConnections().iterator();
    while(iter.hasNext()) {
      Connection connection = (Connection) iter.next();
     
      if (connection.getTarget().equals(target)) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

                request.setStartCommand(cmd);
                return cmd;
            }

            protected Command getReconnectTargetCommand( ReconnectRequest request ) {
                Connection conn = (Connection) request.getConnectionEditPart().getModel();
                Box newTarget = (Box) getHost().getModel();
                ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
                cmd.setNewTarget(newTarget);
                return cmd;
            }

            protected Command getReconnectSourceCommand( ReconnectRequest request ) {
                Connection conn = (Connection) request.getConnectionEditPart().getModel();
                Box newSource = (Box) getHost().getModel();
                ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
                cmd.setNewSource(newSource);
                return cmd;
            }
View Full Code Here

                if (result == null) result = caseIAdaptable(box);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ModelPackage.CONNECTION: {
                Connection connection = (Connection)theEObject;
                T result = caseConnection(connection);
                if (result == null) result = caseElement(connection);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
View Full Code Here

                if (result == null) result = caseIProjectElement(page);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ModelPackage.CONNECTION: {
                Connection connection = (Connection)theEObject;
                Object result = caseConnection(connection);
                if (result == null) result = caseElement(connection);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.printing.model.Connection

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.