Package org.springframework.ide.eclipse.config.graph.model

Examples of org.springframework.ide.eclipse.config.graph.model.Activity


          if (child instanceof IDOMElement) {
            prev = next;
            next = (IDOMElement) child;
          }
          if (prev != null && next != null) {
            Activity prevActivity = null;
            Activity nextActivity = null;
            List<Activity> parts = getChildren();
            for (Activity activity : parts) {
              if (prev.equals(activity.getInput())) {
                prevActivity = activity;
              }
View Full Code Here


public class StopNodeEditPolicy extends ActivityNodeEditPolicy {

  @Override
  protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    int style = ((Integer) request.getNewObjectType()).intValue();
    Activity source = getActivity();
    StopConnectionCreateCommand cmd = new StopConnectionCreateCommand(source.getDiagram().getTextEditor(), style);
    cmd.setSource(source);
    request.setStartCommand(cmd);
    return cmd;
  }
View Full Code Here

public class NextNodeEditPolicy extends ActivityNodeEditPolicy {

  @Override
  protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    int style = ((Integer) request.getNewObjectType()).intValue();
    Activity source = getActivity();
    NextConnectionCreateCommand cmd = new NextConnectionCreateCommand(source.getDiagram().getTextEditor(), style);
    cmd.setSource(source);
    request.setStartCommand(cmd);
    return cmd;
  }
View Full Code Here

public class StepNodeEditPolicy extends ActivityNodeEditPolicy {

  @Override
  protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    int style = ((Integer) request.getNewObjectType()).intValue();
    Activity source = getActivity();
    StepConnectionCreateCommand cmd = new StepConnectionCreateCommand(source.getDiagram().getTextEditor(), style);
    cmd.setSource(source);
    request.setStartCommand(cmd);
    return cmd;
  }
View Full Code Here

  }

  @Override
  protected Command getReconnectTargetCommand(ReconnectRequest request) {
    if (request.getConnectionEditPart() instanceof AlternateTransitionPart) {
      Activity target = getActivity();
      ReconnectTargetChannelCommand cmd = new ReconnectTargetChannelCommand(target.getDiagram().getTextEditor());
      cmd.setTransition((Transition) request.getConnectionEditPart().getModel());
      cmd.setTarget(target);
      return cmd;
    }
    return super.getReconnectTargetCommand(request);
View Full Code Here

   */
  public boolean setBoundsOnFigure(boolean updateConstraint) {
    List parts = getChildren();
    for (Iterator iter = parts.iterator(); iter.hasNext();) {
      ActivityPart part = (ActivityPart) iter.next();
      Activity activity = part.getModelElement();

      Rectangle bounds = activity.getBounds();
      if (isFirstManualLayout) {
        Rectangle savedBounds = diagram.doReadCoordinates(activity);
        if (savedBounds != null) {
          bounds = savedBounds;
        }
      }

      IFigure figure = part.getFigure();
      if (bounds != null && figure != null && updateConstraint) {
        delegatingLayoutManager.setXYLayoutConstraint(figure, new Rectangle(bounds.x, bounds.y, bounds.width,
            bounds.height));
        activity.setBounds(bounds);
        activity.setHasManualBounds(true);
      }
    }
    isFirstManualLayout = false;
    return true;
  }
View Full Code Here

   */
  public boolean setBoundsOnModel() {
    List parts = getChildren();
    for (Iterator iter = parts.iterator(); iter.hasNext();) {
      ActivityPart part = (ActivityPart) iter.next();
      Activity activity = part.getModelElement();
      IFigure figure = part.getFigure();
      if (figure != null && (!activity.hasManualBounds() || isLayoutReset)) {
        Rectangle bounds = figure.getBounds().getCopy();
        activity.setBounds(bounds);
      }
    }
    isLayoutReset = false;
    return true;
  }
View Full Code Here

    }
  }

  @Override
  protected IFigure createFigure() {
    Activity activity = getModelElement();
    List<String> incomings = new ArrayList<String>();
    List<String> outgoings = new ArrayList<String>();
    if (hasAnchors) {
      incomings.addAll(activity.getPrimaryIncomingAttributes());
      incomings.addAll(activity.getSecondaryIncomingAttributes());
      outgoings.addAll(activity.getPrimaryOutgoingAttributes());
      outgoings.addAll(activity.getSecondaryOutgoingAttributes());
    }

    int direction = PositionConstants.SOUTH;
    EditPart part = getViewer().getContents();
    if (part instanceof ActivityDiagramPart) {
View Full Code Here

      TreeItem item = (TreeItem) object;
      return mapType(item.getData());
    }
    if (object instanceof ActivityPart) {
      ActivityPart part = (ActivityPart) object;
      Activity model = part.getModelElement();
      return mapType(model.getInput());
    }
    if (object instanceof TransitionPart) {
      TransitionPart part = (TransitionPart) object;
      Transition trans = (Transition) part.getModel();
      return mapType(trans.getInput());
View Full Code Here

   * @see org.eclipse.gef.commands.Command#canExecute()
   */
  @Override
  public boolean canExecute() {
    for (int i = 0; i < source.getOutgoingTransitions().size(); i++) {
      Activity target = source.getOutgoingTransitions().get(i).target;
      if (target.equals(child)) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.config.graph.model.Activity

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.