示例#1
0
  public void extractFrom(CueData data) {
    _discription = data.getDescription();
    _channels = new Hashtable<Integer, ConsoleChannel>();

    for (Integer chan : data.keySet())
      _channels.put(chan, new CameoChannel(data.get(chan).shortValue()));
  }
示例#2
0
  private void addFade(Document doc, Element root, FadeData fade) {
    Element el = doc.createElement(_cue);
    Attr attr;

    attr = doc.createAttribute(_number);
    attr.setValue(Integer.toString(fade.getCueNumber()));
    el.setAttributeNode(attr);

    attr = doc.createAttribute(_uptime);
    attr.setValue(Integer.toString(fade.getUpTime()));
    el.setAttributeNode(attr);

    attr = doc.createAttribute(_downTime);
    attr.setValue(Integer.toString(fade.getDownTime()));
    el.setAttributeNode(attr);

    attr = doc.createAttribute(_upTimeDelay);
    attr.setValue(Integer.toString(fade.getDelayUpTime()));
    el.setAttributeNode(attr);

    attr = doc.createAttribute(_downTimeDelay);
    attr.setValue(Integer.toString(fade.getDelayDownTime()));
    el.setAttributeNode(attr);

    if (fade.getFollowTime() >= 0) {
      attr = doc.createAttribute(_followtime);
      attr.setValue(Integer.toString(fade.getFollowTime()));
      el.setAttributeNode(attr);
    }

    if (fade.getNextCue() > 0) {
      attr = doc.createAttribute(_nextCue);
      attr.setValue(Integer.toString(fade.getNextCue()));
      el.setAttributeNode(attr);
    }

    CueData cue = fade.getCue();

    attr = doc.createAttribute(_discription);
    attr.setValue(cue.getDescription());
    el.setAttributeNode(attr);

    for (Integer chan : cue.keySet()) addChannel(doc, el, chan, cue.get(chan));

    root.appendChild(el);
  }