Пример #1
0
  @Override
  protected void onDelayLoadSuccess(T obj) {
    super.onDelayLoadSuccess(obj);
    final Widget child = obj.asWidget();

    if (child instanceof HasEnsureVisibleHandlers) {
      ((HasEnsureVisibleHandlers) child)
          .addEnsureVisibleHandler(
              new EnsureVisibleHandler() {
                public void onEnsureVisible(EnsureVisibleEvent event) {
                  parentTab_.ensureVisible();
                }
              });
    }

    if (child instanceof HasEnsureHiddenHandlers) {
      ((HasEnsureHiddenHandlers) child)
          .addEnsureHiddenHandler(
              new EnsureHiddenHandler() {
                public void onEnsureHidden(EnsureHiddenEvent event) {
                  parentTab_.ensureHidden();
                }
              });
    }

    child.setSize("100%", "100%");
    parentTab_.getPanel().add(child);
  }
Пример #2
0
 public void setIconRight(Widget w) {
   iconHolderRight.setWidget(w);
   iconHolderRight.setVisible(w != null);
   if (w != null) {
     w.setSize("20px", "20px");
     GwtUtil.setStyles(w, "verticalAlign", "middle", "margin", "0");
   }
 }