コード例 #1
0
ファイル: Channel.java プロジェクト: svn2github/linuxsampler
  /** Invoked when the user clicks the mute button. */
  private void changeMute() {
    SamplerChannel sc = getChannelInfo();
    boolean b = true;

    /*
     * Changing the mute button icon now instead of
     * leaving the work to the notification mechanism of the LinuxSampler.
     */
    if (sc.isMuted() && !sc.isMutedBySolo()) {
      b = false;
      boolean hasSolo = CC.getSamplerModel().hasSoloChannel();

      if (sc.isSoloChannel() || !hasSolo) btnMute.setIcon(iconMuteOff);
      else btnMute.setIcon(iconMutedBySolo);
    } else btnMute.setIcon(iconMuteOn);

    getModel().setMute(b);
  }
コード例 #2
0
ファイル: Channel.java プロジェクト: svn2github/linuxsampler
  /** Invoked when the user clicks the solo button. */
  private void changeSolo() {
    SamplerChannel sc = getChannelInfo();
    boolean b = !sc.isSoloChannel();

    /*
     * Changing the solo button icon (and related) now instead of
     * leaving the work to the notification mechanism of the LinuxSampler.
     */
    if (b) {
      btnSolo.setIcon(iconSoloOn);
      if (sc.isMutedBySolo()) btnMute.setIcon(iconMuteOff);
    } else {
      btnSolo.setIcon(iconSoloOff);
      if (!sc.isMuted() && CC.getSamplerModel().getSoloChannelCount() > 1)
        btnMute.setIcon(iconMutedBySolo);
    }

    getModel().setSolo(b);
  }
コード例 #3
0
ファイル: Channel.java プロジェクト: svn2github/linuxsampler
 /**
  * Updates the mute button with the proper icon regarding to information obtained from <code>
  * channel</code>.
  *
  * @param channel A <code>SamplerChannel</code> instance containing the new settings for this
  *     channel.
  */
 private void updateMuteIcon(SamplerChannel channel) {
   if (channel.isMutedBySolo()) btnMute.setIcon(iconMutedBySolo);
   else if (channel.isMuted()) btnMute.setIcon(iconMuteOn);
   else btnMute.setIcon(iconMuteOff);
 }