From 0c741c06bf4400e6c32ef67fe17a16568ddb069f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Romero?= Date: Mon, 22 Jul 2019 23:45:32 +0200 Subject: [PATCH] Cosmetic changes in View, Send and Edit --- .../adr/helloiot/topicinfo/TopicInfoEditNode.java | 6 +----- .../topicinfo/TopicInfoPublicationSubscription.java | 2 +- .../com/adr/helloiot/topicinfo/TopicInfoSend.java | 2 +- .../com/adr/helloiot/fxml/topicinfoeditnode.fxml | 8 ++++---- .../adr/helloiot/fxml/topicinfoeditnode.properties | 2 -- .../helloiot/fxml/topicinfoeditnode_es.properties | 2 -- .../adr/helloiot/fxml/topicinfoeditnode_mobile.fxml | 12 ++++++------ 7 files changed, 13 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoEditNode.java b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoEditNode.java index 0dfdf86..cffe19e 100644 --- a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoEditNode.java +++ b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoEditNode.java @@ -162,11 +162,7 @@ public EditNodeFormat fromString(String value) { editqos.setConverter(new StringConverter() { @Override public String toString(Integer object) { - if (object < 0) { - return resources.getString("label.default"); - } else { - return object.toString(); - } + return object.toString(); } @Override diff --git a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoPublicationSubscription.java b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoPublicationSubscription.java index c371ec1..0aecb05 100644 --- a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoPublicationSubscription.java +++ b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoPublicationSubscription.java @@ -73,7 +73,7 @@ public void load(SubProperties properties) { color = c == null ? null : Color.valueOf(c); c = properties.getProperty(".background", null); background = c == null ? null : Color.valueOf(c); - qos = Integer.parseInt(properties.getProperty(".qos", "")); + qos = Integer.parseInt(properties.getProperty(".qos", "0")); retained = Boolean.parseBoolean(properties.getProperty(".retained", "false")); } diff --git a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoSend.java b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoSend.java index 64a489c..374c848 100644 --- a/src/main/java/com/adr/helloiot/topicinfo/TopicInfoSend.java +++ b/src/main/java/com/adr/helloiot/topicinfo/TopicInfoSend.java @@ -51,7 +51,7 @@ public DevicesUnits getDevicesUnits() throws HelloIoTException { EditEvent u = multiline ? new EditAreaEvent() : new EditEvent(); u.setPrefWidth(320.0); u.setLabel(getLabel().getValue()); - u.setFooter(topic + getQOSBadge(qos)); + u.setFooter(topicpub + getQOSBadge(qos)); setStyle(u); u.setDevice(d); UnitPage.setPage(u, page); diff --git a/src/main/resources/com/adr/helloiot/fxml/topicinfoeditnode.fxml b/src/main/resources/com/adr/helloiot/fxml/topicinfoeditnode.fxml index 2fc58ab..f54ed8d 100644 --- a/src/main/resources/com/adr/helloiot/fxml/topicinfoeditnode.fxml +++ b/src/main/resources/com/adr/helloiot/fxml/topicinfoeditnode.fxml @@ -42,10 +42,10 @@