Java Code Examples for javax.sound.sampled.Control#Type
The following examples show how to use
javax.sound.sampled.Control#Type .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractLine.java From Bytecoder with Apache License 2.0 | 5 votes |
@Override public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 2
Source File: AbstractLine.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 3
Source File: AbstractLine.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 4
Source File: ToString.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static void main(String args[]) throws Exception { System.out.println(); System.out.println(); System.out.println("4629190: CompoundControl: getMemberControls() and toString() throw NullPointerException"); String firstControlTypeName = "first_Control_Type_Name"; String secondControlTypeName = "second_Control_Type_Name"; String thirdControlTypeName = "third_Control_Type_Name"; Control.Type firstControlType = new TestControlType(firstControlTypeName); Control.Type secondControlType = new TestControlType(secondControlTypeName); Control.Type thirdControlType = new TestControlType(thirdControlTypeName); Control firstControl = new TestControl(firstControlType); Control secondControl = new TestControl(secondControlType); Control thirdControl = new TestControl(thirdControlType); String testCompoundControlTypeName = "CompoundControl_Type_Name"; CompoundControl.Type testCompoundControlType = new TestCompoundControlType(testCompoundControlTypeName); Control[] setControls = { firstControl, secondControl, thirdControl }; CompoundControl testedCompoundControl = new TestCompoundControl(testCompoundControlType, setControls); // this may throw exception if bug applies Control[] producedControls = testedCompoundControl.getMemberControls(); System.out.println("Got "+producedControls.length+" member controls."); // this may throw exception if bug applies String producedString = testedCompoundControl.toString(); System.out.println("toString() returned: "+producedString); System.out.println("Test passed."); }
Example 5
Source File: AbstractLine.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 6
Source File: AbstractLine.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 7
Source File: AbstractLine.java From Bytecoder with Apache License 2.0 | 5 votes |
@Override public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 8
Source File: AbstractLine.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 9
Source File: AbstractLine.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 10
Source File: AbstractLine.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 11
Source File: AbstractLine.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 12
Source File: AbstractLine.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 13
Source File: AbstractLine.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 14
Source File: AbstractLine.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 15
Source File: AbstractLine.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 16
Source File: AbstractLine.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public final boolean isControlSupported(Control.Type controlType) { // protect against a NullPointerException if (controlType == null) { return false; } for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return true; } } return false; }
Example 17
Source File: AbstractLine.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public final Control getControl(Control.Type controlType) { // protect against a NullPointerException if (controlType != null) { for (int i = 0; i < controls.length; i++) { if (controlType == controls[i].getType()) { return controls[i]; } } } throw new IllegalArgumentException("Unsupported control type: " + controlType); }
Example 18
Source File: ToString.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
TestControl(Control.Type type) { super(type); }
Example 19
Source File: LineInfoNPE.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public Control getControl(Control.Type control) { return null; }
Example 20
Source File: LineInfoNPE.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public boolean isControlSupported(Control.Type control) { return false; }