boolean hidePossible = !hidden;
super.hide();
if (hidePossible && hidden) {
// hideButton is null when invoked under program control or via Close ToolButton
PredefinedButton predefinedButton = hideButton == null ? null : getPredefinedButton(hideButton);
fireEvent(new DialogHideEvent(predefinedButton));
}
}