Search in sources :

Example 6 with NewWindowOptions

use of org.rstudio.studio.client.common.GlobalDisplay.NewWindowOptions in project rstudio by rstudio.

the class ViewerPresenter method onViewerZoom.

@Handler
public void onViewerZoom() {
    Size windowSize = ZoomUtils.getZoomWindowSize(display_.getViewerFrameSize(), zoomWindowDefaultSize_);
    // open and activate window
    NewWindowOptions options = new NewWindowOptions();
    options.setName("_rstudio_viewer_zoom");
    options.setFocus(true);
    options.setCallback(new OperationWithInput<WindowEx>() {

        @Override
        public void execute(WindowEx input) {
            zoomWindow_ = input;
        }
    });
    globalDisplay_.openMinimalWindow(display_.getUrl(), false, windowSize.width, windowSize.height, options);
}
Also used : NewWindowOptions(org.rstudio.studio.client.common.GlobalDisplay.NewWindowOptions) Size(org.rstudio.core.client.Size) WindowEx(org.rstudio.core.client.dom.WindowEx) EnabledChangedHandler(org.rstudio.core.client.command.EnabledChangedHandler) Handler(org.rstudio.core.client.command.Handler)

Aggregations

NewWindowOptions (org.rstudio.studio.client.common.GlobalDisplay.NewWindowOptions)6 WindowEx (org.rstudio.core.client.dom.WindowEx)3 Size (org.rstudio.core.client.Size)2 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)1 UrlBuilder (com.google.gwt.http.client.UrlBuilder)1 Point (org.rstudio.core.client.Point)1 EnabledChangedHandler (org.rstudio.core.client.command.EnabledChangedHandler)1 Handler (org.rstudio.core.client.command.Handler)1 Operation (org.rstudio.core.client.widget.Operation)1