Search in sources :

Example 6 with CeciliaObject

use of blue.soundObject.ceciliaModule.CeciliaObject in project blue by kunstmusik.

the class SliderPanel method editCeciliaModule.

/**
 * @param ceciliaModule
 */
public void editCeciliaModule(CeciliaModule ceciliaModule) {
    updating = true;
    HashMap map = ceciliaModule.getStateData();
    if (map.size() == 0) {
        return;
    }
    for (Iterator iter = map.values().iterator(); iter.hasNext(); ) {
        CeciliaObject element = (CeciliaObject) iter.next();
        if (element instanceof CSlider) {
            CSlider slider = (CSlider) element;
            setupCslider(slider);
        }
    }
    updating = false;
}
Also used : CSlider(blue.soundObject.ceciliaModule.CSlider) HashMap(java.util.HashMap) CeciliaObject(blue.soundObject.ceciliaModule.CeciliaObject) Iterator(java.util.Iterator)

Example 7 with CeciliaObject

use of blue.soundObject.ceciliaModule.CeciliaObject in project blue by kunstmusik.

the class TogglePanel method editCeciliaModule.

/**
 * @param ceciliaModule
 */
public void editCeciliaModule(CeciliaModule ceciliaModule) {
    HashMap map = ceciliaModule.getStateData();
    if (map.size() == 0) {
        return;
    }
    for (Iterator iter = map.values().iterator(); iter.hasNext(); ) {
        CeciliaObject element = (CeciliaObject) iter.next();
        if (element instanceof CToggle) {
            CToggle toggle = (CToggle) element;
            JCheckBox checkBox = (JCheckBox) interfaceObjectMap.get(toggle.getObjectName());
            checkBox.setText(toggle.getLabel());
            checkBox.setSelected(toggle.isToggled());
            dataValues.put(toggle.getObjectName(), toggle);
        }
    }
}
Also used : JCheckBox(javax.swing.JCheckBox) CToggle(blue.soundObject.ceciliaModule.CToggle) HashMap(java.util.HashMap) CeciliaObject(blue.soundObject.ceciliaModule.CeciliaObject) Iterator(java.util.Iterator)

Aggregations

CeciliaObject (blue.soundObject.ceciliaModule.CeciliaObject)7 HashMap (java.util.HashMap)4 Iterator (java.util.Iterator)4 CFileIn (blue.soundObject.ceciliaModule.CFileIn)2 CGraph (blue.soundObject.ceciliaModule.CGraph)2 CSlider (blue.soundObject.ceciliaModule.CSlider)2 CToggle (blue.soundObject.ceciliaModule.CToggle)2 Element (electric.xml.Element)2 StringTokenizer (java.util.StringTokenizer)2 CPopup (blue.soundObject.ceciliaModule.CPopup)1 Elements (electric.xml.Elements)1 JCheckBox (javax.swing.JCheckBox)1