use of doc.mathobjects.TriangleObject in project OpenNotebook by jaltekruse.
the class OldReader method startElement.
@Override
public void startElement(String uri, String name, String qName, Attributes atts) {
boolean justAddedObject = false;
if (qName.equals("OpenNotebookDoc")) {
doc = new Document(atts.getValue(Document.FILENAME));
doc.setAuthor(atts.getValue(Document.AUTHOR));
}
if (doc != null) {
if (qName.equals("Page")) {
page = new Page(doc);
doc.addPage(page);
return;
}
if (page != null) {
if (mObj != null) {
readAttribute(uri, name, qName, atts);
}
if (qName.equals("AnswerBox")) {
mObj = new AnswerBoxObject(page);
justAddedObject = true;
}
if (qName.equals("CubeObject")) {
mObj = new CubeObject(page);
justAddedObject = true;
} else if (qName.equals("ExpressionObject")) {
mObj = new ExpressionObject(page);
justAddedObject = true;
} else if (qName.equals("GraphObject")) {
mObj = new GraphObject(page);
justAddedObject = true;
} else if (qName.equals("NumberLineObject")) {
mObj = new NumberLineObject(page);
justAddedObject = true;
} else if (qName.equals("OvalObject")) {
mObj = new OvalObject(page);
justAddedObject = true;
} else if (qName.equals("ParallelogramObject")) {
mObj = new ParallelogramObject(page);
justAddedObject = true;
} else if (qName.equals("RectangleObject")) {
mObj = new RectangleObject(page);
justAddedObject = true;
} else if (qName.equals("TextObject")) {
mObj = new TextObject(page);
justAddedObject = true;
} else if (qName.equals("TrapezoidObject")) {
mObj = new TrapezoidObject(page);
justAddedObject = true;
} else if (qName.equals("TriangleObject")) {
mObj = new TriangleObject(page);
justAddedObject = true;
}
if (justAddedObject) {
if (page != null) {
page.addObject(mObj);
}
}
}
}
}
Aggregations