use of com.biglybt.ui.swt.devices.add.DeviceTemplateChooser in project BiglyBT by BiglySoftware.
the class DeviceManagerUI method addNewDevice.
/**
* @since 4.1.0.5
*/
protected void addNewDevice() {
ManufacturerChooser mfChooser = new ManufacturerChooser();
mfChooser.open(new ManufacturerChooser.ClosedListener() {
@Override
public void MfChooserClosed(DeviceManufacturer mf) {
if (mf == null) {
return;
}
DeviceTemplateChooser deviceTemplateChooser = new DeviceTemplateChooser(mf);
deviceTemplateChooser.open(new DeviceTemplateChooser.DeviceTemplateClosedListener() {
@Override
public void deviceTemplateChooserClosed(DeviceTemplate deviceTemplate) {
if (deviceTemplate == null) {
return;
}
Device device;
try {
device = deviceTemplate.createInstance(deviceTemplate.getName() + " test!");
device.requestAttention();
} catch (DeviceManagerException e) {
Debug.out(e);
}
/* Don't really need to choose a profile now..
TranscodeProfile[] profiles = null;// deviceTemplate.getTranscodeProfiles();
new TranscodeChooser(profiles) {
public void closed() {
Utils.openMessageBox(null, 0, "CHOSE", "You chose "
+ (selectedProfile == null ? "NULL"
: selectedProfile.getName()));
}
};
*/
}
});
}
});
}
Aggregations