use of com.google.gwt.user.client.ui.LayoutPanel in project rstudio by rstudio.
the class PackagesPane method createMainWidget.
@Override
protected Widget createMainWidget() {
packagesDataProvider_ = new ListDataProvider<PackageInfo>();
packagesTableContainer_ = new LayoutPanel();
return packagesTableContainer_;
}
use of com.google.gwt.user.client.ui.LayoutPanel in project rstudio by rstudio.
the class FullscreenPopupPanel method addCloseButton.
private void addCloseButton(NineUpBorder border) {
Image closeIcon = new Image(new ImageResource2x(RES.close2x()));
closeIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
closeIcon.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
close();
}
});
LayoutPanel layoutPanel = border.getLayoutPanel();
layoutPanel.add(closeIcon);
layoutPanel.setWidgetTopHeight(closeIcon, 15, Unit.PX, closeIcon.getHeight(), Unit.PX);
layoutPanel.setWidgetRightWidth(closeIcon, 27, Unit.PX, closeIcon.getWidth(), Unit.PX);
}
use of com.google.gwt.user.client.ui.LayoutPanel in project rstudio by rstudio.
the class FullscreenPopupPanel method addTitleWidget.
private void addTitleWidget(NineUpBorder border, Widget titleWidget) {
LayoutPanel layoutPanel = border.getLayoutPanel();
layoutPanel.add(titleWidget);
layoutPanel.setWidgetTopHeight(titleWidget, 13, Unit.PX, 21, Unit.PX);
layoutPanel.setWidgetLeftRight(titleWidget, 27, Unit.PX, 27 + RES.close2x().getWidth() + 15, Unit.PX);
}
use of com.google.gwt.user.client.ui.LayoutPanel in project rstudio by rstudio.
the class Wizard method createMainWidget.
@Override
protected Widget createMainWidget() {
WizardResources res = WizardResources.INSTANCE;
WizardResources.Styles styles = res.styles();
VerticalPanel mainWidget = new VerticalPanel();
mainWidget.addStyleName(getMainWidgetStyle());
headerPanel_ = new LayoutPanel();
headerPanel_.addStyleName(styles.headerPanel());
// layout constants
final int kTopMargin = 5;
final int kLeftMargin = 8;
final int kCaptionWidth = 400;
final int kCaptionHeight = 30;
final int kPageUILeftMargin = 123;
// first page caption
subCaptionLabel_ = new Label(firstPage_.getPageCaption());
subCaptionLabel_.addStyleName(styles.headerLabel());
headerPanel_.add(subCaptionLabel_);
headerPanel_.setWidgetLeftWidth(subCaptionLabel_, kTopMargin, Unit.PX, kCaptionWidth, Unit.PX);
headerPanel_.setWidgetTopHeight(subCaptionLabel_, kLeftMargin, Unit.PX, kCaptionHeight, Unit.PX);
// second page back button
ImageResource bkImg = res.wizardBackButton();
backButton_ = new Label("Back");
backButton_.addStyleName(styles.wizardBackButton());
backButton_.addStyleName(ThemeResources.INSTANCE.themeStyles().handCursor());
headerPanel_.add(backButton_);
headerPanel_.setWidgetLeftWidth(backButton_, kTopMargin - 2, Unit.PX, bkImg.getWidth(), Unit.PX);
headerPanel_.setWidgetTopHeight(backButton_, kTopMargin - 2, Unit.PX, bkImg.getHeight(), Unit.PX);
backButton_.setVisible(false);
backButton_.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
goBack();
}
});
// second page caption label
pageCaptionLabel_ = new Label();
pageCaptionLabel_.addStyleName(styles.headerLabel());
headerPanel_.add(pageCaptionLabel_);
headerPanel_.setWidgetLeftWidth(pageCaptionLabel_, kPageUILeftMargin, Unit.PX, kCaptionWidth, Unit.PX);
headerPanel_.setWidgetTopHeight(pageCaptionLabel_, kLeftMargin, Unit.PX, kCaptionHeight, Unit.PX);
pageCaptionLabel_.setVisible(false);
mainWidget.add(headerPanel_);
// main body panel for transitions
bodyPanel_ = new LayoutPanel();
ArrayList<String> wizardBodyStyles = getWizardBodyStyles();
for (String styleName : wizardBodyStyles) bodyPanel_.addStyleName(styleName);
bodyPanel_.getElement().getStyle().setProperty("overflowX", "hidden");
mainWidget.add(bodyPanel_);
// add first page (and all sub-pages recursively)
addAndInitializePage(firstPage_, true);
setNextButtonState(firstPage_);
return mainWidget;
}
use of com.google.gwt.user.client.ui.LayoutPanel 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_;
}
Aggregations