From 171863a8c54a80d09bd062ddd61ae42138341e0f Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Thu, 28 Aug 2014 16:32:02 +0200 Subject: [PATCH] [cooja] plugins/VariableWatcher: Fixes for value layout - Fixed layout axis form x to page to show multi-line value fields. - More flexible width calculation for value fields --- .../java/org/contikios/cooja/plugins/VariableWatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/VariableWatcher.java b/tools/cooja/java/org/contikios/cooja/plugins/VariableWatcher.java index e76445ace..ea70baf2c 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/VariableWatcher.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/VariableWatcher.java @@ -417,7 +417,7 @@ public class VariableWatcher extends VisPlugin implements MotePlugin { // Variable value(s) valuePane = new JPanel(); - valuePane.setLayout(new BoxLayout(valuePane, BoxLayout.X_AXIS)); + valuePane.setLayout(new BoxLayout(valuePane, BoxLayout.PAGE_AXIS)); hf = new ValueFormatter( (VarTypes) varTypeCombo.getSelectedItem(), @@ -775,7 +775,7 @@ public class VariableWatcher extends VisPlugin implements MotePlugin { varValues = new JFormattedTextField[elements]; for (int i = 0; i < elements; i++) { varValues[i] = new JFormattedTextField(defac); - varValues[i].setColumns(6); + varValues[i].setColumns(((VarTypes) varTypeCombo.getSelectedItem()).getBytes() * 2 + 2); varValues[i].setToolTipText(String.format("0x%04x", address + i * typeSize)); linePane.add(varValues[i]); /* After 8 Elements, break line */