Package info.textgrid.lab.noteeditor.commands

Examples of info.textgrid.lab.noteeditor.commands.AddCommand


  @Override
  protected Command createAddCommand(EditPart child, EditPart after) {
    if (!(child instanceof BasicElement))
      throw new MusicNotImplementedException();
    BasicElement part = (BasicElement) child.getModel();
    AddCommand add = new AddCommand();
    add.setParent((MusicContainerForm) getHost().getModel());
    add.setChild(part);
    return add;

  }
View Full Code Here


protected Command createAddCommand(Request request, EditPart childEditPart,
    Object constraint) {
  BasicElement part = (BasicElement)childEditPart.getModel();
  Rectangle rect = (Rectangle)constraint;

  AddCommand add = new AddCommand();
  add.setParent((MusicContainerForm)getHost().getModel());
  add.setChild(part);
  add.setLabel(MusicMessages.MusicXYLayoutEditPolicy_AddCommandLabelText);
  add.setDebugLabel("XYEP add subpart");//$NON-NLS-1$

  SetConstraintCommand setConstraint = new SetConstraintCommand();
  setConstraint.setLocation(rect);
  setConstraint.setPart(part);
  setConstraint.setLabel(MusicMessages.MusicXYLayoutEditPolicy_AddCommandLabelText);
  setConstraint.setDebugLabel("XYEP setConstraint");//$NON-NLS-1$
 
  Command cmd = add.chain(setConstraint);
  return cmd;
}
View Full Code Here

TOP

Related Classes of info.textgrid.lab.noteeditor.commands.AddCommand

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.