X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooTrackTitle.java;h=979aed2139208e234f4124871b34b955fe536aef;hb=a8dda23889d7c48a8b3313e2a141ed378bf8ff1c;hp=e22c3219846e013d6553dbbda8f851c8b65fe250;hpb=ecef41268a927f27f71839d5df1d68a151b37e5e;p=moosique.git diff --git a/MooTrackTitle.java b/MooTrackTitle.java index e22c321..979aed2 100644 --- a/MooTrackTitle.java +++ b/MooTrackTitle.java @@ -25,6 +25,16 @@ public class MooTrackTitle extends JPanel { private String trackName = ""; private int channel = 0; + /** + * Creates the title bar for an empty track, and therefore an initial channel is required. + * @param aTrack the track that this tracktitle is operating on. + * @param chan the initial channel + */ + public MooTrackTitle (Track aTrack, int chan) { + this(aTrack); + channel = chan; + } + /** * Creates the title bar. * @param aTrack the track that this tracktitle is operating on. @@ -93,22 +103,24 @@ public class MooTrackTitle extends JPanel { checkboxes.setLayout(new GridLayout(1,3)); mute = new JCheckBox("Mute"); - mute.setSelected(Moosique.getChannel(channel).getMute()); + mute.setSelected(false); + Moosique.setTrackMute(track, false); mute.setFont(Moosique.getGUI().FONT); mute.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent event){ boolean selected = mute.isSelected(); if (selected){ solo.setSelected(false); - Moosique.getChannel(channel).setSolo(false); + Moosique.setTrackSolo(track, false); } - Moosique.getChannel(channel).setMute(selected); + Moosique.setTrackMute(track, selected); }}); checkboxes.add(mute); solo = new JCheckBox("Solo"); - solo.setSelected(Moosique.getChannel(channel).getSolo()); + solo.setSelected(false); + Moosique.setTrackSolo(track, false); solo.setFont(Moosique.getGUI().FONT); solo.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent event){ @@ -116,9 +128,9 @@ public class MooTrackTitle extends JPanel { boolean selected = solo.isSelected(); if (selected){ mute.setSelected(false); - Moosique.getChannel(channel).setMute(false); + Moosique.setTrackMute(track, false); } - Moosique.getChannel(channel).setSolo(selected); + Moosique.setTrackSolo(track, selected); }}); checkboxes.add(solo); add(checkboxes);