< prev index next >
src/java.desktop/share/classes/com/sun/media/sound/SimpleInstrument.java
Print this page
@@ -20,14 +20,16 @@
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
package com.sun.media.sound;
import java.util.ArrayList;
import java.util.List;
+
import javax.sound.midi.Patch;
/**
* A simple instrument that is made of other ModelInstrument, ModelPerformer
* objects.
@@ -46,12 +48,11 @@
}
protected int preset = 0;
protected int bank = 0;
protected boolean percussion = false;
protected String name = "";
- protected List<SimpleInstrumentPart> parts
- = new ArrayList<SimpleInstrumentPart>();
+ protected List<SimpleInstrumentPart> parts = new ArrayList<>();
public SimpleInstrument() {
super(null, null, null, null);
}
@@ -119,10 +120,11 @@
public void add(ModelInstrument ins) {
add(ins.getPerformers());
}
+ @Override
public ModelPerformer[] getPerformers() {
int percount = 0;
for (SimpleInstrumentPart part : parts)
if (part.performers != null)
@@ -164,22 +166,25 @@
}
return performers;
}
+ @Override
public Object getData() {
return null;
}
+ @Override
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
+ @Override
public ModelPatch getPatch() {
return new ModelPatch(bank, preset, percussion);
}
public void setPatch(Patch patch) {
< prev index next >