import javax.sound.midi.*;
import java.beans.*;
-/*
+/**
* The GUI-class representing the popupdialogs in the Track menu.
*
* @author Björn Lanneskog
MOVE_TRACK = 4,
JUMP = 5;
- /*
+ /**
* Constructor of the dialogs.
*/
public MooDialog(int type) {
}
}
- /*
- * Builds the add track popupdialog
+ /**
+ * Builds the add track popupdialog.
*/
private void makeAddDialog(Container pane, Track[] tracks) {
setVisible(true);
}
- /*
- * Builds the delete track popupdialog
+ /**
+ * Builds the delete track popupdialog.
*/
private void makeDelDialog(Container pane, Track[] tracks) {
setVisible(true);
}
- /*
- * Builds the copy track popupdialog
+ /**
+ * Builds the copy track popupdialog.
*/
private void makeCopyDialog(Container pane, Track[] tracks) {
setVisible(true);
}
- /*
+ /**
* Builds the move track popupdialog
*/
private void makeMoveDialog(Container pane, Track[] tracks) {
setVisible(true);
}
- /*
- * Builds the jump popupdialog
+ /**
+ * Builds the jump popupdialog.
*/
private void makeJumpDialog(Container pane) {
addItem(help, "Getting started");
addItem(help, "About");
}
-
+ /**
+ * Creats a menu in the menubar.
+ * @param name The name of the menu.
+ * @param mnemnic The shortcut-key to access the menu.
+ * @return menu The menu created.
+ */
private JMenu createMenu(String name, int mnemonic) {
JMenu menu = new JMenu(name);
menu.setMnemonic(mnemonic);
return menu;
}
+ /**
+ * Creats a menuitem in the menu.
+ * @param menu The menu where to add the menuitem.
+ * @param name The name of the menuitem.
+ * @return item The menuitem created.
+ */
private JMenuItem addItem(JMenu menu, String name) {
JMenuItem item = new JMenuItem(name);
item.addActionListener(this);
return item;
}
+ /**
+ * Creats a menuitem in the menu.
+ * @param menu The menu to where to add the menuitem.
+ * @param name The name of the menuitem.
+ * @param key The keystroke to access this menuitem.
+ * @return item The menuitem created.
+ */
private JMenuItem addItem(JMenu menu, String name, String key) {
JMenuItem item = new JMenuItem(name);
item.setAccelerator(KeyStroke.getKeyStroke(key));
return item;
}
+ /**
+ * Creats a menuitem in the menu.
+ * @param menu The menu to where to add the menuitem.
+ * @param name The name of the menuitem.
+ * @param key The keystroke to access this menuitem.
+ * @param mask The keyboard mask.
+ * @return item The menuitem created.
+ */
private JMenuItem addItem(JMenu menu, String name, int key, int mask) {
JMenuItem item = new JMenuItem(name);
item.setAccelerator(KeyStroke.getKeyStroke(key, mask));
}
return false;
}
-
+ /**
+ * Gets the users command of takes and properiate action
+ * @param e the action perfomed
+ */
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
Sequence seq;
} else if (command == "Transpose...") {
} else if (command == "Contents") {
- // contents to be filled in
+
JOptionPane.showMessageDialog(this, "här kommer contents komma");
} else if (command == "Getting started") {
- // getting started to be filled in
+
JOptionPane.showMessageDialog(null, "här kommer getting started komma");
} else if (command == "About") {
- // about to be filled in
+
JOptionPane.showMessageDialog(null, "här kommer about att komma");
}
}