-Annex B: User Manual
+=============================================
+ M o o s i q u e
+ version 1.0
+ User Manual
+ © Roland Andersson, Mikael Andreen,
+ Björn Lanneskog & Einar Pehrson
+=============================================
INTRODUCTION
Moosique is a MIDI composer's tool for Java. The main purpose of the application is to play and compose music. While being intended for novices, some expert functions are provided.
MooDialog manual = new MooDialog(MooDialog.MANUAL);
} else if (command == "About") {
JOptionPane.showMessageDialog(null,
- "Moosique\nversion 1.0\n\nby\n\nRoland Andersson\nMichael Andreen\nBjörn Lanneskog\nEinar Pehrson",
+ "Moosique\nversion 1.0\n\n© 2003\nRoland Andersson\nMichael Andreen\nBjörn Lanneskog\nEinar Pehrson",
"About Moosique",
JOptionPane.INFORMATION_MESSAGE,
new ImageIcon(Moosique.getGUI().logo));
* @param ticks the number of ticks to move the selection.
*/
public void moveSelectedNotes(int ticks) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- MooNoteElement elem = (MooNoteElement)it.next();
- elem.getNote().setTick(elem.getNote().getTick() + ticks);
- layoutElement(elem, true);
+ if (ticks > 0) {
+ // If the selection should be moved downwards, traverses the list in the natural order.
+ Iterator it = selection.iterator();
+ while(it.hasNext()) {
+ MooNoteElement elem = (MooNoteElement)it.next();
+ elem.getNote().setTick(elem.getNote().getTick() + ticks);
+ layoutElement(elem, true);
+ }
+ } else {
+ // If the selection should be moved upwards, traverses the list in the opposite order.
+ ArrayList selectedList = new ArrayList(selection);
+ ListIterator it = selectedList.listIterator(selectedList.size());
+ while(it.hasPrevious()) {
+ MooNoteElement elem = (MooNoteElement)it.previous();
+ elem.getNote().setTick(elem.getNote().getTick() + ticks);
+ layoutElement(elem, true);
+ }
}
}