X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooGUI.java;h=e1ee025a60476934fcabe2a2fc03836e4e891748;hp=71b14937a1f8f1a0e610a08b085a43727df50ff5;hb=c3a31c2aa833e2197f0929655c69a2090e8bbecc;hpb=2236a670e9f9c0a83c97b9cd4ae8ffaa0a051519 diff --git a/MooGUI.java b/MooGUI.java index 71b1493..e1ee025 100644 --- a/MooGUI.java +++ b/MooGUI.java @@ -24,6 +24,7 @@ public class MooGUI extends JFrame { /** * Creates the GUI. + * @param seq The sequence that the program is operating on. */ public MooGUI(Sequence seq) { super("Moosique"); @@ -103,6 +104,10 @@ public class MooGUI extends JFrame { show(); } + /** + * Sets the background on Containers + * @param c the Container that will have it's background change + */ private void setBackground(Container c) { c.setBackground(bgColor); Component[] comps = c.getComponents(); @@ -117,7 +122,7 @@ public class MooGUI extends JFrame { */ public void setSequence(Sequence sequence) { seq = sequence; - view.setTracks(seq.getTracks()); + view.setTracks(seq.getTracks(), true); toolbar.resetProgInd(); } @@ -139,6 +144,10 @@ public class MooGUI extends JFrame { toolbar.updateProgInd(tickPosition); } + /** + * Creates an action for a specific octave. + * @param octave The octave we want an action for. + */ private Action createOctaveAction(final int octave) { Action octaveAction = new AbstractAction() { public void actionPerformed(ActionEvent ae) { @@ -147,12 +156,18 @@ public class MooGUI extends JFrame { return octaveAction; } + /** + * Listener for closing the program + */ class MooGUICloser extends WindowAdapter { public void windowClosing(WindowEvent e) { Moosique.quit(); } } + /** + * TimerTask that resets the statusbar + */ class StatusResetTask extends TimerTask { public void run() { setStatus(" ");