}
@UIMethod
- private boolean selectDeviceCombo(int index) {
- boolean bret = false;
- List<String> devicelist = deviceCombo.getItems();
- if (index < devicelist.size()) {
- String deviceName = devicelist.get(index);
- bret = DeviceManager.onDeviceSelected(deviceName);
- if (bret) {
- deviceCombo.select(index);
- if (!deviceName.isEmpty()) {
- deviceCombo.setToolTipText(deviceName);
- }
- }
- }
-
- return bret;
- }
-
- @UIMethod
private boolean selectDeviceCombo(String deviceName) {
boolean bret = false;
// restore current selection
if (!selectDeviceCombo(newSelectedDevice)) {
// if there is no such device in device list, just select first one
- selectDeviceCombo(0);
ShowDeviceComboTitle();
}