X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooGUI.java;h=1ab280f9bc97e6608900df269cab5d9236c5e876;hb=99b83588ad553537f891efaf5fbe95e7b9e5442b;hp=944ed986fcf26993440ca78a1c576874b6671542;hpb=5c89e592698dba86380de9bebc21edeaf03ebbd2;p=moosique.git diff --git a/MooGUI.java b/MooGUI.java index 944ed98..1ab280f 100644 --- a/MooGUI.java +++ b/MooGUI.java @@ -11,26 +11,39 @@ import java.awt.event.*; public class MooGUI extends JFrame implements WindowListener { - Sequence seq; + private Sequence seq; + private JLabel statusBar; + private // MooView view; /** * Creates the GUI. */ public MooGUI(Sequence seq) { super("Moosique"); + + // Adds menu bar. setJMenuBar(new MooMenu()); + + // Adds toolbar. getContentPane().add(new MooToolbar(), BorderLayout.NORTH); addWindowListener(this); + + // Adds main view. + // view = new MooView(); + + // Adds status bar. + statusBar = new JLabel("Welcome to Moosique!", Label.CENTER); + MooInstrumentList m = new MooInstrumentList(); getContentPane().add(m, BorderLayout.CENTER); m.addKeyListener(new MooKeyboard()); pack(); - //Dimension bounds = new Dimension(300,70); - -// setSize(bounds.width,bounds.height); - //setLocation((Toolkit.getDefaultToolkit().getScreenSize().width / 2) - (bounds.width / 2), (Toolkit.getDefaultToolkit().getScreenSize().height / 2) - (bounds.height / 2)); -// setResizable(false); - //setBackground(Color.white); + + // Dimension bounds = new Dimension(300,70); + // setSize(bounds.width,bounds.height); + // setLocation((Toolkit.getDefaultToolkit().getScreenSize().width / 2) - (bounds.width / 2), (Toolkit.getDefaultToolkit().getScreenSize().height / 2) - (bounds.height / 2)); + // setResizable(false); + // setBackground(Color.white); setVisible(true); } @@ -42,6 +55,14 @@ public class MooGUI extends JFrame implements WindowListener { seq = sequence; } + /** + * Shows the given message in the status bar. + * @param text the message to show + */ + public void setStatus(String text) { + statusBar.setText(text); + } + public void windowOpened(WindowEvent e) {} public void windowClosing(WindowEvent e) {Moosique.quit();} public void windowClosed(WindowEvent e) {}