Package info.textgrid.lab.noteeditor.model

Examples of info.textgrid.lab.noteeditor.model.BasicElement


                + GraphicalConstants.SHAPE_MEASURESHAPE_INTERMEDIATE);
      }
      scoreDefForm.setSystemPositions(systemPositions);
      Dimension dimScoreDef = new Dimension();

      BasicElement handleSectionContent = handleMeiElement(
          scoreDef.getStaffGrp(), scoreDefForm);
      if (handleSectionContent != null)
        scoreDefForm.addChild(handleSectionContent);
      dimScoreDef.width = 1;
      dimScoreDef.height = 1;
View Full Code Here


      BasicElement parentForm) {
    SectionForm sectionForm = new SectionForm();
    sectionForm.setMeiNode(section);
    sectionForm.setParent(parentForm);
    for (MeiNode child : section.getUnclearsAndSbsAndApps()) {
      BasicElement handleSectionContent = handleMeiElement(child,
          sectionForm);
      if (handleSectionContent != null)
        sectionForm.addChild(handleSectionContent);
    }
    return sectionForm;
View Full Code Here

      BasicElement parentForm) {
    EndingForm endingForm = new EndingForm();
    endingForm.setMeiNode(ending);
    endingForm.setParent(parentForm);
    for (MeiNode child : ending.getRegsAndSuppliedsAndCurves()) {
      BasicElement handleEndingContent = handleMeiElement(child,
          endingForm);
      if (handleEndingContent != null)
        endingForm.addChild(handleEndingContent);
    }
    return endingForm;
View Full Code Here

      } else if (child instanceof StaffGrp) {
        // recursive call
        scoreDefForm.addStaffgroup(staffGrp, (StaffGrp) child);
        handleStaffGrp((StaffGrp) child, scoreDefForm);
      }
      BasicElement handleLayerContent = handleMeiElement(child,
          staffGroupForm);
      if (handleLayerContent != null)
        staffGroupForm.addChild(handleLayerContent);
    }
    return staffGroupForm;
View Full Code Here

  for(int i = 0; i < editparts.size(); i++){
    EditPart child = (EditPart)editparts.get(i);
    if(isAncestor(child,getHost()))
      command.add(UnexecutableCommand.INSTANCE);
    else {
      BasicElement childModel = (BasicElement)child.getModel();
      command.add(createCreateCommand(
            childModel,
            new Rectangle(new org.eclipse.draw2d.geometry.Point(),
              childModel.getSize()),
            index, "Reparent " + childModel.getClass().getSimpleName()));//$NON-NLS-1$
    }
  }
  return command;
}
View Full Code Here

  return command;
}

@Override
protected Command getCreateCommand(CreateRequest request){
  BasicElement child = (BasicElement)request.getNewObject();
  int index = findIndexOfTreeItemAt(request.getLocation());
  return createCreateCommand(child, null, index, "Create " + child.getClass().getSimpleName());//$NON-NLS-1$
}
View Full Code Here

   */
  @Override
  protected IFigure createFigure() {
    if (getModel() == null)
      return null;
    BasicElement model = (BasicElement)getModel();
    BasicElement parent = (BasicElement) getParent().getModel();
    model.setParent(parent);
    if(model.getId().startsWith("gen"))
      model.setId(parent.getId() + "." + model.toString() + getParent().getChildren().size());
    IFigure figure;
    figure = new BlankTerminalFigure(model);
    figure.setOpaque(true); // non-transparent figure
    return figure;
  }
View Full Code Here

  public static BasicElement findAncestorForm(Class<?> queriedFormType,
      BasicElement childForm) {
    if (childForm.getClass() == queriedFormType) {
      return childForm;
    } else {
      BasicElement parent = childForm.getParent();
      if (parent == null) {
        return null;
      } else {
        return findAncestorForm(queriedFormType, parent);
      }
View Full Code Here

   * @param childForm
   * @return
   */
  public static BasicElement findPrecedingForm(Class<?> precedingFormType,
      BasicElement childForm) {
    BasicElement result = null;
    return result;
  }
View Full Code Here

   *
   *
   */
  @Override
  public void reveal(EditPart part) {
    BasicElement elem = (BasicElement) ((GraphicalEditPart) part)
        .getModel();
    if (elem == null || elem.getParent() == null || elem.getId() == null)
      return;

    // if model location is not known, jump to its parent iteratively
    while (null != elem && !FigureMultipassController.figurePassingObject.getLocationMap().containsKey(elem.getId())) {
      elem = elem.getParent();
    }
    if(elem == null)
      return;
   
    Point location = FigureMultipassController.figurePassingObject.getLocationMap().get(elem.getId());

    Viewport port = getFigureCanvas().getViewport();
    Dimension viewportSize = port.getClientArea().getSize();

    if(!FigureRenderLibrary.isVisibleArea(port, location)) {
View Full Code Here

TOP

Related Classes of info.textgrid.lab.noteeditor.model.BasicElement

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.