summaryrefslogtreecommitdiffstats
path: root/documentation/components/components-features.asciidoc
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2016-07-13 14:37:31 +0300
committerArtur Signell <artur@vaadin.com>2016-08-05 10:19:44 +0300
commitc278ce69f984bcc7e087b6296bddd2f9f41e6594 (patch)
tree605eae4bee7c9413e412c06c54a897dc219c8339 /documentation/components/components-features.asciidoc
parent5b7d159969b9f5e4cea45a17f4ed371afa241bb8 (diff)
downloadvaadin-framework-c278ce69f984bcc7e087b6296bddd2f9f41e6594.tar.gz
vaadin-framework-c278ce69f984bcc7e087b6296bddd2f9f41e6594.zip
Update old Vaadin 6 code: Common Component Features - Sizing Components
Change-Id: I97136b61d3c7ee2b229119d6d99435c73937a761
Diffstat (limited to 'documentation/components/components-features.asciidoc')
-rw-r--r--documentation/components/components-features.asciidoc11
1 files changed, 5 insertions, 6 deletions
diff --git a/documentation/components/components-features.asciidoc b/documentation/components/components-features.asciidoc
index af15d8e250..5bcbd17902 100644
--- a/documentation/components/components-features.asciidoc
+++ b/documentation/components/components-features.asciidoc
@@ -620,8 +620,8 @@ above methods. The available units are listed in
[source, java]
----
-mycomponent.setWidth(100, Sizeable.UNITS_PERCENTAGE);
-mycomponent.setWidth(400, Sizeable.UNITS_PIXELS);
+mycomponent.setWidth(100, Unit.PERCENTAGE);
+mycomponent.setWidth(400, Unit.PIXELS);
----
Alternatively, you can speficy the size as a string. The format of such a string
@@ -636,16 +636,15 @@ mycomponent.setHeight("400px");
The "[literal]#++100%++#" percentage value makes the component take all
available size in the particular direction (see the description of
-[parameter]#Sizeable.UNITS_PERCENTAGE# in the table below). You can also use the
+[parameter]#Unit.PERCENTAGE# in the table below). You can also use the
shorthand method [methodname]#setSizeFull()# to set the size to 100% in both
directions.
The size can be __undefined__ in either or both dimensions, which means that the
component will take the minimum necessary space. Most components have undefined
size by default, but some layouts have full size in horizontal direction. You
-can set the height or width as undefined with
-[parameter]#Sizeable.SIZE_UNDEFINED# parameter for [methodname]#setWidth()# and
-[methodname]#setHeight()#.
+can set the height, width, or both as undefined with the methods [methodname]#setWidthUndefined()#,
+[methodname]#setHeightUndefined()#, and [methodname]#setHeightUndefined()#, respectively.
Always keep in mind that _a layout with undefined size may not contain components with defined relative size_, such as "full size", except in some special cases.
See <<dummy/../../../framework/layout/layout-settings#layout.settings.size,"Layout Size">> for details.