예제 #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
파일: Toolbar.java 프로젝트: ltly/firefly
 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");
   }
 }