Search in sources :

Example 1 with Creator

use of com.xenoage.zong.core.info.Creator in project Zong by Xenoage.

the class ScoreInfoReader method readCreators.

private void readCreators() {
    MxlIdentification mxlIdentification = mxlHeader.getIdentification();
    if (mxlIdentification != null) {
        for (MxlTypedText mxlCreator : it(mxlIdentification.getCreators())) {
            Creator creator = new Creator(mxlCreator.getValue(), mxlCreator.getType());
            scoreInfo.getCreators().add(creator);
        }
    }
}
Also used : MxlIdentification(com.xenoage.zong.musicxml.types.MxlIdentification) MxlTypedText(com.xenoage.zong.musicxml.types.MxlTypedText) Creator(com.xenoage.zong.core.info.Creator)

Example 2 with Creator

use of com.xenoage.zong.core.info.Creator in project Zong by Xenoage.

the class InfoDialog method setScore.

public void setScore(Score score) {
    ScoreInfo info = score.getInfo();
    lblTitle.setText(info.getTitle());
    txtWorkNumber.setText(info.getWorkNumber());
    txtWorkTitle.setText(info.getWorkTitle());
    txtMovementNumber.setText(info.getMovementNumber());
    txtMovementTitle.setText(info.getMovementTitle());
    // creators
    String s = "-";
    if (info.getCreators().size() > 0) {
        s = "";
        for (Creator creator : info.getCreators()) s += (creator.getType() != null ? creator.getType() + ": " : "") + creator.getName() + "\n";
    }
    txtCreators.setText(s);
    // rights
    s = "-";
    if (info.getRights().size() > 0) {
        s = "";
        for (Rights rights : info.getRights()) s += (rights.getType() != null ? rights.getType() + ": " : "") + rights.getText() + "\n";
    }
    txtRights.setText(s);
    // parts
    s = "-";
    if (score.getStavesList().getParts().size() > 0) {
        s = "";
        for (int i : range(score.getStavesList().getParts())) {
            Part part = score.getStavesList().getParts().get(i);
            s += i + ": " + part.getName() + "\n";
        }
    }
    txtParts.setText(s);
}
Also used : ScoreInfo(com.xenoage.zong.core.info.ScoreInfo) Rights(com.xenoage.zong.core.info.Rights) Part(com.xenoage.zong.core.music.Part) Creator(com.xenoage.zong.core.info.Creator)

Aggregations

Creator (com.xenoage.zong.core.info.Creator)2 Rights (com.xenoage.zong.core.info.Rights)1 ScoreInfo (com.xenoage.zong.core.info.ScoreInfo)1 Part (com.xenoage.zong.core.music.Part)1 MxlIdentification (com.xenoage.zong.musicxml.types.MxlIdentification)1 MxlTypedText (com.xenoage.zong.musicxml.types.MxlTypedText)1