com.google.gwt.user.client.Window.prompt()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中com.google.gwt.user.client.Window.prompt()方法的一些代码示例,展示了Window.prompt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.prompt()方法的具体详情如下:
包路径:com.google.gwt.user.client.Window
类名称:Window
方法名:prompt

Window.prompt介绍

[英]Displays a request for information in a modal dialog box, along with the standard 'OK' and 'Cancel' buttons.
[中]在模式对话框中显示信息请求,以及标准的“确定”和“取消”按钮。

代码示例

代码示例来源:origin: sriharshachilakapati/SilenceEngine

@Override
public String prompt(String message, String defaultValue)
{
  return Window.prompt(message, defaultValue);
}

代码示例来源:origin: threerings/playn

@Override
public void getText(TextType textType, String label, String initVal, Callback<String> callback) {
 callback.onSuccess(Window.prompt(label, initVal));
}

代码示例来源:origin: playn/playn

@Override public RFuture<String> getText(Keyboard.TextType textType, String label,
                     String initVal) {
 String result = Window.prompt(label, initVal);
 emitFakeMouseUp();
 return RFuture.success(result);
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * Displays a dialog that allows to copy the complete text of a row
 * (currently unused).
 */
@SuppressWarnings("unused")
private void copyRowText()
{
  StringBuilder aRowText = new StringBuilder();
  int			  nLastCol = aHeader.getColumnCount() - 1;
  for (int nCol = 0; nCol <= nLastCol; nCol++)
  {
    aRowText.append(aDataTable.getText(nSelectedRow, nCol));
    if (nCol < nLastCol)
    {
      aRowText.append(',');
    }
  }
  Window.prompt("Kopieren", aRowText.toString());
}

代码示例来源:origin: io.playn/playn-html

@Override public RFuture<String> getText(Keyboard.TextType textType, String label,
                     String initVal) {
 String result = Window.prompt(label, initVal);
 emitFakeMouseUp();
 return RFuture.success(result);
}

代码示例来源:origin: dankurka/gwtphonegap

@Override
public void prompt(String message, PromptCallback callback) {
     String enteredValue = Window.prompt(message, "OK");
    PromptResults results;
    if (enteredValue == null) {
      results = new PromptResultsBrowserImpl(1, null);
    } else {
      results = new PromptResultsBrowserImpl(0, enteredValue);
    }
    callback.onPrompt(results);
}

代码示例来源:origin: bedatadriven/activityinfo

private void addOption() {
  String newLabel = Window.prompt(I18N.CONSTANTS.enterNameForOption(), "");
  if (!Strings.isNullOrEmpty(newLabel)) {
    EnumItem newValue = new EnumItem(EnumItem.generateId(), newLabel);
    enumType.getValues().add(newValue);
    boxPanel.add(createControl(newValue));
  }
}

代码示例来源:origin: bedatadriven/activityinfo

private void editLabel(ResourceId id) {
  EnumItem enumItem = enumValueForId(id);
  String newLabel = Window.prompt(I18N.CONSTANTS.enterNameForOption(), enumItem.getLabel());
  if (!Strings.isNullOrEmpty(newLabel)) {
    enumItem.setLabel(newLabel);
    controlForId(id).setHTML(designLabel(newLabel));
  }
}

代码示例来源:origin: org.kie.guvnor/guvnor-categories-editor-client

public void onClick( ClickEvent w ) {
    if ( !explorer.isSelected() ) {
      Window.alert( Constants.INSTANCE.PleaseSelectACategoryToRename() );
      return;
    }
    final String name = Window.prompt( Constants.INSTANCE.CategoryNewNamePleaseEnter(), "" );
    if ( name != null ) {
      isDirty = true;
      explorer.renameSelected( name );
    }
  }
} );

代码示例来源:origin: com.extjs/gxt

getExtendedFormatter().insertUnorderedList();
} else if (item == link) {
 String link = Window.prompt(getMessages().getCreateLinkText(), "http://");
 if (link != null && link.length() > 0) {
  getExtendedFormatter().createLink(link);

代码示例来源:origin: org.apache.james.hupa/hupa-widgets

formatter.setJustification(RichTextArea.Justification.RIGHT);
} else if (sender == insertImage) {
  String url = Window.prompt("Enter an image URL:", "http://");
  if (url != null) {
    formatter.insertImage(url);
  String url = Window.prompt("Enter a link URL:", "http://");
  if (url != null) {
    formatter.createLink(url);

相关文章