当前位置: 首页>>代码示例>>Java>>正文


Java FileUpload.ensureDebugId方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.FileUpload.ensureDebugId方法的典型用法代码示例。如果您正苦于以下问题:Java FileUpload.ensureDebugId方法的具体用法?Java FileUpload.ensureDebugId怎么用?Java FileUpload.ensureDebugId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.FileUpload的用法示例。


在下文中一共展示了FileUpload.ensureDebugId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showDialog

import com.google.gwt.user.client.ui.FileUpload; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void showDialog() {
  errorMessage.setText("");
  fileContent = null;
  fileUpload = new FileUpload();
  fileUpload.setHeight("22px");
  fileUpload.setWidth("100%");
  fileUpload.setName("file");
  fileUpload.ensureDebugId("import-from-config-ChooseFile");
  addHandler(fileUpload.getElement());

  fileUpload.addChangeHandler(event -> buttonImport.setEnabled(fileUpload.getFilename() != null));

  uploadForm.add(fileUpload);

  this.show();
}
 
开发者ID:eclipse,项目名称:che,代码行数:19,代码来源:ImportFromConfigViewImpl.java

示例2: addFileUploadForm

import com.google.gwt.user.client.ui.FileUpload; //导入方法依赖的package包/类
private void addFileUploadForm() {
  file = new FileUpload();
  file.setHeight("22px");
  file.setWidth("100%");
  file.setName("file");
  file.ensureDebugId("file-uploadFile-ChooseFile");
  file.addChangeHandler(
      new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
          delegate.onFileNameChanged();
        }
      });
  uploadPanel.insert(file, 0);
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:UploadFolderFromZipViewImpl.java

示例3: addFile

import com.google.gwt.user.client.ui.FileUpload; //导入方法依赖的package包/类
private void addFile() {
  file = new FileUpload();
  file.setHeight("22px");
  file.setWidth("100%");
  file.setName("file");
  file.ensureDebugId("file-uploadFile-ChooseFile");
  file.addChangeHandler(
      new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
          delegate.onFileNameChanged();
        }
      });
  uploadPanel.insert(file, 0);
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:UploadFileViewImpl.java

示例4: onInitialize

import com.google.gwt.user.client.ui.FileUpload; //导入方法依赖的package包/类
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Create a vertical panel to align the content
  VerticalPanel vPanel = new VerticalPanel();

  // Add a label
  vPanel.add(new HTML(constants.cwFileUploadSelectFile()));

  // Add a file upload widget
  final FileUpload fileUpload = new FileUpload();
  fileUpload.ensureDebugId("cwFileUpload");
  vPanel.add(fileUpload);

  // Add a button to upload the file
  Button uploadButton = new Button(constants.cwFileUploadButton());
  uploadButton.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
      String filename = fileUpload.getFilename();
      if (filename.length() == 0) {
        Window.alert(constants.cwFileUploadNoFileError());
      } else {
        Window.alert(constants.cwFileUploadSuccessful());
      }
    }
  });
  vPanel.add(new HTML("<br>"));
  vPanel.add(uploadButton);

  // Return the layout panel
  return vPanel;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:36,代码来源:CwFileUpload.java


注:本文中的com.google.gwt.user.client.ui.FileUpload.ensureDebugId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。