예제 #1
0
  public void setMuteForMicrophoneOutput() {
    TreePath path = findByName(new TreePath(root), new String[] {"SPEAKER", "Microfone", "Mute"});

    if (path == null) {
      path = findByName(new TreePath(root), new String[] {"MIC target", "mic", "Mute"});
    }

    if (path != null) {
      if (path.getLastPathComponent() instanceof JavaMixer.ControlNode) {
        BooleanControl bControl =
            (BooleanControl) (((JavaMixer.ControlNode) path.getLastPathComponent()).getControl());
        bControl.setValue(true);
      }
    }
  }
예제 #2
0
  public void setMicrophoneInput() {
    TreePath path = findByName(new TreePath(root), new String[] {"MICROPHONE", "Select"});

    if (path == null) {
      path = findByName(new TreePath(root), new String[] {"Capture source", "Capture", "Mute"});
    }

    if (path != null) {
      if (path.getLastPathComponent() instanceof JavaMixer.ControlNode) {
        BooleanControl bControl =
            (BooleanControl) (((JavaMixer.ControlNode) path.getLastPathComponent()).getControl());
        bControl.setValue(true);
      }
    }
  }
예제 #3
0
 private JComponent createControlComponent(BooleanControl control) {
   AbstractButton button;
   String strControlName = control.getType().toString();
   ButtonModel model = new JavaMixer.BooleanControlButtonModel(control);
   button = new JCheckBox(strControlName);
   button.setModel(model);
   return button;
 }
예제 #4
0
 public boolean isSelected() {
   return control.getValue();
 }
예제 #5
0
 public void setSelected(boolean bSelected) {
   control.setValue(bSelected);
 }