@Override
public void deviceAdded(String device) {
configManager.addActuator(device, false);
List<IDimension> dimensionList = configManager.getDimensionList();
IDimension tmpDimension = null;
if ((dimensionList != null) && !dimensionList.isEmpty()) {
tmpDimension = dimensionList.get(0);
actuatorXPanel.setDeviceList(tmpDimension.getActuatorsList());
}
}
@Override
public void devicesAdded(List<String> devices) {
if (devices != null) {
for (String device : devices) {
configManager.addActuator(device, false);
}
List<IDimension> dimensionList = configManager.getDimensionList();
IDimension tmpDimension = null;
if ((dimensionList != null) && !dimensionList.isEmpty()) {
tmpDimension = dimensionList.get(0);
actuatorXPanel.setDeviceList(tmpDimension.getActuatorsList());
}
}
}
};
actuatorXPanel = new DeviceListTable(actuatorXListener);
if (suggestions != null) {
actuatorXPanel.setSuggestionList(suggestions.getActuatorSuggestionList());
}
IDeviceListTableListener actuatorYListener = new IDeviceListTableListener() {
@Override
public void deviceRenamed(String oldName, String newName) {
configManager.renameActuator(oldName, newName);
}
@Override
public void deviceRemoved(String device) {
configManager.deleteActuator(device);
}
@Override
public void deviceEnabled(String device, boolean enabled) {
configManager.setActuatorEnable(device, enabled);
}
@Override
public void deviceAdded(String device) {
configManager.addActuator(device, true);
List<IDimension> dimensionList = configManager.getDimensionList();
IDimension tmpDimension = null;
if ((dimensionList != null) && (dimensionList.size() > 1)) {
tmpDimension = dimensionList.get(1);
actuatorYPanel.setDeviceList(tmpDimension.getActuatorsList());
}
}
@Override
public void devicesAdded(List<String> devices) {
if (devices != null) {
for (String device : devices) {
configManager.addActuator(device, true);
}
List<IDimension> dimensionList = configManager.getDimensionList();
IDimension tmpDimension = null;
if ((dimensionList != null) && (dimensionList.size() > 1)) {
tmpDimension = dimensionList.get(1);
actuatorYPanel.setDeviceList(tmpDimension.getActuatorsList());
}
}
}
};