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

Contents of /jsampler/trunk/src/org/jsampler/event/MidiInstrumentMapEvent.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1144 - (show annotations) (download)
Mon Apr 2 21:39:15 2007 UTC (17 years ago) by iliev
File size: 2347 byte(s)
- upgrading to version 0.4a

1 /*
2 * JSampler - a java front-end for LinuxSampler
3 *
4 * Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com>
5 *
6 * This file is part of JSampler.
7 *
8 * JSampler is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * JSampler is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with JSampler; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 package org.jsampler.event;
24
25 import org.jsampler.MidiInstrument;
26
27 import org.linuxsampler.lscp.MidiInstrumentEntry;
28
29
30 /**
31 * A semantic event which indicates MIDI instrument map changes.
32 * @author Grigor Iliev
33 */
34 public class MidiInstrumentMapEvent extends java.util.EventObject {
35 private MidiInstrument instrument;
36 private MidiInstrumentEntry entry;
37
38 /**
39 * Constructs a <code>MidiInstrumentMapEvent</code> object.
40 * @param source The object that originated the event.
41 */
42 public
43 MidiInstrumentMapEvent(Object source) { this(source, null, null); }
44
45 /**
46 * Constructs a <code>MidiInstrumentMapEvent</code> object.
47 * @param source The object that originated the event.
48 * @param entry Specifies the position of a MIDI instrument in a MIDI instrument map.
49 * @param instrument The MIDI instrument that has been added or removed.
50 */
51 public
52 MidiInstrumentMapEvent(Object source, MidiInstrumentEntry entry, MidiInstrument instrument) {
53 super(source);
54 this.instrument = instrument;
55 this.entry = entry;
56 }
57
58 /**
59 * Returns the entry associated with the added or removed MIDI instrument.
60 * @return entry associated with the added or removed MIDI instrument;
61 * <code>null</code> otherwise.
62 */
63 public MidiInstrumentEntry
64 getEntry() { return entry; }
65
66 /**
67 * Returns the MIDI instrument that has been added or removed.
68 * @return The MIDI instrument that has been added or removed;
69 * <code>null</code> otherwise.
70 */
71 public MidiInstrument
72 getInstrument() { return instrument; }
73 }

  ViewVC Help
Powered by ViewVC