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); } } }
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); } } }
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; }
public boolean isSelected() { return control.getValue(); }
public void setSelected(boolean bSelected) { control.setValue(bSelected); }