summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractOrderedLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractOrderedLayout.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index a7cc780414..3ac4e76bdb 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -25,6 +25,7 @@ import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
import com.vaadin.shared.Connector;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData;
@@ -32,7 +33,8 @@ import com.vaadin.terminal.Sizeable;
@SuppressWarnings("serial")
public abstract class AbstractOrderedLayout extends AbstractLayout implements
- Layout.AlignmentHandler, Layout.SpacingHandler, LayoutClickNotifier {
+ Layout.AlignmentHandler, Layout.SpacingHandler, LayoutClickNotifier,
+ Layout.MarginHandler {
private AbstractOrderedLayoutServerRpc rpc = new AbstractOrderedLayoutServerRpc() {
@@ -392,4 +394,26 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
return components.get(index);
}
+ public void setMargin(boolean enabled) {
+ setMargin(new MarginInfo(enabled));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Layout.MarginHandler#getMargin()
+ */
+ public MarginInfo getMargin() {
+ return new MarginInfo(getState().getMarginsBitmask());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Layout.MarginHandler#setMargin(MarginInfo)
+ */
+ public void setMargin(MarginInfo marginInfo) {
+ getState().setMarginsBitmask(marginInfo.getBitMask());
+ requestRepaint();
+ }
}