Search in sources :

Example 6 with ListAttribute

use of doc.attributes.ListAttribute in project OpenNotebook by jaltekruse.

the class MathObject method exportToXML.

public String exportToXML() {
    String output = "";
    output += "<" + getType() + ">\n";
    for (MathObjectAttribute mAtt : attributes) {
        output += mAtt.exportToXML();
    }
    for (ListAttribute lAtt : attrLists) {
        output += lAtt.exportToXML();
    }
    output += "</" + getType() + ">\n";
    return output;
}
Also used : MathObjectAttribute(doc.attributes.MathObjectAttribute) ListAttribute(doc.attributes.ListAttribute)

Example 7 with ListAttribute

use of doc.attributes.ListAttribute in project OpenNotebook by jaltekruse.

the class MathObject method clone.

@Override
public MathObject clone() {
    MathObject o = newInstanceWithType(getType());
    o.setParentContainer(getParentContainer());
    o.removeAllAttributes();
    for (MathObjectAttribute mAtt : getAttributes()) {
        o.addAttribute(mAtt.clone());
    }
    o.removeAllLists();
    for (ListAttribute list : getLists()) {
        o.addList(list.clone());
    }
    return o;
}
Also used : MathObjectAttribute(doc.attributes.MathObjectAttribute) ListAttribute(doc.attributes.ListAttribute)

Aggregations

ListAttribute (doc.attributes.ListAttribute)7 MathObjectAttribute (doc.attributes.MathObjectAttribute)6 ExpressionObject (doc.mathobjects.ExpressionObject)2 AttributeException (doc.attributes.AttributeException)1 StringAttribute (doc.attributes.StringAttribute)1 GeneratedProblem (doc.mathobjects.GeneratedProblem)1 GraphObject (doc.mathobjects.GraphObject)1 Node (expression.Node)1 NodeException (expression.NodeException)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 GridLayout (java.awt.GridLayout)1 Insets (java.awt.Insets)1 Date (java.util.Date)1 ImageIcon (javax.swing.ImageIcon)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JTabbedPane (javax.swing.JTabbedPane)1