diff options
-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 |