List of usage examples for com.google.gwt.user.client.ui DialogBox setText
public void setText(String text)
From source file:com.ephesoft.dcma.gwt.rv.client.view.ValidatePanel.java
License:Open Source License
/** * @param value/*from w ww .jav a2 s .co m*/ */ private void performFuzzySearch(String value) { if (presenter.document != null) { presenter.rpcService.fuzzyTextSearch(presenter.batchDTO.getBatch(), presenter.document.getType(), value, new AsyncCallback<List<List<String>>>() { @Override public void onFailure(Throwable arg0) { final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil .showConfirmationDialog( LocaleDictionary.get().getMessageValue( ReviewValidateMessages.MSG_FUZZY_SEARCH_UNSUCCESSFUL), LocaleDictionary.get().getConstantValue( ReviewValidateConstants.FUZZY_SEARCH_TOOLTIP), Boolean.TRUE); confirmationDialog.addDialogListener(new DialogListener() { @Override public void onOkClick() { confirmationDialog.hide(); ScreenMaskUtility.unmaskScreen(); presenter.setFocus(); } @Override public void onCancelClick() { ScreenMaskUtility.unmaskScreen(); presenter.setFocus(); } }); } @Override public void onSuccess(List<List<String>> arg0) { if (arg0 == null || arg0.isEmpty()) { final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil .showConfirmationDialog( LocaleDictionary.get().getMessageValue( ReviewValidateMessages.MSG_FUZZY_SEARCH_NO_RESULT), LocaleDictionary.get().getConstantValue( ReviewValidateConstants.FUZZY_SEARCH_TOOLTIP), Boolean.TRUE); confirmationDialog.addDialogListener(new DialogListener() { @Override public void onOkClick() { confirmationDialog.hide(); ScreenMaskUtility.unmaskScreen(); presenter.setFocus(); } @Override public void onCancelClick() { ScreenMaskUtility.unmaskScreen(); presenter.setFocus(); } }); } else { fuzzyDataCarrier = arg0; final DialogBox dialogBox = new DialogBox(); dialogBox.addStyleName(ReviewValidateConstants.CONFIGURED_DIMENSIONS_DIALOG); final FuzzySearchResultView fuzzySearchResultView = new FuzzySearchResultView( presenter, presenter.batchDTO.getFuzzySearchPopUpXDimension(), presenter.batchDTO.getFuzzySearchPopUpYDimension()); fuzzySearchResultView.setEventBus(eventBus); dialogBox.setWidget(fuzzySearchResultView); fuzzySearchResultView.setDialogBox(dialogBox); fuzzySearchResultView.createBatchList(arg0); fuzzySearchResultView.setWidth(presenter.batchDTO.getFuzzySearchPopUpYDimension()); dialogBox.center(); dialogBox.setText(LocaleDictionary.get() .getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_TITLE)); dialogBox.show(); fuzzySearchResultView.getSelectBtn().setFocus(true); } } }); } }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.AbstractMenuDialog.java
License:Open Source License
/** * Create a dialog with standard settings * @return// w w w .j a va2 s . c o m */ protected DialogBox createStandardDialog() { DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true); dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); dialog.setAutoHideEnabled(true); return dialog; }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.DeleteProjectDialogWidget.java
License:Open Source License
/** * Create the New Project Dialog Window/* w w w.j a v a 2 s .c o m*/ * * @return dialog The created Dialog Box */ private DialogBox createNewProjectDialog() { gitCommands = new GITCommands(); DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true); dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); VerticalPanel panel = new VerticalPanel(); panel.setSpacing(5); panel.add(createFolderNameTextBox()); panel.add(createExecuteAndCancelButtons()); dialog.add(panel); dialog.setAutoHideEnabled(true); return dialog; }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.git.GitCloneDialogWidget.java
License:Open Source License
/** * Create the GIT Clone Dialog Window//from w ww . j av a 2 s . co m * * @return dialog The created Dialog Box */ private DialogBox createCloneDialog() { gitCommands = new GITCommands(); //TODO Add input stuff to vertical panel DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true); dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); VerticalPanel panel = new VerticalPanel(); panel.setSpacing(5); //panel.add(createHtmlContent()); panel.add(createGitURLSuggestionBox()); panel.add(createFolderNameTextBox()); panel.add(createExecuteAndCancelButtons()); dialog.add(panel); dialog.setAutoHideEnabled(true); return dialog; }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.git.GitCommitLocalChangesDialogWidget.java
License:Open Source License
/** * Create the New Project Dialog Window//from ww w. j a v a2 s .co m * * @return dialog The created Dialog Box */ private DialogBox createCommitChangesDialog() { gitCommands = new GITCommands(); DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true); dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); VerticalPanel panel = new VerticalPanel(); panel.setSpacing(5); panel.add(createCommitterNameEntry()); panel.add(createCommitterEmailEntry()); panel.add(createLogMessageTextBox()); panel.add(createExecuteAndCancelButtons()); dialog.add(panel); dialog.setAutoHideEnabled(true); return dialog; }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.HelpDialogWidget.java
License:Open Source License
private DialogBox createDialog() { VerticalPanel panel = new VerticalPanel(); DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true);/* w w w . jav a2 s .c o m*/ dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); panel.add(createHtmlContent()); panel.add(createCloseButton()); dialog.add(panel); //dialog.setAutoHideEnabled(false); return dialog; }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.OperationResultDialog.java
License:Open Source License
/** * Create the GIT Clone Dialog Window/*w w w.java 2 s . c o m*/ * * @return dialog The created Dialog Box */ private DialogBox createGitStatusDialog(String message) { DialogBox dialog = new DialogBox(true); dialog.setAnimationEnabled(true); dialog.center(); dialog.setText(title); dialog.setGlassEnabled(true); VerticalPanel panel = new VerticalPanel(); panel.add(createHtmlContent(message)); panel.add(createCloseDialogButton()); dialog.add(panel); dialog.setAutoHideEnabled(true); return dialog; }
From source file:com.google.api.services.samples.calendar.appengine.client.CalendarButtons.java
License:Apache License
@UiHandler("deleteButton") void handleDelete(ClickEvent e) { DialogBox dialogBox = new DialogBox(); dialogBox.setAnimationEnabled(true); dialogBox.setText("Are you sure you want to permanently delete the calendar?"); DeleteDialogContent content = new DeleteDialogContent(main, dialogBox, calendar, calendarIndex); dialogBox.add(content);/*from ww w. j a va 2 s. c o m*/ dialogBox.show(); }
From source file:com.google.api.services.samples.calendar.appengine.client.CalendarButtons.java
License:Apache License
@UiHandler("updateButton") void handleUpdate(ClickEvent e) { DialogBox dialogBox = new DialogBox(); dialogBox.setAnimationEnabled(true); dialogBox.setText("Update Calendar Title:"); UpdateDialogContent content = new UpdateDialogContent(main, dialogBox, calendar, calendarIndex); dialogBox.add(content);/* w w w . j a v a 2 s . c o m*/ dialogBox.show(); }
From source file:com.google.appinventor.client.editor.blocks.BlocklyPanel.java
License:Open Source License
/** * Create a Dialog Box. We call this from Javascript (blockly) to * display a dialog box. We do this here because we can get calls * from the blocklyframe when it is not visible. Because we are in * the parent window, we can display dialogs that will be visible * even when the blocklyframe is not visible. * * @param title Title for the Dialog Box * @param mess The message to display * @param buttonName The string to display in the "OK" button. * @param size 0 or 1. 0 makes a smaller box 1 makes a larger box. * @param callback an opague JavaScriptObject that contains the * callback function provided by the Javascript code. * @return The created dialog box.//from www . ja v a 2 s . co m */ public static DialogBox createDialog(String title, String mess, final String buttonName, final String cancelButtonName, int size, final JavaScriptObject callback) { final DialogBox dialogBox = new DialogBox(); dialogBox.setStylePrimaryName("ode-DialogBox"); dialogBox.setText(title); if (size == 0) { dialogBox.setHeight("150px"); } else { dialogBox.setHeight("400px"); } dialogBox.setWidth("400px"); dialogBox.setGlassEnabled(true); dialogBox.setAnimationEnabled(true); dialogBox.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); HTML message = new HTML(mess); HorizontalPanel holder = new HorizontalPanel(); if (buttonName != null) { // If buttonName and cancelButtonName are null Button ok = new Button(buttonName); // We won't have any buttons and other ok.addClickHandler(new ClickHandler() { // code is needed to dismiss us @Override public void onClick(ClickEvent event) { doCallBack(callback, buttonName); } }); holder.add(ok); } if (cancelButtonName != null) { Button cancel = new Button(cancelButtonName); cancel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doCallBack(callback, cancelButtonName); } }); holder.add(cancel); } DialogBoxContents.add(message); DialogBoxContents.add(holder); dialogBox.setWidget(DialogBoxContents); terminateDrag(); // cancel a drag before showing the modal dialog dialogBox.show(); return dialogBox; }