From: Björn Lanneskog Date: Wed, 7 May 2003 18:09:02 +0000 (+0000) Subject: fixat lite mer menyer som einar bad om X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=commitdiff_plain;h=5070c768b27475649fe77cb5acd71237d86bdf6c fixat lite mer menyer som einar bad om --- diff --git a/MooMenu.java b/MooMenu.java index 379a11e..d1d8f3c 100644 --- a/MooMenu.java +++ b/MooMenu.java @@ -31,7 +31,7 @@ Kanske ocks */ - private JMenu file, edit, playback, track, help; + private JMenu file, edit, playback, track, help, music; public MooMenu() { file = makeMenu("File", KeyEvent.VK_F); @@ -67,7 +67,17 @@ Kanske ocks track.add(makeAccItem(track, "Delete", KeyEvent.VK_D)); track.add(makeAccItem(track, "Copy track", KeyEvent.VK_Y)); track.add(makeAccItem(track, "Move", KeyEvent.VK_M)); - + + music = makeMenu("Music", KeyEvent.VK_T); + add(music); + + music.add(makeItem(track, "Insert measure...")); + music.add(makeItem(track, "Delete measure...")); + music.add(makeItem(track, "Time signature...")); + music.add(makeItem(track, "Tempo...")); + music.add(makeItem(track, "Scale velocity...")); + music.add(makeItem(track, "Transpose...")); + help = makeMenu("Help", KeyEvent.VK_P); add(help); @@ -153,6 +163,18 @@ Kanske ocks } else if (command == "Move") { + } else if (command == "Insert Measure...") { + + } else if (command == "Delete Measure...") { + + } else if (command == "Time Signature...") { + + } else if (command == "Tempo...") { + + } else if (command == "Scale Velocity...") { + + } else if (command == "Transpose...") { + } else if (command == "Contents") { // contents to be filled in JOptionPane.showMessageDialog(this, "här kommer contents komma"); diff --git a/MooToolbar.java b/MooToolbar.java index 2415b3b..22cde75 100644 --- a/MooToolbar.java +++ b/MooToolbar.java @@ -1,7 +1,8 @@ import javax.swing.*; import java.awt.event.*; +import java.awt.*; -public class MooToolbar extends JToolBar { +public class MooToolbar extends JToolBar implements ActionListener { public MooToolbar() { @@ -17,44 +18,35 @@ public class MooToolbar extends JToolBar { fastforward = createButton("images/forward.gif", "fast forward"); add(fastforward); - meas = createProgressIndikator("meas"); - add(meas); + } private JButton createButton(String imageLocation, String toolTip) { JButton button = new JButton (new ImageIcon(imageLocation)); button.setToolTipText(toolTip); + button.addActionListener(this); + //JOptionPane.showMessageDialog(rewind.getActionEvent()); return button; } - private JPanel createProgressIndikator(String name) { - JPanel panel = new JPanel(); - JLabel label = new JLabel(name); - JComboBox combo = new JComboBox(); - add(label); - add(combo); - return panel; + public void actionPerformed(ActionEvent e) { - - } - - /*public void actionPerformed(ActionEvent e) { - String but = e.getActionCommand(); - if (but == "rewind") { + System.out.println(e.getSource()); + + /*if () { - } else if (but == "images/play.gif") { - JOptionPane.showMessageDialog(null, "playing"); + } else if () { + - } else if (but == "stop") { + } else if () { - } else if (but == "rewind") { + } else if () { - } - }*/ + }*/ + } private JButton rewind; private JButton playpause; private JButton stop; private JButton fastforward; - private JPanel meas; }