/** @invisible
*
* Prints the available controls and their ranges to the console. Not all
* Controllers have all of the controls available on them so this is a way to find
* out what is available.
*
*/
public void printControls()
{
if (controls.length > 0)
{
System.out.println("Available controls are:");
for (int i = 0; i < controls.length; i++)
{
Control.Type type = controls[i].getType();
System.out.print(" " + type.toString());
if (type == VOLUME || type == GAIN || type == BALANCE || type == PAN)
{
FloatControl fc = (FloatControl) controls[i];
String shiftSupported = "does";
if (fc.getUpdatePeriod() == -1)
{
shiftSupported = "doesn't";
}
System.out.println(", which has a range of " + fc.getMaximum() + " to "
+ fc.getMinimum() + " and " + shiftSupported
+ " support shifting.");
}
else
{
System.out.println("");
}
}
}
else
{
System.out.println("There are no controls available.");
}
}
Controller.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:romanov
作者:
评论列表
文章目录