/[svn]/jsampler/trunk/src/org/jsampler/OrchestraInstrument.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/OrchestraInstrument.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2289 by iliev, Thu Sep 11 18:48:36 2008 UTC revision 2290 by iliev, Thu Nov 24 14:30:58 2011 UTC
# Line 89  public class OrchestraInstrument extends Line 89  public class OrchestraInstrument extends
89           * Sets the engine to be used for loading this instrument.           * Sets the engine to be used for loading this instrument.
90           */           */
91          public void          public void
92          setEngine(String engine) { this.engine = engine; }          setEngine(String engine) {
93                    this.engine = engine;
94                    fireChangeEvent();
95            }
96                    
97          public String          public String
98          getFormatFamily() { return null; }          getFormatFamily() { return null; }
# Line 218  public class OrchestraInstrument extends Line 221  public class OrchestraInstrument extends
221                                  } catch(NumberFormatException x) {                                  } catch(NumberFormatException x) {
222                                          throw new IllegalArgumentException("Not a number");                                          throw new IllegalArgumentException("Not a number");
223                                  }                                  }
224                            } else if(s.equals("engine")) {
225                                    DOMUtils.validateTextContent(node);
226                                    setEngine(node.getFirstChild().getNodeValue());
227                          } else {        // Unknown content                          } else {        // Unknown content
228                                  CC.getLogger().info ("Unknown field: " + s);                                  CC.getLogger().info ("Unknown field: " + s);
229                          }                          }
# Line 250  public class OrchestraInstrument extends Line 256  public class OrchestraInstrument extends
256                  el = doc.createElement("instrument-index");                  el = doc.createElement("instrument-index");
257                  el.appendChild(doc.createTextNode(String.valueOf(getInstrumentIndex())));                  el.appendChild(doc.createTextNode(String.valueOf(getInstrumentIndex())));
258                  node.appendChild(el);                  node.appendChild(el);
259                    
260                    if (getEngine() != null) {
261                            el = doc.createElement("engine");
262                            el.appendChild(doc.createTextNode(getEngine()));
263                            node.appendChild(el);
264                    }
265          }          }
266  }  }

Legend:
Removed from v.2289  
changed lines
  Added in v.2290

  ViewVC Help
Powered by ViewVC