]> ruin.nu Git - moosique.git/commitdiff
*** empty log message ***
authorBjörn Lanneskog <lannesko@itstud.chalmers.se>
Fri, 16 May 2003 16:16:39 +0000 (16:16 +0000)
committerBjörn Lanneskog <lannesko@itstud.chalmers.se>
Fri, 16 May 2003 16:16:39 +0000 (16:16 +0000)
MooDialog.java
MooMenu.java

index 4185d4c2d2f97317c32b31c19a77dc269118816a..82305788c5220b897c4c1ca8e33db5ac0b3cd2d8 100644 (file)
@@ -4,7 +4,7 @@ import java.awt.event.*;
 import javax.sound.midi.*;
 import java.beans.*;
 
-/*
+/**
  * The GUI-class representing the popupdialogs in the Track menu.
  *
  * @author Björn Lanneskog
@@ -22,7 +22,7 @@ public class MooDialog extends JDialog {
                                MOVE_TRACK = 4,
                                JUMP = 5;
        
-       /*
+       /**
         * Constructor of the dialogs.
         */
         public MooDialog(int type) {
@@ -66,8 +66,8 @@ public class MooDialog extends JDialog {
                }
         }
        
-       /*
-        * Builds the add track popupdialog
+       /**
+        * Builds the add track popupdialog.
         */
        private void makeAddDialog(Container pane, Track[] tracks) {
        
@@ -101,8 +101,8 @@ public class MooDialog extends JDialog {
                setVisible(true);
        }
        
-       /*
-        * Builds the delete track popupdialog
+       /**
+        * Builds the delete track popupdialog.
         */
        private void makeDelDialog(Container pane, Track[] tracks) {
        
@@ -130,8 +130,8 @@ public class MooDialog extends JDialog {
                setVisible(true);
        }
        
-       /*
-        * Builds the copy track popupdialog
+       /**
+        * Builds the copy track popupdialog.
         */
        private void makeCopyDialog(Container pane, Track[] tracks) {
        
@@ -166,7 +166,7 @@ public class MooDialog extends JDialog {
                setVisible(true);
        }
        
-       /*
+       /**
         * Builds the move track popupdialog
         */
        private void makeMoveDialog(Container pane, Track[] tracks) {
@@ -202,8 +202,8 @@ public class MooDialog extends JDialog {
                setVisible(true);
        }
        
-       /*
-        * Builds the jump popupdialog
+       /**
+        * Builds the jump popupdialog.
         */
        private void makeJumpDialog(Container pane) {
                
index 5d8dd36c6f7e0dd78b6e24d6130563ef73daaf3b..f51af1a28de19f14c5234bae9dd3f879eb2d7cc0 100644 (file)
@@ -71,13 +71,24 @@ public class MooMenu extends JMenuBar implements ActionListener {
                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);
@@ -85,6 +96,13 @@ public class MooMenu extends JMenuBar implements ActionListener {
                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));
@@ -93,6 +111,14 @@ public class MooMenu extends JMenuBar implements ActionListener {
                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));
@@ -108,7 +134,10 @@ public class MooMenu extends JMenuBar implements ActionListener {
                }
                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;
@@ -204,15 +233,15 @@ public class MooMenu extends JMenuBar implements ActionListener {
                } 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");
                }
        }