X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooTrackTitle.java;h=c2f1c0fa20097364e509b16493e548ec7916f250;hb=fa1fa9b49b64d1dfc4f7d62347f9a711ddbdf99c;hp=d5876c1485718a34f6ae3ef940152182d5f2974c;hpb=ce9a16d679f2058454af367e972888ba8e2c34c0;p=moosique.git diff --git a/MooTrackTitle.java b/MooTrackTitle.java index d5876c1..c2f1c0f 100644 --- a/MooTrackTitle.java +++ b/MooTrackTitle.java @@ -27,6 +27,7 @@ public class MooTrackTitle extends JPanel { /** * Creates the title bar. + * @param aTrack the track that this tracktitle is operating on. */ public MooTrackTitle (Track aTrack) { setDoubleBuffered(true); @@ -59,8 +60,11 @@ public class MooTrackTitle extends JPanel { title.addFocusListener(new TitleFocusListener()); add(title); - instruments = new MooInstrumentList(channel); - // instruments = new MooInstrumentList(channel, programChangeMessage); + int type; + if (channel == 9) type = MooInstrumentList.DRUMS; + else type = MooInstrumentList.INSTRUMENTS; + instruments = new MooInstrumentList(channel, type); + // instruments = new MooInstrumentList(channel, type, programChangeMessage); add(instruments); channelBox = new JComboBox(); @@ -119,7 +123,18 @@ public class MooTrackTitle extends JPanel { checkboxes.add(solo); add(checkboxes); } + + /** + * Returns the channel of the track that the view is visualising. + * @return the chanel of the visualised track + */ + public int getChannel() { + return channel; + } + /** + * Checks if the focus is lost. + */ class TitleFocusListener extends FocusAdapter { public void focusLost(FocusEvent e) { // Update the MidiEvent containing the title of this track