Package info.textgrid.lab.noteeditor.model

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


   * @param eventForm
   */
  private void processEvent(Graphics graphics, BasicElement eventForm) {
    graphics.setForegroundColor(FigureRenderLibrary
        .calculateVariantColor(eventForm));
    LayerForm layerForm = (LayerForm) MeiNodeNavigator.findAncestorForm(
        LayerForm.class, eventForm);
    Point layerStartPoint = this.figurePassingObject.getLocationMap().get(
        layerForm.getId());

    EventSpacingSyncContainer eventSpacingSyncContainer = this.figurePassingObject
        .getSyncContainerMap().get(layerForm.getId());
    int timeStampAtom = -1;
    int spacingAtomSum = -1;
    Point startPoint = null;
    if (this.figurePassingObject.getEventTimestampAtomMap().containsKey(
        eventForm.getId())) {
View Full Code Here


    }
  }

  private void processBeamGroup(Graphics graphics,
      BeamGroupForm beamGroupForm, Point location) {
    LayerForm layerForm = (LayerForm) MeiNodeNavigator.findAncestorForm(
        LayerForm.class, beamGroupForm);
    Point layerStartPoint = this.figurePassingObject.getLocationMap().get(
        layerForm.getId());
    EventSpacingSyncContainer eventSpacingSyncContainer = this.figurePassingObject
        .getSyncContainerMap().get(layerForm.getId());
    for (BasicElement eventForm : beamGroupForm.getChildren()) {
      if (!this.figurePassingObject.getEventTimestampAtomMap()
          .containsKey(eventForm.getId())) {
        LogService.warning(MusicMessages.FigureEventsPassProcessor_2
            + eventForm.getId()
View Full Code Here

    return candidate.equals(LayerForm.class);
  }

  @Override
  public void run() {
    this.child = new LayerForm();
    super.run();
  }
View Full Code Here

        contentNode.getMRestsAndKeySigsAndProports().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      return contentNode;
    } else if (childForm instanceof LayerForm) {
      LayerForm contentForm = (LayerForm) childForm;
      Layer contentNode = (Layer) contentForm.getMeiNode();
      contentNode.getBarLinesAndSyllablesAndGaps().clear();
      for (BasicElement contentChildForm : contentForm.getChildren()) {
        contentNode.getBarLinesAndSyllablesAndGaps().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      return contentNode;
    } else if (childForm instanceof ChordGroupForm) {
      ChordGroupForm contentForm = (ChordGroupForm) childForm;
      Chord contentNode = (Chord) contentForm.getMeiNode();
      contentNode.getRestoresAndArticsAndUnclears().clear();
      for (BasicElement contentChildForm : contentForm.getChildren()) {
        contentNode.getRestoresAndArticsAndUnclears().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      if(contentNode.getArtics().isEmpty()) {
        contentNode.unsetArtics();
      }
      return contentNode;
    } else if (childForm instanceof BeamGroupForm) {
      BeamGroupForm contentForm = (BeamGroupForm) childForm;
      Beam contentNode = (Beam) contentForm.getMeiNode();
      contentNode.getFTremsAndChordsAndDamages().clear();
      for (BasicElement contentChildForm : contentForm.getChildren()) {
        contentNode.getFTremsAndChordsAndDamages().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      return contentNode;
    } else if (childForm instanceof NoteForm) {
      NoteForm contentForm = (NoteForm) childForm;
      Note contentNode = (Note) contentForm.getMeiNode();
      if (contentNode.getArtics().isEmpty())
        contentNode.unsetArtics();
      return contentNode;
    } else if (childForm instanceof RestForm) {
      RestForm contentForm = (RestForm) childForm;
      Rest contentNode = (Rest) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof MRestForm) {
      MRestForm contentForm = (MRestForm) childForm;
      MRest contentNode = (MRest) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof SpaceForm) {
      SpaceForm contentForm = (SpaceForm) childForm;
      Space contentNode = (Space) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof DynamForm) {
      DynamForm contentForm = (DynamForm) childForm;
      Dynam contentNode = (Dynam) contentForm.getMeiNode();
      for (BasicElement contentChildForm : contentForm.getChildren()) {
        contentNode.getContent().add(
            handleScoreChild(contentChildForm, saveAllVariants));
      }
      return contentNode;
    } else if (childForm instanceof TieForm) {
      TieForm contentForm = (TieForm) childForm;
      Tie contentNode = (Tie) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof SlurForm) {
      SlurForm contentForm = (SlurForm) childForm;
      Slur contentNode = (Slur) contentForm.getMeiNode();
      return contentNode;
    } else if (childForm instanceof FermataForm) {
      FermataForm contentForm = (FermataForm) childForm;
      Fermata contentNode = (Fermata) contentForm.getMeiNode();
      return contentNode;
    } else {
      // write back a node of a currently unknown type
      UnknownMeiNodeForm contentForm = (UnknownMeiNodeForm) childForm;
      return contentForm.getMeiNode();
    }
  }
View Full Code Here

   *
   * @param graphics
   * @param eventForm
   */
  private void processEvent(Graphics graphics, BasicElement eventForm) {
    LayerForm layerForm = (LayerForm) MeiNodeNavigator.findAncestorForm(
        LayerForm.class, eventForm);
    EventSpacingSyncContainer eventSpacingSyncContainer = this.figurePassingObject
        .getSyncContainerMap().get(layerForm.getId());
    ValidStaffDefDeclarationContainer validStaffDefDeclarationContainer = this.figurePassingObject
        .getLayerToValidStaffDefMap().get(layerForm.getId());
    int duration;
    int haderDistance;
    int numberOfAtoms;
    int beamSpanSize;
    switch (eventForm.getFormType()) {
View Full Code Here

              MeasureForm.class,
              MusicPlugin.getDefault().getActiveDiagram())) {
        staffForm = new StaffForm();
        insertCompoundCommand((MusicContainerForm) child,
            staffForm);
        insertCompoundCommand(staffForm, new LayerForm());
      }
    }
  }
View Full Code Here

    }
    return staffDefForm;
  }

  private static BasicElement handleLayer(Layer layer, BasicElement parentForm) {
    LayerForm layerForm = new LayerForm();
    layerForm.setParent(parentForm);
    layerForm.setMeiNode(layer);
    for (MeiNode child : layer.getBarLinesAndSyllablesAndGaps()) {
      BasicElement handleLayerContent = handleMeiElement(child, layerForm);
      if (handleLayerContent != null)
        layerForm.addChild(handleLayerContent);
    }
    return layerForm;
  }
View Full Code Here

        for (int staffIter = 0; staffIter < MeiNodeNavigator.findActiveDescendantForm(StaffDefForm.class, MusicPlugin.getDefault()
            .getActiveDiagram().getScoreDefForm())
            .size(); staffIter++) {
          singleStaff = new StaffForm();
          insertCompoundCommand(measureForm, singleStaff);
          insertCompoundCommand(singleStaff, new LayerForm());
        }
      }
    }
  }
View Full Code Here

TOP

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

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.