Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-07-07 12:23:04 +0000
committerTom Schindl2014-07-07 12:23:04 +0000
commit7b9a967797e83dc3ea24a59919797bed258fe14c (patch)
treef4f946e0c8ab1682e67d7bad0c95e989d5884a5e /bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java
parent3067944469ae2bfbbbb3217ab7b1f4cf7c8242a4 (diff)
downloadorg.eclipse.efxclipse-7b9a967797e83dc3ea24a59919797bed258fe14c.tar.gz
org.eclipse.efxclipse-7b9a967797e83dc3ea24a59919797bed258fe14c.tar.xz
org.eclipse.efxclipse-7b9a967797e83dc3ea24a59919797bed258fe14c.zip
fixed constraint handling
Diffstat (limited to 'bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java')
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java b/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java
index d5afd1508..354070d53 100755
--- a/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java
+++ b/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/FillLayoutPane.java
@@ -14,7 +14,6 @@ package org.eclipse.fx.ui.panes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.WeakHashMap;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
@@ -160,8 +159,8 @@ public class FillLayoutPane extends AbstractLayoutPane<FillLayoutPane.FillData>
}
}
- private final static WeakHashMap<Node, FillData> CONSTRAINTS = new WeakHashMap<Node, FillData>();
-
+ private static final String LAYOUT_KEY = "fillData"; //$NON-NLS-1$
+
/**
* Set a constraint object for the node
*
@@ -171,7 +170,7 @@ public class FillLayoutPane extends AbstractLayoutPane<FillLayoutPane.FillData>
* the fill data
*/
public final static void setConstraint(@NonNull Node n, @NonNull FillData data) {
- CONSTRAINTS.put(n, data);
+ setConstraint(n, LAYOUT_KEY, data);
}
/**
@@ -182,7 +181,7 @@ public class FillLayoutPane extends AbstractLayoutPane<FillLayoutPane.FillData>
* @return the constraint or <code>null</code>
*/
public final static @Nullable FillData getConstraint(@NonNull Node n) {
- return CONSTRAINTS.get(n);
+ return (FillData) getConstraint(n, LAYOUT_KEY);
}
/**

Back to the top