if (isCollapsed()) {
restoredLeft = getAbsoluteLeft() - borders[3]
- boundaryPanel.getAbsoluteLeft();
restoredTop = getAbsoluteTop() - borders[0]
- boundaryPanel.getAbsoluteTop();
final Dimension size = DOM.getClientSize(boundaryPanel.getElement());
final Dimension size2 = WidgetHelper.getOffsetSize(WindowPanel.this);
final Dimension size3 = WidgetHelper.getOffsetSize(getLayoutPanel());
setPopupPosition(0, 0);
setContentSize(size.width - (size2.width - size3.width),
getLayoutPanel().getPreferredSize().height);
} else {
if (oldState != WindowState.MINIMIZED) {
restoredLeft = getAbsoluteLeft() - borders[3]
- boundaryPanel.getAbsoluteLeft();
restoredTop = getAbsoluteTop() - borders[0]
- boundaryPanel.getAbsoluteTop();
restoredWidth = contentWidth;
restoredHeight = contentHeight;
}
final Dimension size = DOM.getClientSize(boundaryPanel.getElement());
final Dimension size2 = WidgetHelper.getOffsetSize(WindowPanel.this);
final Dimension size3 = WidgetHelper.getOffsetSize(getLayoutPanel());
setPopupPosition(0, 0);
setContentSize(size.width - (size2.width - size3.width), size.height
- (size2.height - size3.height));
makeNotResizable();
}