ucar.unidata.util
Class MidiProperties

java.lang.Object
  extended by ucar.unidata.util.MidiProperties

public class MidiProperties
extends Object

A class to hold properties for a MidiManager

Version:
$Revision: 1.5 $
Author:
IDV Development Team

Constructor Summary
MidiProperties()
          Default ctor.
MidiProperties(MidiProperties that)
          Copy constructor
MidiProperties(String instrumentName, int lowNote, int highNote, boolean muted)
          Create a new MidiProperties
 
Method Summary
 boolean applyProperties()
          Apply properties
 int getHighNote()
          Get the HighNote property.
 String getInstrumentName()
          Get the Instrument property.
 int getLowNote()
          Get the LowNote property.
 boolean getMuted()
          Get the Muted property.
 List getPropertiesComponents(List comps)
          Get the Components for setting the properties
 void setHighNote(int value)
          Set the HighNote property.
 void setInstrumentName(String value)
          Set the InstrumentIndex property.
 void setLowNote(int value)
          Set the LowNote property.
 void setMuted(boolean value)
          Set the Muted property.
 void setProperties(MidiProperties that)
          Set the properties from another.
 boolean showPropertyDialog(Window w)
          Show a Dialog for setting the properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiProperties

public MidiProperties()
Default ctor.


MidiProperties

public MidiProperties(String instrumentName,
                      int lowNote,
                      int highNote,
                      boolean muted)
Create a new MidiProperties

Parameters:
instrumentName - name of the instrument
lowNote - low note value
highNote - high note value
muted - true if muted

MidiProperties

public MidiProperties(MidiProperties that)
Copy constructor

Parameters:
that - the other properties object
Method Detail

setInstrumentName

public void setInstrumentName(String value)
Set the InstrumentIndex property.

Parameters:
value - The new value for InstrumentIndex

getInstrumentName

public String getInstrumentName()
Get the Instrument property.

Returns:
The Instrument

setMuted

public void setMuted(boolean value)
Set the Muted property.

Parameters:
value - The new value for Muted

getMuted

public boolean getMuted()
Get the Muted property.

Returns:
The Muted

setLowNote

public void setLowNote(int value)
Set the LowNote property.

Parameters:
value - The new value for LowNote

getLowNote

public int getLowNote()
Get the LowNote property.

Returns:
The LowNote

setHighNote

public void setHighNote(int value)
Set the HighNote property.

Parameters:
value - The new value for HighNote

getHighNote

public int getHighNote()
Get the HighNote property.

Returns:
The HighNote

setProperties

public void setProperties(MidiProperties that)
Set the properties from another.

Parameters:
that - the other

showPropertyDialog

public boolean showPropertyDialog(Window w)
Show a Dialog for setting the properties.

Parameters:
w - Window for anchor
Returns:
true if properties changed

applyProperties

public boolean applyProperties()
Apply properties

Returns:
success

getPropertiesComponents

public List getPropertiesComponents(List comps)
Get the Components for setting the properties

Parameters:
comps - compnents to add to
Returns:
the list for this.