- public void windowOpened(WindowEvent e) {}
- public void windowClosing(WindowEvent e) {Moosique.quit();}
- public void windowClosed(WindowEvent e) {}
- public void windowIconified(WindowEvent e) {}
- public void windowDeiconified(WindowEvent e) {}
- public void windowActivated(WindowEvent e) {}
- public void windowDeactivated(WindowEvent e) {}
+ /**
+ * Calls on the main view to update the track views,
+ * and on the toolbar to update the progress indicator.
+ */
+ public synchronized void update(long tickPosition){
+ if (updateView) view.update(tickPosition);
+ toolbar.updateProgInd(tickPosition);
+ }
+
+ /**
+ * Creates an action for a specific octave.
+ * @param increase true for increase, false for decrease
+ */
+ private Action createOctaveAction(final boolean increase) {
+ Action octaveAction = new AbstractAction() {
+ public void actionPerformed(ActionEvent ae) {
+ MooKeyboard.setRelativeOctave(increase);
+ }};
+ return octaveAction;
+ }
+
+ /**
+ * Advances the current progress counter by printing a "." to the System output.
+ */
+ private void advanceStatus() {
+ System.out.print(".");
+ }
+
+ /**
+ * Listener for closing the program
+ */
+ class MooGUICloser extends WindowAdapter {
+ public void windowClosing(WindowEvent e) {
+ Moosique.quit();
+ }
+ }
+
+ /**
+ * TimerTask that resets the statusbar
+ */
+ class StatusResetTask extends TimerTask {
+ public void run() {
+ setStatus(" ");
+ }
+ }