Search in sources :

Example 1 with MxlPrintAttributes

use of com.xenoage.zong.musicxml.types.attributes.MxlPrintAttributes in project Zong by Xenoage.

the class PrintReader method readBreak.

private Break readBreak() {
    MxlPrintAttributes mxlPA = mxlPrint.getPrintAttributes();
    SystemBreak systemBreak = readSystemBreak(mxlPA.getNewSystem());
    PageBreak pageBreak = readPageBreak(mxlPA.getNewPage());
    if (systemBreak != null || pageBreak != null)
        return new Break(pageBreak, systemBreak);
    return null;
}
Also used : MxlPrintAttributes(com.xenoage.zong.musicxml.types.attributes.MxlPrintAttributes) PageBreak(com.xenoage.zong.core.music.layout.PageBreak) SystemBreak(com.xenoage.zong.core.music.layout.SystemBreak) PageBreak(com.xenoage.zong.core.music.layout.PageBreak) Break(com.xenoage.zong.core.format.Break) SystemBreak(com.xenoage.zong.core.music.layout.SystemBreak)

Example 2 with MxlPrintAttributes

use of com.xenoage.zong.musicxml.types.attributes.MxlPrintAttributes in project Zong by Xenoage.

the class MxlPrint method read.

@MaybeNull
public static MxlPrint read(XmlReader reader) {
    MxlLayout layout = new MxlLayout();
    MxlPrintAttributes printAttributes = MxlPrintAttributes.read(reader);
    while (reader.openNextChildElement()) {
        layout.readElement(reader);
        reader.closeElement();
    }
    if (false == layout.isUsed())
        layout = null;
    if (layout != null || printAttributes != noPrintAttributes)
        return new MxlPrint(layout, printAttributes);
    else
        return null;
}
Also used : MxlPrintAttributes(com.xenoage.zong.musicxml.types.attributes.MxlPrintAttributes) MxlLayout(com.xenoage.zong.musicxml.types.groups.MxlLayout) MaybeNull(com.xenoage.utils.annotations.MaybeNull)

Aggregations

MxlPrintAttributes (com.xenoage.zong.musicxml.types.attributes.MxlPrintAttributes)2 MaybeNull (com.xenoage.utils.annotations.MaybeNull)1 Break (com.xenoage.zong.core.format.Break)1 PageBreak (com.xenoage.zong.core.music.layout.PageBreak)1 SystemBreak (com.xenoage.zong.core.music.layout.SystemBreak)1 MxlLayout (com.xenoage.zong.musicxml.types.groups.MxlLayout)1