From 19db604db6c736c9afc31650b2efac6eb8e2f70b Mon Sep 17 00:00:00 2001 From: Einar Pehrson Date: Mon, 19 May 2003 15:14:59 +0000 Subject: [PATCH] *** empty log message *** --- Manual.txt | 8 +++++++- MooMenu.java | 2 +- MooTrackView.java | 22 +++++++++++++++++----- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Manual.txt b/Manual.txt index 9e6f30f..18fb5f9 100644 --- a/Manual.txt +++ b/Manual.txt @@ -1,4 +1,10 @@ -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. diff --git a/MooMenu.java b/MooMenu.java index 8c9b648..a61c403 100644 --- a/MooMenu.java +++ b/MooMenu.java @@ -231,7 +231,7 @@ public class MooMenu extends JMenuBar implements ActionListener { 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)); diff --git a/MooTrackView.java b/MooTrackView.java index 8133cda..c1d8b58 100644 --- a/MooTrackView.java +++ b/MooTrackView.java @@ -324,11 +324,23 @@ public class MooTrackView extends JPanel { * @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); + } } } -- 2.39.2