Skip to content

Commit

Permalink
Using the base device class
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianromero committed May 6, 2016
1 parent 836a501 commit 0f25ec5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/adr/helloiot/unit/EditView.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.adr.hellocommon.utils.AbstractController;
import com.adr.helloiot.EventMessage;
import com.adr.helloiot.HelloIoTAppPublic;
import com.adr.helloiot.device.DeviceBase;
import com.adr.helloiot.device.DeviceBasic;
import com.google.common.base.Strings;
import com.google.common.eventbus.Subscribe;
Expand All @@ -37,7 +38,7 @@ public class EditView extends VBox implements Unit, AbstractController {
@FXML private Label field;
@FXML private TextInputControl statusview;

private DeviceBasic device = null;
private DeviceBase device = null;

public EditView() {
loadFXML();
Expand Down Expand Up @@ -88,14 +89,14 @@ public Node getNode() {
return this;
}

public void setDevice(DeviceBasic device) {
public void setDevice(DeviceBase device) {
this.device = device;
if (Strings.isNullOrEmpty(getLabel())) {
setLabel(device.getProperties().getProperty("label"));
}
}

public DeviceBasic getDevice() {
public DeviceBase getDevice() {
return device;
}

Expand Down

0 comments on commit 0f25ec5

Please sign in to comment.