* for duplicates.
*/
protected void updateDeviceList(boolean checkForDuplicates) {
if ((this.deviceList != null) && (this.view.getModel().getRowCount() > 0)) {
ArrayList<String> canceledNames = new ArrayList<String>();
IDevice deviceInModel = null;
IDevice deviceInView = null;
String deviceNameInModel = null;
String deviceNameInView = null;
Boolean isEnabledInView = false;
boolean isCommonInView = false;
boolean addDevice = false;
for (int i = 0; i < this.view.getModel().getRowCount(); i++) {
addDevice = false;
if(i < deviceList.size()) {
deviceInModel = deviceList.get(i);
deviceNameInModel = deviceInModel.getName();
}
else {
addDevice = true;
deviceInModel = generateDevice();
}
deviceInView = (IDevice) this.view.getModel().getValueAt(i, 1);
deviceNameInView = deviceInView.getName();
isEnabledInView = (Boolean) this.view.getModel().getValueAt(i, 0);
isCommonInView = deviceInView.isCommon();
deviceInModel.setName(deviceNameInView);
deviceInModel.setEnabled(isEnabledInView);
deviceInModel.setCommon(isCommonInView);