statusBar.setBackground(bgColor);
view.setBackground(bgColor);
+ ActionMap am = getRootPane().getActionMap();
+
+ Action playAction = new AbstractAction() {
+ public void actionPerformed(ActionEvent ae) {
+ Moosique.resumepause();
+ }};
+ am.put("play", playAction);
+
+ InputMap im = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+ KeyStroke playKey = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0);
+ im.put(playKey, "play");
+
+
// Configures window.
addWindowListener(new MooGUICloser());
pack();
comps[i].setBackground(bgColor);
}
}
-
+
/**
* Changes the sequence of the GUI.
* @param sequence the MIDI sequence to visualize
// Calls on the toolbar to update the progress indicator.
//toolbar.updateProgInd();
}
-
+
class MooGUICloser extends WindowAdapter {
public void windowClosing(WindowEvent e) {
Moosique.quit();