diff options
author | Jonathan Bauer | 2016-03-17 17:41:28 +0100 |
---|---|---|
committer | Jonathan Bauer | 2016-03-17 17:41:28 +0100 |
commit | d2f7fa75f4cdd22176a54a74a0f127559a17df98 (patch) | |
tree | bd0c3ee35cfa69b4287dbc58c29bd1e7b207c27c /dozentenmodul/src/main/java/org/openslx/dozmod/gui/control | |
parent | [client] fix newlines removed beeing counted to the number of rules that were... (diff) | |
download | tutor-module-d2f7fa75f4cdd22176a54a74a0f127559a17df98.tar.gz tutor-module-d2f7fa75f4cdd22176a54a74a0f127559a17df98.tar.xz tutor-module-d2f7fa75f4cdd22176a54a74a0f127559a17df98.zip |
[client] formatting
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/control')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/AdvancedConfigurator.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/AdvancedConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/AdvancedConfigurator.java index 3849621f..eeb4a483 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/AdvancedConfigurator.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/AdvancedConfigurator.java @@ -98,7 +98,8 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { public void setState(final AdvancedConfiguration config) { // setText() blanks the text area if null is given, so no null checks originalRawRuleText = decodeNetRulesToText(config.netRulesList); - originalRunScript = config.runScriptText != null ? config.runScriptText : ""; + originalRunScript = config.runScriptText != null ? config.runScriptText + : ""; this.tpNetworkRules.setText(originalRawRuleText); this.taRunScript.setText(originalRunScript); } @@ -175,8 +176,8 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { LOGGER.debug("Invalid number of fields! Expected 3, got: " + fields.length); Gui.showMessageBox( - "Ungültige Syntax: Nutzen Sie: <host> <port> [in|out]", - MessageType.ERROR, LOGGER, null); + "Ungültige Syntax: Nutzen Sie: <host> <port> [in|out]", + MessageType.ERROR, LOGGER, null); break; } @@ -190,8 +191,8 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { LOGGER.debug("Invalid net direction! Expected 'in' or out'. Got: " + ruleDirection); Gui.showMessageBox( - "Ungültige Richtung: nur 'in', 'out' erlaubt!", - MessageType.ERROR, LOGGER, null); + "Ungültige Richtung: nur 'in', 'out' erlaubt!", + MessageType.ERROR, LOGGER, null); break; } // check port: accept if > -2 and < 65535 @@ -207,8 +208,8 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { markText(ruleLine, Color.RED); LOGGER.debug("Invalid port number! Got: " + port); Gui.showMessageBox( - "Ungültiges Port! Muss zwischen 0 und 65536 sein.", - MessageType.ERROR, LOGGER, null); + "Ungültiges Port! Muss zwischen 0 und 65536 sein.", + MessageType.ERROR, LOGGER, null); break; } // check hostname: bit more to do here @@ -234,14 +235,12 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { LOGGER.debug("Invalid host/IP! Got: " + fields[0]); if (checkHostnameSimple(fields[0])) { markText(ruleLine, Color.ORANGE); - if (!Gui.showMessageBox( - "Konnte '" - + fields[0] - + "' nicht verifizieren. Wollen Sie es trotzdem verwenden?", - MessageType.WARNING_RETRY, LOGGER, null)) { + if (!Gui.showMessageBox( + "Konnte '" + + fields[0] + + "' nicht verifizieren. Wollen Sie es trotzdem verwenden?", + MessageType.WARNING_RETRY, LOGGER, null)) { break; - } else { - // keep it } } else { markText(ruleLine, Color.RED); @@ -255,7 +254,8 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { .toUpperCase()), fields[0], port)); } if (netRules.size() == rulesList.size()) { - // pruned rules were successfully parsed so they are valid: set the textpane to it + // pruned rules were successfully parsed so they are valid: set the + // textpane to it tpNetworkRules.setText(prunedRawNetRules); LOGGER.debug("Success"); return rulesList; @@ -341,7 +341,7 @@ public class AdvancedConfigurator extends AdvancedConfiguratorLayout { e); } // resetting the char attr to what they were before (buggy) - + tpNetworkRules.setStyledDocument(doc); StyleConstants.setForeground(set, Color.WHITE); StyleConstants.setBold(set, false); |