|
@@ -34,8 +34,8 @@ public class NetworkController {
|
|
private NetworkTreeSettingsController networkTreeSettings;
|
|
private NetworkTreeSettingsController networkTreeSettings;
|
|
/**
|
|
/**
|
|
* Creates a new NetworkController, which may manipulate the given model and use the controller
|
|
* Creates a new NetworkController, which may manipulate the given model and use the controller
|
|
- * @param model
|
|
|
|
- * @param controller
|
|
|
|
|
|
+ * @param model Model which can be manipulated
|
|
|
|
+ * @param controller main controller for updates etc
|
|
*/
|
|
*/
|
|
public NetworkController(Model model, Controller controller) {
|
|
public NetworkController(Model model, Controller controller) {
|
|
this.model = model;
|
|
this.model = model;
|
|
@@ -128,8 +128,8 @@ public class NetworkController {
|
|
model.getDevices().remove(toDelete);
|
|
model.getDevices().remove(toDelete);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
- * Returns smartDevices of the model
|
|
|
|
- * @return
|
|
|
|
|
|
+ * Returns smartDevices of the model, which are not hidden
|
|
|
|
+ * @return all SmartDevices which are not hidden
|
|
*/
|
|
*/
|
|
public Collection<SmartDevice> getVisibleSmartDevices(){
|
|
public Collection<SmartDevice> getVisibleSmartDevices(){
|
|
LinkedList<SmartDevice> devices = new LinkedList<SmartDevice>(model.getDevices());
|
|
LinkedList<SmartDevice> devices = new LinkedList<SmartDevice>(model.getDevices());
|
|
@@ -138,7 +138,7 @@ public class NetworkController {
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Returns smartDevices of the model
|
|
* Returns smartDevices of the model
|
|
- * @return
|
|
|
|
|
|
+ * @return all SmartDevices of the model
|
|
*/
|
|
*/
|
|
public Collection<SmartDevice> getSmartDevices(){
|
|
public Collection<SmartDevice> getSmartDevices(){
|
|
return model.getDevices();
|
|
return model.getDevices();
|
|
@@ -323,7 +323,7 @@ public class NetworkController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Removes Device p from the Connection & Protocol
|
|
|
|
|
|
+ * Removes Device p from the Connection and Protocol
|
|
* @param p Port/Device to remove
|
|
* @param p Port/Device to remove
|
|
* @param connection connection, which should remove the device
|
|
* @param connection connection, which should remove the device
|
|
*/
|
|
*/
|
|
@@ -342,7 +342,7 @@ public class NetworkController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Removes Device p from the Connection & Protocol
|
|
|
|
|
|
+ * Removes Device p from the Connection and Protocol
|
|
* @param p Port/Device to remove
|
|
* @param p Port/Device to remove
|
|
* @param connection connection, which should remove the device
|
|
* @param connection connection, which should remove the device
|
|
*/
|
|
*/
|
|
@@ -401,7 +401,7 @@ public class NetworkController {
|
|
* Changes the link of the given connection to the new link. Returns true if it was successfully changed, false if it could not be changed.
|
|
* Changes the link of the given connection to the new link. Returns true if it was successfully changed, false if it could not be changed.
|
|
* @param connection connection which should be edited
|
|
* @param connection connection which should be edited
|
|
* @param link new link
|
|
* @param link new link
|
|
- * @return true on successful change, false on failure & restore
|
|
|
|
|
|
+ * @return true on successful change, false on failure and restore
|
|
*/
|
|
*/
|
|
public boolean changeLinkOfConnection(Connection connection, Link link) {
|
|
public boolean changeLinkOfConnection(Connection connection, Link link) {
|
|
if(connection !=null && link != null){
|
|
if(connection !=null && link != null){
|