diff options
author | Artur Signell <artur@vaadin.com> | 2012-04-05 09:08:17 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-04-05 09:08:17 +0300 |
commit | 7cc29fd08fe1da7c6c924f4211ba80b48b960d69 (patch) | |
tree | f8c7f7bb4b1e45e0a6292bed14e64bd55402a1e4 /src/com/vaadin/ui/AbstractOrderedLayout.java | |
parent | 9b5453c7f909eb162aa458de4ccd998dbe4b4477 (diff) | |
download | vaadin-framework-7cc29fd08fe1da7c6c924f4211ba80b48b960d69.tar.gz vaadin-framework-7cc29fd08fe1da7c6c924f4211ba80b48b960d69.zip |
Fixed spacing that was only partly moved to shared state
Diffstat (limited to 'src/com/vaadin/ui/AbstractOrderedLayout.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractOrderedLayout.java | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/com/vaadin/ui/AbstractOrderedLayout.java b/src/com/vaadin/ui/AbstractOrderedLayout.java index d911579216..97929dcf25 100644 --- a/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -50,11 +50,6 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements private final Map<Component, Float> componentToExpandRatio = new HashMap<Component, Float>(); - /** - * Is spacing between contained components enabled. Defaults to false. - */ - private boolean spacing = false; - public AbstractOrderedLayout() { registerRpc(rpc); } @@ -184,17 +179,6 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements public void paintContent(PaintTarget target) throws PaintException { super.paintContent(target); - // Add spacing attribute (omitted if false) - if (spacing) { - target.addAttribute("spacing", spacing); - } - - // Adds all items in all the locations - for (Component c : components) { - // Paint child component UIDL - c.paint(target); - } - // Add child component alignment info to layout tag target.addAttribute("alignments", componentToAlignment); target.addAttribute("expandRatios", componentToExpandRatio); @@ -295,8 +279,8 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * * @see com.vaadin.ui.Layout.SpacingHandler#setSpacing(boolean) */ - public void setSpacing(boolean enabled) { - spacing = enabled; + public void setSpacing(boolean spacing) { + getState().setSpacing(spacing); requestRepaint(); } @@ -305,18 +289,8 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * * @see com.vaadin.ui.Layout.SpacingHandler#isSpacing() */ - @Deprecated - public boolean isSpacingEnabled() { - return spacing; - } - - /* - * (non-Javadoc) - * - * @see com.vaadin.ui.Layout.SpacingHandler#isSpacing() - */ public boolean isSpacing() { - return spacing; + return getState().isSpacing(); } /** |