]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/TreeNode.java
Fix column width issues on HiDPI displays. KeyTiSelection fixes.
[simantics/platform.git] / bundles / org.simantics.browsing.ui.nattable / src / org / simantics / browsing / ui / nattable / TreeNode.java
index 269966c30722b0834b965362a17536c1bda1100e..4f9273d9120cfd48547986b1fcb630120fe98582 100644 (file)
@@ -118,20 +118,33 @@ public class TreeNode implements IAdaptable {
                        initData();
                if (labeler != null) {
                        String key = explorerContext.getGe().getColumns()[column].getKey();
-                       String s = null;
-                       if (runtimeLabels != null)
-                               s = runtimeLabels.get(key);
-                       if (s == null)
-                               s = labels.get(key);
-                       if (labelDecorators != null && !labelDecorators.isEmpty()) {
-                               int index = 0;
-                               for (LabelDecorator ld : labelDecorators) {
-                                       String ds = ld.decorateLabel(s, key, index);
-                                       if (ds != null)
-                                               s = ds;
-                               }
+                       return getValue(key);
+               }
+               return null;
+       }
+       
+       private String getValue(String key) {
+               String s = null;
+               if (runtimeLabels != null)
+                       s = runtimeLabels.get(key);
+               if (s == null)
+                       s = labels.get(key);
+               if (labelDecorators != null && !labelDecorators.isEmpty()) {
+                       int index = 0;
+                       for (LabelDecorator ld : labelDecorators) {
+                               String ds = ld.decorateLabel(s, key, index);
+                               if (ds != null)
+                                       s = ds;
                        }
-                       return s;
+               }
+               return s;
+       }
+       
+       public String getValueString(String key) {
+               if (labels == null)
+                       initData();
+               if (labeler != null) {
+                       return getValue(key);
                }
                return null;
        }