Package org.eclipse.gef.examples.logicdesigner.model.commands

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


  add.setParent((LogicDiagram)getHost().getModel());
  add.setChild(part);
  add.setLabel(LogicMessages.LogicXYLayoutEditPolicy_AddCommandLabelText);
  add.setDebugLabel("LogicXYEP add subpart");//$NON-NLS-1$

  SetConstraintCommand setConstraint = new SetConstraintCommand();
  setConstraint.setLocation(rect);
  setConstraint.setPart(part);
  setConstraint.setLabel(LogicMessages.LogicXYLayoutEditPolicy_AddCommandLabelText);
  setConstraint.setDebugLabel("LogicXYEP setConstraint");//$NON-NLS-1$
 
  Command cmd = add.chain(setConstraint);
  cmd = chainGuideAttachmentCommand(request, part, cmd, true);
  cmd = chainGuideAttachmentCommand(request, part, cmd, false);
  cmd = chainGuideDetachmentCommand(request, part, cmd, true);
View Full Code Here


  return null;
}

protected Command createChangeConstraintCommand(ChangeBoundsRequest request,
                                                EditPart child, Object constraint) {
  SetConstraintCommand cmd = new SetConstraintCommand();
  LogicSubpart part = (LogicSubpart)child.getModel();
  cmd.setPart(part);
  cmd.setLocation((Rectangle)constraint);
  Command result = cmd;

  if ((request.getResizeDirection() & PositionConstants.NORTH_SOUTH) != 0) {
    Integer guidePos = (Integer)request.getExtendedData()
        .get(SnapToGuides.KEY_HORIZONTAL_GUIDE);
View Full Code Here

TOP

Related Classes of org.eclipse.gef.examples.logicdesigner.model.commands.SetConstraintCommand

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.