JSampler
v0.8a

org.jsampler
Class OrchestraInstrument

java.lang.Object
  extended by org.jsampler.Resource
      extended by org.jsampler.OrchestraInstrument

public class OrchestraInstrument
extends Resource


Constructor Summary
OrchestraInstrument()
          Creates a new instance of OrchestraInstrument.
 
Method Summary
 java.lang.String getDnDString()
          Gets a string representation of this instrument appropriate for Drag & Drop operations.
 java.lang.String getEngine()
          Gets the engine to be used for loading this instrument.
 java.lang.String getFilePath()
          Returns the absolute pathname of the instrument location.
 java.lang.String getFormatFamily()
           
 java.lang.String getFormatVersion()
           
 int getInstrumentIndex()
          Returns the index of the instrument in the instrument file.
static boolean isDnDString(java.lang.String s)
          Determines whether the specified string is a Drag & Drop representation of an instrument.
 void readObject(org.w3c.dom.Node node)
          Reads and sets the instrument properties by the supplied node.
 void setDnDString(java.lang.String s)
          Sets the instrument properties provided by the specified Drag & Drop string representation.
 void setEngine(java.lang.String engine)
          Sets the engine to be used for loading this instrument.
 void setFilePath(java.lang.String path)
          Sets the absolute pathname of the instrument location.
 void setInstrumentIndex(int idx)
          Sets the index of the instrument in the instrument file.
 java.lang.String toString()
          Returns the name of this instrument.
 void writeObject(org.w3c.dom.Document doc, org.w3c.dom.Node node)
          Writes the instrument properties to the specified node of document doc.
 
Methods inherited from class org.jsampler.Resource
addChangeListener, fireChangeEvent, getDescription, getName, removeChangeListener, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrchestraInstrument

public OrchestraInstrument()
Creates a new instance of OrchestraInstrument.

Method Detail

getFilePath

public java.lang.String getFilePath()
Returns the absolute pathname of the instrument location.

Returns:
The absolute pathname of the instrument location.

setFilePath

public void setFilePath(java.lang.String path)
Sets the absolute pathname of the instrument location.

Parameters:
path - Specifies the absolute pathname of the instrument location.

getInstrumentIndex

public int getInstrumentIndex()
Returns the index of the instrument in the instrument file.

Returns:
The index of the instrument in the instrument file.

setInstrumentIndex

public void setInstrumentIndex(int idx)
Sets the index of the instrument in the instrument file.

Parameters:
idx - The index of the instrument in the instrument file.

getEngine

public java.lang.String getEngine()
Gets the engine to be used for loading this instrument.

Returns:
The engine to be used for loading this instrument.

setEngine

public void setEngine(java.lang.String engine)
Sets the engine to be used for loading this instrument.


getFormatFamily

public java.lang.String getFormatFamily()

getFormatVersion

public java.lang.String getFormatVersion()

toString

public java.lang.String toString()
Returns the name of this instrument.

Overrides:
toString in class java.lang.Object
Returns:
The name of this instrument.

getDnDString

public java.lang.String getDnDString()
Gets a string representation of this instrument appropriate for Drag & Drop operations.

Returns:
A string representation of this instrument appropriate for Drag & Drop operations.
See Also:
isDnDString(java.lang.String)

setDnDString

public void setDnDString(java.lang.String s)
Sets the instrument properties provided by the specified Drag & Drop string representation.

Parameters:
s - String providing Drag & Drop string representation of an instrument.
Throws:
java.lang.IllegalArgumentException - If the specified string is not a Drag & Drop string representation of an instrument.
See Also:
getDnDString()

isDnDString

public static boolean isDnDString(java.lang.String s)
Determines whether the specified string is a Drag & Drop representation of an instrument.

Parameters:
s - The string to be checked.
Returns:
true if the specified string is a Drag & Drop representation of an instrument, false otherwise.

readObject

public void readObject(org.w3c.dom.Node node)
Reads and sets the instrument properties by the supplied node.

Parameters:
node - The node providing the instrument properties.
Throws:
java.lang.IllegalArgumentException - If an error occurs while reading the instrument properties.

writeObject

public void writeObject(org.w3c.dom.Document doc,
                        org.w3c.dom.Node node)
Writes the instrument properties to the specified node of document doc.

Parameters:
doc - The document containing node.
node - Specifies the node where the instrument properties should be written.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.