pixelPosition + getSplitterSize(), Unit.PX);
LayoutManager layoutManager = LayoutManager.get(client);
ConnectorMap connectorMap = ConnectorMap.get(client);
if (firstChild != null) {
ComponentConnector connector = connectorMap
.getConnector(firstChild);
if (connector.isRelativeWidth()) {
layoutManager.reportWidthAssignedToRelative(connector,
pixelPosition);
} else {
layoutManager.setNeedsMeasure(connector);
}
}
if (secondChild != null) {
ComponentConnector connector = connectorMap
.getConnector(secondChild);
if (connector.isRelativeWidth()) {
layoutManager.reportWidthAssignedToRelative(connector,
secondContainerWidth);
} else {
layoutManager.setNeedsMeasure(connector);
}
}
break;
case VERTICAL:
wholeSize = DOM.getElementPropertyInt(wrapper, "clientHeight");
pixelPosition = DOM.getElementPropertyInt(splitter, "offsetTop");
// reposition splitter in case it is out of box
if ((pixelPosition > 0 && pixelPosition + getSplitterSize() > wholeSize)
|| (positionReversed && pixelPosition < 0)) {
pixelPosition = wholeSize - getSplitterSize();
if (pixelPosition < 0) {
pixelPosition = 0;
}
// Move splitter within bounds, but don't remember the new value
setSplitPosition(pixelPosition + "px", false);
return;
}
firstContainer.getStyle().setHeight(pixelPosition, Unit.PX);
int secondContainerHeight = (wholeSize - pixelPosition - getSplitterSize());
if (secondContainerHeight < 0) {
secondContainerHeight = 0;
}
secondContainer.getStyle()
.setHeight(secondContainerHeight, Unit.PX);
secondContainer.getStyle().setTop(
pixelPosition + getSplitterSize(), Unit.PX);
layoutManager = LayoutManager.get(client);
connectorMap = ConnectorMap.get(client);
if (firstChild != null) {
ComponentConnector connector = connectorMap
.getConnector(firstChild);
if (connector.isRelativeHeight()) {
layoutManager.reportHeightAssignedToRelative(connector,
pixelPosition);
} else {
layoutManager.setNeedsMeasure(connector);
}
}
if (secondChild != null) {
ComponentConnector connector = connectorMap
.getConnector(secondChild);
if (connector.isRelativeHeight()) {
layoutManager.reportHeightAssignedToRelative(connector,
secondContainerHeight);
} else {
layoutManager.setNeedsMeasure(connector);
}