Package info.textgrid.lab.noteeditor.model

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


    return candidate.equals(ChordGroupForm.class);
  }

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


        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

    unknownMeiForm.setParent(parentForm);
    return unknownMeiForm;
  }

  private static BasicElement handleChord(Chord chord, BasicElement parentForm) {
    ChordGroupForm chordGroupForm = new ChordGroupForm();
    chordGroupForm.setMeiNode(chord);
    for (MeiNode child : chord.getRestoresAndArticsAndUnclears()) {
      BasicElement handleChordContent = handleMeiElement(child,
          chordGroupForm);
      if (handleChordContent != null)
        chordGroupForm.addChild(handleChordContent);
    }
    return chordGroupForm;
  }
View Full Code Here

TOP

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

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.