use of org.rstudio.core.client.events.WindowStateChangeEvent in project rstudio by rstudio.
the class PaneManager method restoreFourPaneLayout.
private void restoreFourPaneLayout() {
// widgets to size themselves vertically.
for (LogicalWindow window : panes_) window.onWindowStateChange(new WindowStateChangeEvent(WindowState.NORMAL, true));
double rightWidth = panel_.getWidgetSize(right_);
double panelWidth = panel_.getOffsetWidth();
double minThreshold = (2.0 / 5.0) * panelWidth;
double maxThreshold = (3.0 / 5.0) * panelWidth;
if (rightWidth <= minThreshold)
resizeHorizontally(rightWidth, minThreshold);
else if (rightWidth >= maxThreshold)
resizeHorizontally(rightWidth, maxThreshold);
invalidateSavedLayoutState(true);
}
use of org.rstudio.core.client.events.WindowStateChangeEvent in project rstudio by rstudio.
the class PaneManager method onActivateConsolePane.
@Handler
public void onActivateConsolePane() {
// Ensure that the console window is activated
LogicalWindow consoleWindow = getConsoleLogicalWindow();
if (consoleWindow.getState().equals(WindowState.MINIMIZE)) {
WindowStateChangeEvent event = new WindowStateChangeEvent(WindowState.NORMAL);
consoleWindow.onWindowStateChange(event);
}
// created.
if (consoleTabPanel_.isEmpty()) {
consolePane_.focus();
} else {
LogicalWindow activeWindow = getActiveLogicalWindow();
if (consoleWindow.equals(activeWindow)) {
consoleTabPanel_.selectNextTab();
} else {
consoleTabPanel_.selectTab(consoleTabPanel_.getSelectedIndex());
}
}
}
Aggregations