Пример #1
0
  public AppointmentWidget() {
    this.setStylePrimaryName("gwt-appointment");
    headerPanel.setStylePrimaryName("header");
    bodyPanel.setStylePrimaryName("body");
    footerPanel.setStylePrimaryName("footer");
    timelinePanel.setStylePrimaryName("timeline");
    timelineFillPanel.setStylePrimaryName("timeline-fill");

    this.add(headerPanel);
    this.add(bodyPanel);
    this.add(footerPanel);
    this.add(timelinePanel);
    timelinePanel.add(timelineFillPanel);
    DOM.setStyleAttribute(this.getElement(), "position", "absolute");
  }
Пример #2
0
  private Widget addPopupMenu(
      final MenuLabel menuLabel, final MenuSource menuSource, boolean left) {
    final Widget label = menuLabel.asWidget();
    label.setStylePrimaryName("rstudio-StrongLabel");
    label.getElement().getStyle().setCursor(Style.Cursor.DEFAULT);
    label.getElement().getStyle().setOverflow(Overflow.HIDDEN);
    if (left) addLeftWidget(label);
    else addRightWidget(label);
    Image image = new Image(ThemeResources.INSTANCE.menuDownArrow());
    image.getElement().getStyle().setMarginLeft(5, Unit.PX);
    image.getElement().getStyle().setMarginRight(8, Unit.PX);
    image.getElement().getStyle().setMarginBottom(2, Unit.PX);
    if (left) addLeftWidget(image);
    else addRightWidget(image);

    final ClickHandler clickHandler =
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            ToolbarPopupMenu menu = menuSource.getMenu();
            menu.showRelativeTo(label);
            menu.getElement().getStyle().setPaddingTop(3, Style.Unit.PX);
          }
        };
    menuLabel.addClickHandler(clickHandler);
    image.addClickHandler(clickHandler);

    return image;
  }
 public ProgressIndicatorWidget(Widget widget) {
   managedObject = widget;
   buttonPanel = new DeckPanel();
   buttonPanel.add(managedObject);
   buttonPanel.setWidth("100%");
   buttonPanel.setHeight("100%");
   managedObject.setWidth("auto");
   managedObject.setStylePrimaryName("pentaho-button");
   Image image = new Image(GWT.getModuleBaseURL() + "images/progress_spinner.gif"); // $NON-NLS-1$
   image.setStylePrimaryName("progress-image");
   image.setWidth("auto");
   image.setHeight("auto");
   buttonPanel.add(image);
   buttonPanel.setStylePrimaryName("progress-indicator-button");
   this.setWidget(buttonPanel);
   this.setHeight("100%");
   this.setWidth("auto");
   buttonPanel.showWidget(UNPRESSED_DECK);
 }