default:
throw new IllegalArgumentException(
"Unknown WindowState " + event.getNewState());
}
windowA_.onWindowStateChange(
new WindowStateChangeEvent(topState));
}
};
hookEvents();
new WindowLayoutStateValue(session.getSessionInfo().getClientState(),
clientStateKeyName,
topWindowDefaultState,
defaultSplitterPos);
setWidget(layout_);
if (eventBus != null)
{
layout_.addSplitterBeforeResizeHandler(new SplitterBeforeResizeHandler()
{
public void onSplitterBeforeResize(SplitterBeforeResizeEvent event)
{
// If the splitter ends up causing a minimize operation, then
// we'll need to have saved the normal height for when the
// user decides to restore the panel.
snapMinimizeNormalHeight_ = new NormalHeight(
layout_.getSplitterBottom(),
layout_.getOffsetHeight(),
Window.getClientHeight());
eventBus.fireEvent(new GlassVisibilityEvent(true));
}
});
layout_.addSplitterResizedHandler(new SplitterResizedHandler()
{
public void onSplitterResized(SplitterResizedEvent event)
{
WindowState topState = resizePanes(layout_.getSplitterBottom());
// we're already in normal if the splitter is being invoked
if (topState != WindowState.NORMAL)
{
topWindowStateChangeManager_.onWindowStateChange(
new WindowStateChangeEvent(topState));
}
eventBus.fireEvent(new GlassVisibilityEvent(false));
}
});