Esempio n. 1
0
 @Inject
 public ModuleWindow(ModuleInfo module) {
   this.module = module;
   masked = binder.createAndBindUi(this);
   super.initWidget(masked);
   title.setTargetHistoryToken("SingleRender$" + module.getId());
 }
Esempio n. 2
0
  /**
   * Initialize widget components and layout elements.
   *
   * @param type file input to use
   * @param form An existing form panel to use
   */
  public Uploader(FileInputType type, FormPanel form) {
    thisInstance = this;
    this.fileInputType = type;

    if (form == null) {
      form = new FormFlowPanel();
    }
    uploadForm = form;
    uploadForm.setEncoding(FormPanel.ENCODING_MULTIPART);
    uploadForm.setMethod(FormPanel.METHOD_POST);
    uploadForm.addSubmitHandler(onSubmitFormHandler);
    uploadForm.addSubmitCompleteHandler(onSubmitCompleteHandler);
    // Issue #206
    FormElement.as(uploadForm.getElement()).setAcceptCharset("UTF-8");

    uploaderPanel = getUploaderPanel();
    uploaderPanel.add(uploadForm);
    uploaderPanel.setStyleName(STYLE_MAIN);

    setFileInput(fileInputType.getInstance());

    setStatusWidget(statusWidget);

    super.initWidget(uploaderPanel);
  }
  /** Creates a new instance of SoftVerticalScroll */
  public SoftHorizontalScrollbar(SoftScrollArea target) {
    this.target = target;
    this.base = new SimplePanel();

    Panel horizontal = new HorizontalPanel();
    this.base.setWidget(horizontal);
    super.initWidget(this.base);
    this.higherTarget.setWidget(this.higher);
    this.barTarget.setWidget(this.bar);
    this.lowerTarget.setWidget(this.lower);

    horizontal.add(lowerTarget);
    horizontal.add(barTarget);
    horizontal.add(higherTarget);
    this.setStyleName("gwittir-SoftHorizontalScrollbar");
    this.bar.setStyleName("bar");
    this.lower.setStyleName("lower");
    this.higher.setStyleName("higher");
    DOM.setStyleAttribute(this.lower.getElement(), "overflow", "hidden");
    DOM.setStyleAttribute(this.bar.getElement(), "overflow", "hidden");
    DOM.setStyleAttribute(this.higher.getElement(), "overflow", "hidden");
    DOM.setStyleAttribute(this.getElement(), "overflow", "hidden");
  }
  public AbstractSourceButton(String source) {
    this.button = new Button(ShowcaseSearchPanel.I18N.viewSource(source), this);

    super.initWidget(button);
  }
 /** {@inheritDoc} */
 protected void initWidget(Widget widget) {
   super.initWidget(widget);
   dialog.setWidget(this);
 }