use of org.rstudio.core.client.layout.LogicalWindow in project rstudio by rstudio.
the class PaneManager method zoomTab.
public void zoomTab(Tab tab) {
activateTab(tab);
WorkbenchTabPanel tabPanel = getOwnerTabPanel(tab);
LogicalWindow parentWindow = tabPanel.getParentWindow();
if (parentWindow == null)
return;
toggleWindowZoom(parentWindow, tab);
}
use of org.rstudio.core.client.layout.LogicalWindow in project rstudio by rstudio.
the class PaneManager method getParentLogicalWindow.
LogicalWindow getParentLogicalWindow(Element el) {
LogicalWindow targetWindow = null;
while (el != null && targetWindow == null) {
el = el.getParentElement();
for (LogicalWindow window : panes_) {
Widget activeWidget = window.getActiveWidget();
if (activeWidget == null)
continue;
Element activeEl = activeWidget.getElement();
if (el.equals(activeEl)) {
targetWindow = window;
break;
}
}
}
return targetWindow;
}
use of org.rstudio.core.client.layout.LogicalWindow in project rstudio by rstudio.
the class PaneManager method restoreSavedLayout.
private void restoreSavedLayout() {
// hidden windows to display themselves, and so on.
for (LogicalWindow window : panes_) window.onWindowStateChange(new WindowStateChangeEvent(WindowState.NORMAL, true));
maximizedWindow_.onWindowStateChange(new WindowStateChangeEvent(WindowState.NORMAL, true));
resizeHorizontally(panel_.getWidgetSize(right_), widgetSizePriorToZoom_);
invalidateSavedLayoutState(true);
}
use of org.rstudio.core.client.layout.LogicalWindow in project rstudio by rstudio.
the class PaneManager method fullyMaximizeWindow.
private void fullyMaximizeWindow(final LogicalWindow window, final Tab tab) {
if (window.equals(getSourceLogicalWindow()))
maximizedTab_ = Tab.Source;
else if (window.equals(getConsoleLogicalWindow()))
maximizedTab_ = Tab.Console;
else
maximizedTab_ = tab;
maximizedWindow_ = window;
manageLayoutCommands();
panel_.setSplitterEnabled(false);
if (widgetSizePriorToZoom_ < 0)
widgetSizePriorToZoom_ = panel_.getWidgetSize(right_);
// transfers don't always propagate as expected)
for (LogicalWindow pane : panes_) pane.onWindowStateChange(new WindowStateChangeEvent(WindowState.NORMAL));
boolean isLeftWidget = DomUtils.contains(left_.getElement(), window.getActiveWidget().getElement());
window.onWindowStateChange(new WindowStateChangeEvent(WindowState.EXCLUSIVE));
final double initialSize = panel_.getWidgetSize(right_);
double targetSize = isLeftWidget ? 0 : panel_.getOffsetWidth();
if (targetSize < 0)
targetSize = 0;
// Ensure focus is sent to Help iframe on activation.
Command onActivation = null;
if (maximizedTab_.equals(Tab.Help)) {
onActivation = new Command() {
@Override
public void execute() {
commands_.activateHelp().execute();
}
};
}
resizeHorizontally(initialSize, targetSize, onActivation);
}
use of org.rstudio.core.client.layout.LogicalWindow in project rstudio by rstudio.
the class PaneManager method onLayoutZoomCurrentPane.
@Handler
public void onLayoutZoomCurrentPane() {
LogicalWindow activeWindow = getActiveLogicalWindow();
if (activeWindow == null)
return;
toggleWindowZoom(activeWindow, null);
}
Aggregations