import javax.swing.*;
import java.awt.event.*;
+import java.awt.*;
+import java.awt.Color;
-public class MooToolbar extends JToolBar {
+public class MooToolbar extends JToolBar implements ActionListener {
public MooToolbar() {
fastforward = createButton("images/forward.gif", "fast forward");
add(fastforward);
- meas = createProgressIndikator("meas");
+ meas = createProjIndButton("Mrs: \n" + measures);
add(meas);
+
+ beat = createProjIndButton("Beat: \n" + beats);
+ add(beat);
+
+ tick = createProjIndButton("Tick: \n" + ticks);
+ add(tick);
+
}
private JButton createButton(String imageLocation, String toolTip) {
JButton button = new JButton (new ImageIcon(imageLocation));
button.setToolTipText(toolTip);
+ button.addActionListener(this);
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;
-
-
+ private JButton createProjIndButton(String title){
+ JButton abutton = new JButton(title);
+ abutton.setFont(new Font("Times New Roman", Font.PLAIN ,8));
+ abutton.setMinimumSize(new Dimension(30,22));
+ abutton.setVerticalTextPosition(AbstractButton.CENTER);
+ return abutton;
}
- /*public void actionPerformed(ActionEvent e) {
- String but = e.getActionCommand();
- if (but == "rewind") {
+ public void actionPerformed(ActionEvent e) {}
+
+ /*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;
+ private JButton meas;
+ private JButton beat;
+ private JButton tick;
+ private int measures = 1;
+ private int beats = 1;
+ private int ticks = 1;
+
}