use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.
the class FormattedTextReader method readStyle.
@NonNull
public FormattedTextStyle readStyle(MxlFormattedText mxlText) {
MxlPrintStyle mxlPrintStyle = mxlText.getPrintStyle();
FontInfo font = new FontInfoReader(mxlPrintStyle.getFont(), FontInfo.defaultValue).read();
Color color = readColor(mxlPrintStyle);
return new FormattedTextStyle(font, color, Superscript.Normal);
}
use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.
the class MxlStem method read.
@NonNull
public static MxlStem read(XmlReader reader) {
MxlPosition yPosition = MxlPosition.read(reader);
MxlColor color = MxlColor.read(reader);
MxlStemValue stem = MxlStemValue.read(reader);
return new MxlStem(stem, yPosition, color);
}
use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.
the class MxlAccidentalMark method read.
@NonNull
public static MxlAccidentalMark read(XmlReader reader) {
MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
MxlPlacement placement = MxlPlacement.read(reader);
MxlAccidentalText accidentalText = MxlAccidentalText.read(reader);
return new MxlAccidentalMark(accidentalText, printStyle, placement);
}
use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.
the class MxlFormattedText method read.
@NonNull
public static MxlFormattedText read(XmlReader reader) {
MxlLeftCenterRight justify = MxlLeftCenterRight.read(reader, "justify");
MxlLeftCenterRight hAlign = MxlLeftCenterRight.read(reader, "halign");
MxlVAlign vAlign = MxlVAlign.read(reader);
MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
String value = reader.getTextNotNull();
return new MxlFormattedText(value, justify, hAlign, vAlign, printStyle);
}
use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.
the class MxlForward method read.
@NonNull
public static MxlForward read(XmlReader reader) {
Integer duration = null;
MxlEditorialVoice editorialVoice = new MxlEditorialVoice();
while (reader.openNextChildElement()) {
String n = reader.getElementName();
if (n.equals("duration"))
duration = Parser.parseInt(reader.getText());
else
editorialVoice.readElement(reader);
reader.closeElement();
}
if (duration == null)
throw reader.dataException("duration unknown");
if (false == editorialVoice.isUsed())
editorialVoice = null;
return new MxlForward(duration, editorialVoice);
}
Aggregations