diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-11-21 13:47:43 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-11-21 13:47:43 +0000 |
commit | 9fb2ae95a80d0f7fd9a9b827b07d1df30e72a69f (patch) | |
tree | 14b12b653aa1d680cdb39086e83137272aea56c9 /src/com/itmill/toolkit/ui/GridLayout.java | |
parent | a3b93caf29f9a657f2e3c682b6ed5e2d71f172e9 (diff) | |
download | vaadin-framework-9fb2ae95a80d0f7fd9a9b827b07d1df30e72a69f.tar.gz vaadin-framework-9fb2ae95a80d0f7fd9a9b827b07d1df30e72a69f.zip |
Added API to gridlayout to fetch component layout information (column + row + spans)
svn changeset:5950/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/GridLayout.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/GridLayout.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/ui/GridLayout.java b/src/com/itmill/toolkit/ui/GridLayout.java index fce2e7f872..66dac51b0a 100644 --- a/src/com/itmill/toolkit/ui/GridLayout.java +++ b/src/com/itmill/toolkit/ui/GridLayout.java @@ -1248,4 +1248,23 @@ public class GridLayout extends AbstractLayout implements return null; } + /** + * Returns information about the area where given component is layed in the + * GridLayout. + * + * @param component + * the component whose area information is requested. + * @return an Area object that contains information how component is layed + * in the grid + */ + public Area getComponentArea(Component component) { + for (final Iterator iterator = areas.iterator(); iterator.hasNext();) { + final Area area = (Area) iterator.next(); + if (area.getComponent() == component) { + return area; + } + } + return null; + } + } |