Search in sources :

Example 96 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class AudioFile method saveAsXML.

/*
     * (non-Javadoc)
     *
     * @see blue.soundObject.SoundObject#saveAsXML()
     */
@Override
public Element saveAsXML(Map<Object, String> objRefMap) {
    Element retVal = SoundObjectUtilities.getBasicXML(this);
    retVal.addElement("soundFileName").setText(this.getSoundFileName());
    retVal.addElement("csoundPostCode").setText(this.getCsoundPostCode());
    return retVal;
}
Also used : Element(electric.xml.Element)

Example 97 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class TimeState method saveAsXML.

public Element saveAsXML() {
    Element retVal = new Element("timeState");
    retVal.addElement(XMLUtilities.writeInt("pixelSecond", this.pixelSecond));
    retVal.addElement(XMLUtilities.writeBoolean("snapEnabled", this.snapEnabled));
    retVal.addElement(XMLUtilities.writeDouble("snapValue", this.snapValue));
    retVal.addElement(XMLUtilities.writeInt("timeDisplay", this.timeDisplay));
    retVal.addElement(XMLUtilities.writeInt("timeUnit", this.timeUnit));
    return retVal;
}
Also used : Element(electric.xml.Element)

Example 98 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class Tempo method saveAsXML.

public Element saveAsXML() {
    Element retVal = new Element("tempo");
    retVal.addElement(XMLUtilities.writeBoolean("enabled", enabled));
    retVal.addElement(XMLUtilities.writeBoolean("visible", visible));
    retVal.addElement(line.saveAsXML());
    return retVal;
}
Also used : Element(electric.xml.Element)

Example 99 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class PresetGroup method loadFromXML.

public static PresetGroup loadFromXML(Element data) {
    PresetGroup group = new PresetGroup();
    group.setPresetGroupName(data.getAttributeValue("name"));
    String val = data.getAttributeValue("currentPresetUniqueId");
    if (val != null && val.length() > 0) {
        group.setCurrentPresetUniqueId(val);
    }
    val = data.getAttributeValue("currentPresetModified");
    if (val != null && val.length() > 0) {
        group.setCurrentPresetModified(Boolean.valueOf(val).booleanValue());
    }
    Elements nodes = data.getElements();
    while (nodes.hasMoreElements()) {
        Element node = nodes.next();
        switch(node.getName()) {
            case "presetGroup":
                PresetGroup pGroup = PresetGroup.loadFromXML(node);
                group.getSubGroups().add(pGroup);
                break;
            case "preset":
                Preset preset = Preset.loadFromXML(node);
                group.getPresets().add(preset);
                break;
        }
    }
    return group;
}
Also used : Element(electric.xml.Element) Elements(electric.xml.Elements)

Example 100 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class LFOData method saveAsXML.

public Element saveAsXML() {
    Element retVal = new Element("lfoData");
    retVal.addElement(XMLUtilities.writeInt("speed", speed));
    retVal.addElement(XMLUtilities.writeInt("delay", delay));
    retVal.addElement(XMLUtilities.writeInt("PMD", PMD));
    retVal.addElement(XMLUtilities.writeInt("AMD", AMD));
    retVal.addElement(XMLUtilities.writeInt("wave", wave));
    retVal.addElement(XMLUtilities.writeInt("sync", sync));
    return retVal;
}
Also used : Element(electric.xml.Element)

Aggregations

Element (electric.xml.Element)310 Elements (electric.xml.Elements)120 Document (electric.xml.Document)22 Vector (java.util.Vector)14 Iterator (java.util.Iterator)12 File (java.io.File)10 BigDecimal (java.math.BigDecimal)10 IOException (java.io.IOException)8 SoundObject (blue.soundObject.SoundObject)7 ParseException (electric.xml.ParseException)7 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)4 EffectOption (blue.tools.blueShare.effects.EffectOption)3 InstrumentOption (blue.tools.blueShare.instruments.InstrumentOption)3 SoundObjectOption (blue.tools.blueShare.soundObjects.SoundObjectOption)3 OpcodeList (blue.udo.OpcodeList)3 Test (org.junit.Test)3 ParameterList (blue.automation.ParameterList)2 LiveObject (blue.blueLive.LiveObject)2 LiveObjectBins (blue.blueLive.LiveObjectBins)2 Line (blue.components.lines.Line)2