diff options
author | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2010-03-31 08:22:25 +0000 |
---|---|---|
committer | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2010-03-31 08:22:25 +0000 |
commit | 61f6bcac6d5bdcf3ff7c3c774a2ad37d7798c207 (patch) | |
tree | 192f676696a5db6e03b6b1e94b52fdac3fec7429 /src | |
parent | b0821b2546f85f29bad1eb1e263a5a292fb923df (diff) | |
download | vaadin-framework-61f6bcac6d5bdcf3ff7c3c774a2ad37d7798c207.tar.gz vaadin-framework-61f6bcac6d5bdcf3ff7c3c774a2ad37d7798c207.zip |
Fixes #4460: SplitPanel: add getters for the position (and unit) of the splitter on the server side component
svn changeset:12248/svn branch:6.3
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/ui/SplitPanel.java | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java index 101c1e9848..6dc8c65509 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java @@ -476,6 +476,8 @@ public class VSplitPanel extends ComplexPanel implements Container, pos = getOffsetWidth(); } position = pos / getOffsetWidth() * 100 + "%"; + } else { + position = newX + "px"; } setSplitPosition(newX + "px"); @@ -502,6 +504,8 @@ public class VSplitPanel extends ComplexPanel implements Container, pos = getOffsetHeight(); } position = pos / getOffsetHeight() * 100 + "%"; + } else { + position = newY + "px"; } setSplitPosition(newY + "px"); diff --git a/src/com/vaadin/ui/SplitPanel.java b/src/com/vaadin/ui/SplitPanel.java index 4319bf7d9c..fe2da5d370 100644 --- a/src/com/vaadin/ui/SplitPanel.java +++ b/src/com/vaadin/ui/SplitPanel.java @@ -311,6 +311,25 @@ public class SplitPanel extends AbstractLayout { } /** + * Returns the current position of the splitter, in + * {@link #getSplitPositionUnit()} units. + * + * @return position of the splitter + */ + public int getSplitPosition() { + return pos; + } + + /** + * Returns the unit of position of the splitter + * + * @return unit of position of the splitter + */ + public int getSplitPositionUnit() { + return posUnit; + } + + /** * Moves the position of the splitter. * * @param pos |