Examples of ChangeGuideCommand


Examples of org.eclipse.gef.examples.logicdesigner.model.commands.ChangeGuideCommand

                      : SnapToGuides.KEY_VERTICAL_GUIDE);
  if (guidePos != null) {
    int alignment = ((Integer)request.getExtendedData()
        .get(horizontal ? SnapToGuides.KEY_HORIZONTAL_ANCHOR
                        : SnapToGuides.KEY_VERTICAL_ANCHOR)).intValue();
    ChangeGuideCommand cgm = new ChangeGuideCommand(part, horizontal);
    cgm.setNewGuide(findGuideAt(guidePos.intValue(), horizontal), alignment);
    result = result.chain(cgm);
  }

  return result;
}
View Full Code Here

Examples of org.eclipse.gef.examples.logicdesigner.model.commands.ChangeGuideCommand

  // Detach from guide, if none is given
  Integer guidePos = (Integer)request.getExtendedData()
      .get(horizontal ? SnapToGuides.KEY_HORIZONTAL_GUIDE
                      : SnapToGuides.KEY_VERTICAL_GUIDE);
  if (guidePos == null)
    result = result.chain(new ChangeGuideCommand(part, horizontal));

  return result;
}
View Full Code Here

Examples of org.eclipse.gef.examples.logicdesigner.model.commands.ChangeGuideCommand

      if ((request.getResizeDirection() & PositionConstants.NORTH) != 0)
        edgeBeingResized = -1;
      else
        edgeBeingResized = 1;
      if (alignment == edgeBeingResized)
        result = result.chain(new ChangeGuideCommand(part, true));
    }
  }
 
  if ((request.getResizeDirection() & PositionConstants.EAST_WEST) != 0) {
    Integer guidePos = (Integer)request.getExtendedData()
        .get(SnapToGuides.KEY_VERTICAL_GUIDE);
    if (guidePos != null) {
      result = chainGuideAttachmentCommand(request, part, result, false);
    } else if (part.getVerticalGuide() != null) {
      int alignment = part.getVerticalGuide().getAlignment(part);
      int edgeBeingResized = 0;
      if ((request.getResizeDirection() & PositionConstants.WEST) != 0)
        edgeBeingResized = -1;
      else
        edgeBeingResized = 1;
      if (alignment == edgeBeingResized)
        result = result.chain(new ChangeGuideCommand(part, false));
    }
  }
 
  if (request.getType().equals(REQ_MOVE_CHILDREN)
      || request.getType().equals(REQ_ALIGN_CHILDREN)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.