2 import java.awt.event.*;
5 public class MooToolbar extends JToolBar implements ActionListener {
9 rewind = createButton("images/rewind.gif", "rewind");
12 playpause = createButton("images/play.gif", "play");
15 stop = createButton("images/stop.gif", "stop");
18 fastforward = createButton("images/forward.gif", "fast forward");
21 meas = createProjIndLabel("Mrs");
22 beat = createProjIndLabel("Beat");
23 tick = createProjIndLabel("Tick");
25 measvalue = createProjIndLabel("1");
26 beatvalue = createProjIndLabel("1");
27 ticksvalue = createProjIndLabel("1");
29 JPanel measbeattick = new JPanel();
30 measbeattick.setMaximumSize(new Dimension(80,40));
31 measbeattick.setLayout(new GridLayout(2,3));
32 measbeattick.add(meas);
33 measbeattick.add(beat);
34 measbeattick.add(tick);
35 measbeattick.add(measvalue);
36 measbeattick.add(beatvalue);
37 measbeattick.add(ticksvalue);
42 private JButton createButton(String imageLocation, String toolTip) {
43 JButton button = new JButton (new ImageIcon(imageLocation));
44 button.setToolTipText(toolTip);
45 button.addActionListener(this);
50 private JLabel createProjIndLabel(String title){
51 JLabel titelvalue = new JLabel(title, JLabel.CENTER);
52 titelvalue.setFont(new Font("Times New Roman", Font.PLAIN ,8));
53 titelvalue.setHorizontalTextPosition(JLabel.CENTER);
58 public void actionPerformed(ActionEvent e) {}
70 private JButton rewind;
71 private JButton playpause;
73 private JButton fastforward;
77 private JLabel measvalue;
78 private JLabel beatvalue;
79 private JLabel ticksvalue;