diff options
author | John Ahlroos <john@vaadin.com> | 2012-08-28 09:30:46 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-08-28 09:30:46 +0300 |
commit | 7b9e1566d6e36c10aef3566b20267449586a81cb (patch) | |
tree | 4c577240fd35d863b88b91b24c7d2a07c67adf1b /shared | |
parent | bd5876005947b830a151889a86203fd77a6d6022 (diff) | |
parent | 52986fdf881260994e5465012af2afd80447b8b6 (diff) | |
download | vaadin-framework-7b9e1566d6e36c10aef3566b20267449586a81cb.tar.gz vaadin-framework-7b9e1566d6e36c10aef3566b20267449586a81cb.zip |
Merge branch 'master' into layoutgraph
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/Connector.java | 11 | ||||
-rwxr-xr-x | shared/src/com/vaadin/shared/Position.java | 20 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/AbstractLayoutState.java | 9 | ||||
-rwxr-xr-x | shared/src/com/vaadin/shared/ui/BorderStyle.java | 20 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/MarginInfo.java (renamed from shared/src/com/vaadin/shared/ui/VMarginInfo.java) | 17 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java | 9 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/label/LabelState.java | 21 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java | 12 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/root/RootState.java | 8 |
9 files changed, 72 insertions, 55 deletions
diff --git a/shared/src/com/vaadin/shared/Connector.java b/shared/src/com/vaadin/shared/Connector.java index 5a00f6cca2..5927d08d79 100644 --- a/shared/src/com/vaadin/shared/Connector.java +++ b/shared/src/com/vaadin/shared/Connector.java @@ -17,8 +17,6 @@ package com.vaadin.shared; import java.io.Serializable; -import com.vaadin.shared.communication.SharedState; - /** * Interface implemented by all classes that are capable of communicating with * the server or the client side. @@ -41,15 +39,6 @@ import com.vaadin.shared.communication.SharedState; */ public interface Connector extends Serializable { /** - * Gets the current shared state of the connector. - * - * @since 7.0. - * @return state The shared state object. Can be any sub type of - * {@link SharedState}. Never null. - */ - public SharedState getState(); - - /** * Returns the id for this connector. This is set by the framework and does * not change during the lifetime of a connector. * diff --git a/shared/src/com/vaadin/shared/Position.java b/shared/src/com/vaadin/shared/Position.java new file mode 100755 index 0000000000..89d6a4261c --- /dev/null +++ b/shared/src/com/vaadin/shared/Position.java @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.shared; + +public enum Position { + TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT; +} diff --git a/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java b/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java index 675d11d0b7..4fc865626c 100644 --- a/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java @@ -18,14 +18,5 @@ package com.vaadin.shared.ui; import com.vaadin.shared.ComponentState; public class AbstractLayoutState extends ComponentState { - private int marginsBitmask; - - public int getMarginsBitmask() { - return marginsBitmask; - } - - public void setMarginsBitmask(int marginsBitmask) { - this.marginsBitmask = marginsBitmask; - } }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/BorderStyle.java b/shared/src/com/vaadin/shared/ui/BorderStyle.java new file mode 100755 index 0000000000..786d340f1c --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/BorderStyle.java @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.shared.ui; + +public enum BorderStyle { + NONE, MINIMAL, DEFAULT; +} diff --git a/shared/src/com/vaadin/shared/ui/VMarginInfo.java b/shared/src/com/vaadin/shared/ui/MarginInfo.java index 9e9e0a4bb4..21e52f258a 100644 --- a/shared/src/com/vaadin/shared/ui/VMarginInfo.java +++ b/shared/src/com/vaadin/shared/ui/MarginInfo.java @@ -18,8 +18,7 @@ package com.vaadin.shared.ui; import java.io.Serializable; -@SuppressWarnings("serial") -public class VMarginInfo implements Serializable { +public class MarginInfo implements Serializable { private static final int TOP = 1; private static final int RIGHT = 2; @@ -28,11 +27,15 @@ public class VMarginInfo implements Serializable { private int bitMask; - public VMarginInfo(int bitMask) { + public MarginInfo(boolean enabled) { + this(enabled, enabled, enabled, enabled); + } + + public MarginInfo(int bitMask) { this.bitMask = bitMask; } - public VMarginInfo(boolean top, boolean right, boolean bottom, boolean left) { + public MarginInfo(boolean top, boolean right, boolean bottom, boolean left) { setMargins(top, right, bottom, left); } @@ -44,7 +47,7 @@ public class VMarginInfo implements Serializable { bitMask += left ? LEFT : 0; } - public void setMargins(VMarginInfo marginInfo) { + public void setMargins(MarginInfo marginInfo) { bitMask = marginInfo.bitMask; } @@ -78,11 +81,11 @@ public class VMarginInfo implements Serializable { @Override public boolean equals(Object obj) { - if (!(obj instanceof VMarginInfo)) { + if (!(obj instanceof MarginInfo)) { return false; } - return ((VMarginInfo) obj).bitMask == bitMask; + return ((MarginInfo) obj).bitMask == bitMask; } @Override diff --git a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java index d2e685d8cb..381a6a7f85 100644 --- a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java @@ -21,6 +21,7 @@ public class GridLayoutState extends AbstractLayoutState { private boolean spacing = false; private int rows = 0; private int columns = 0; + private int marginsBitmask = 0; public boolean isSpacing() { return spacing; @@ -30,6 +31,14 @@ public class GridLayoutState extends AbstractLayoutState { this.spacing = spacing; } + public int getMarginsBitmask() { + return marginsBitmask; + } + + public void setMarginsBitmask(int marginsBitmask) { + this.marginsBitmask = marginsBitmask; + } + public int getRows() { return rows; } diff --git a/shared/src/com/vaadin/shared/ui/label/LabelState.java b/shared/src/com/vaadin/shared/ui/label/LabelState.java index 35e27bc63d..a91aeb0aa1 100644 --- a/shared/src/com/vaadin/shared/ui/label/LabelState.java +++ b/shared/src/com/vaadin/shared/ui/label/LabelState.java @@ -18,23 +18,6 @@ package com.vaadin.shared.ui.label; import com.vaadin.shared.ComponentState; public class LabelState extends ComponentState { - private ContentMode contentMode = ContentMode.TEXT; - private String text = ""; - - public ContentMode getContentMode() { - return contentMode; - } - - public void setContentMode(ContentMode contentMode) { - this.contentMode = contentMode; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - + public ContentMode contentMode = ContentMode.TEXT; + public String text = ""; } diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java index 235c9eab13..35456ab9ac 100644 --- a/shared/src/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java @@ -25,7 +25,9 @@ import com.vaadin.shared.ui.AlignmentInfo; public class AbstractOrderedLayoutState extends AbstractLayoutState { private boolean spacing = false; - public HashMap<Connector, ChildComponentData> childData = new HashMap<Connector, ChildComponentData>(); + private HashMap<Connector, ChildComponentData> childData = new HashMap<Connector, ChildComponentData>(); + + private int marginsBitmask = 0; public static class ChildComponentData implements Serializable { private int alignmentBitmask = AlignmentInfo.TOP_LEFT.getBitMask(); @@ -65,4 +67,12 @@ public class AbstractOrderedLayoutState extends AbstractLayoutState { this.spacing = spacing; } + public int getMarginsBitmask() { + return marginsBitmask; + } + + public void setMarginsBitmask(int marginsBitmask) { + this.marginsBitmask = marginsBitmask; + } + }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/root/RootState.java b/shared/src/com/vaadin/shared/ui/root/RootState.java index 07c71c8167..b7c2c88ce5 100644 --- a/shared/src/com/vaadin/shared/ui/root/RootState.java +++ b/shared/src/com/vaadin/shared/ui/root/RootState.java @@ -20,7 +20,6 @@ import com.vaadin.shared.Connector; public class RootState extends ComponentState { private Connector content; - private int heartbeatInterval; public Connector getContent() { return content; @@ -30,11 +29,4 @@ public class RootState extends ComponentState { this.content = content; } - public int getHeartbeatInterval() { - return heartbeatInterval; - } - - public void setHeartbeatInterval(int heartbeatInterval) { - this.heartbeatInterval = heartbeatInterval; - } }
\ No newline at end of file |