X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooToolbar.java;h=db736f2b2b79d8f583372b6ffc80c97866fc5443;hb=9f707c235c36921753665933a6b959bfa1027fff;hp=5eae4772a3b12120f0a4ea6777c500a4af00ae37;hpb=d7666fadd2f8baca8a03cacae836f2563fe4dd5d;p=moosique.git diff --git a/MooToolbar.java b/MooToolbar.java index 5eae477..db736f2 100644 --- a/MooToolbar.java +++ b/MooToolbar.java @@ -1,18 +1,44 @@ import javax.swing.*; -/** - * - * - * @author Andersson, Andreen, Lanneskog, Pehrson - * @version 1 - */ - -public class MooToolbar { - - /** - * Creates the toolbar. - */ - public MooToolbar () { +public class MooToolbar extends JToolBar +{ + public MooToolbar() + { + + add(createRewindButton()); + add(createPlayPauseButton()); + add(createStopButton()); + add(createFastForwardButton()); + + } + public JButton createRewindButton() + { + JButton rewind = new JButton(new ImageIcon("images/rewind.gif")); + rewind.setToolTipText("rewind"); + return rewind; + } + + public JButton createPlayPauseButton() + { + JButton playpause = new JButton(new ImageIcon("images/play.gif")); + playpause.setToolTipText("play/pause"); + return playpause; } + + public JButton createStopButton() + { + JButton stop = new JButton(new ImageIcon("images/stop.gif")); + stop.setToolTipText("stop"); + return stop; + } + + public JButton createFastForwardButton() + { + JButton fastforward = new JButton(new + ImageIcon("images/forward.gif")); + fastforward.setToolTipText("fast forward"); + return fastforward; + } + }