use of org.rstudio.core.client.widget.ImageFrame in project rstudio by rstudio.
the class PlotsPane method createMainWidget.
@Override
protected Widget createMainWidget() {
panel_ = new LayoutPanel();
panel_.setSize("100%", "100%");
frame_ = new ImageFrame();
frame_.setStyleName("rstudio-HelpFrame");
frame_.setMarginWidth(0);
frame_.setMarginHeight(0);
frame_.setUrl("about:blank");
frame_.setSize("100%", "100%");
ElementIds.assignElementId(frame_.getElement(), ElementIds.PLOT_IMAGE_FRAME);
panel_.add(frame_);
panel_.setWidgetTopBottom(frame_, 0, Unit.PX, 0, Unit.PX);
panel_.setWidgetLeftRight(frame_, 0, Unit.PX, 0, Unit.PX);
// Stops mouse events from being routed to the iframe, which would
// interfere with dragging the workbench pane sizer. also provide
// a widget container where adornments can be added on top fo the
// plots panel (e.g. manipulator button)
plotsSurface_ = new FlowPanel();
plotsSurface_.setSize("100%", "100%");
panel_.add(plotsSurface_);
panel_.setWidgetTopBottom(plotsSurface_, 0, Unit.PX, 0, Unit.PX);
panel_.setWidgetLeftRight(plotsSurface_, 0, Unit.PX, 0, Unit.PX);
// return the panel
return panel_;
}
use of org.rstudio.core.client.widget.ImageFrame in project rstudio by rstudio.
the class PlotsPanePreviewer method getWidget.
@Override
public Widget getWidget() {
if (imageFrame_ == null) {
imageFrame_ = new ImageFrame();
imageFrame_.setUrl("about:blank");
imageFrame_.setSize("100%", "100%");
imageFrame_.setMarginHeight(0);
imageFrame_.setMarginWidth(0);
imageFrame_.setStylePrimaryName(ExportPlotResources.INSTANCE.styles().imagePreview());
}
return imageFrame_;
}
Aggregations