diff options
author | patrik <patrik@vaadin.com> | 2016-05-17 09:17:54 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2016-05-17 09:20:24 +0300 |
commit | 107c1b84d493af79c3735745143fd9dd7740fc6f (patch) | |
tree | 21452fc9ac8cd49befe5baf9e835288d8cae5821 /shared | |
parent | 809440a8a2247d7f82945da572ab494d02639d72 (diff) | |
download | vaadin-framework-107c1b84d493af79c3735745143fd9dd7740fc6f.tar.gz vaadin-framework-107c1b84d493af79c3735745143fd9dd7740fc6f.zip |
Deprecate public bitmask methods in MarginInfo (#17565)
These methods are superceded by a copy constructor. getBitMask() and the
bitmask constructor are used in a few places around the framework, and
need to be refactored out - the MarginInfo class is already serializable
and can be used in lieu of the raw bitmask in the states of these
objects.
Change-Id: I39a6c25f03f3a2666c057ede99e8df54f5c57958
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java index c66d1f0a11..0af3b7351f 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java +++ b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java @@ -49,7 +49,9 @@ public class MarginInfo implements Serializable { * * @param bitMask * bits to set + * @deprecated use other constructors instead of this one */ + @Deprecated public MarginInfo(int bitMask) { this.bitMask = bitMask; } @@ -86,6 +88,16 @@ public class MarginInfo implements Serializable { } /** + * Creates a MarginInfo with the same values as another MarginInfo object. + * + * @param other + * another MarginInfo object + */ + public MarginInfo(MarginInfo other) { + setMargins(other); + } + + /** * Enables or disables margins on all edges simultaneously. * * @param enabled @@ -172,9 +184,12 @@ public class MarginInfo implements Serializable { /** * Returns the current bit mask that make up the margin settings. + * <p> + * This method is for internal use by the framework. * * @return an integer bit mask */ + @Deprecated public int getBitMask() { return bitMask; } |