當前位置: 首頁>>代碼示例>>Java>>正文


Java DialogBox.hide方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.DialogBox.hide方法的典型用法代碼示例。如果您正苦於以下問題:Java DialogBox.hide方法的具體用法?Java DialogBox.hide怎麽用?Java DialogBox.hide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.DialogBox的用法示例。


在下文中一共展示了DialogBox.hide方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showIntroDialogBox

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void showIntroDialogBox() {
	if (config.getIntroMessage() == null)
		return;
	final DialogBox dialogBox = new DialogBox(true, true);
	VerticalPanel dialogBoxContents = new VerticalPanel();
	dialogBox.setText(I18nUtils.tr("welcome"));
	HTML message = new HTML(config.getIntroMessage());
	Button button = new Button(I18nUtils.tr("ok"), new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			dialogBox.hide();
		}
	});
	dialogBox.setWidth("400px");
	dialogBoxContents.add(message);
	dialogBoxContents.add(button);
	dialogBox.setWidget(dialogBoxContents);
	dialogBox.center();
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:20,代碼來源:PlannerWidgetEntryPoint.java

示例2: createDialogCloseButton

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
/**
 * Creates and returns a {@link Button} which when activated closes the specified dialog box.
 * @param dialogBox  dialog box to close when the close button is activated
 * @param buttonText text of the close button
 * @return a button which when activated closes the specified dialog box
 */
public static Button createDialogCloseButton( final DialogBox dialogBox, final String buttonText ) {
	return new Button( buttonText, new ClickHandler() {
		@Override
		public void onClick( final ClickEvent event ) {
			dialogBox.hide();
		}
	} );
}
 
開發者ID:icza,項目名稱:sc2gears,代碼行數:15,代碼來源:ClientUtils.java

示例3: alertWidget

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
public static DialogBox alertWidget(final String header, final String content) {
    final DialogBox dialogBox = new DialogBox();
    final VerticalPanel verticalPanel = new VerticalPanel();

    final Label emptyLabel = new Label("");
    emptyLabel.setSize("auto", "25px");

    dialogBox.setText(header);

    verticalPanel.add(emptyLabel);
    verticalPanel.add(new Label(content));
    verticalPanel.add(emptyLabel);

    final Button buttonClose = new Button("Close", new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            dialogBox.hide();
        }
    });
    buttonClose.setWidth("100px");
    verticalPanel.add(buttonClose);
    verticalPanel.setCellHorizontalAlignment(buttonClose, HasAlignment.ALIGN_CENTER);

    dialogBox.add(verticalPanel);
    dialogBox.setWidth("400px");
    return dialogBox;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:29,代碼來源:ProjectConfigurationScreen.java

示例4: alertWidget

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
/**
 * Creates a DialogBox object with the specified header and content and
 * returns it to be displayed.
 *
 * @param header
 *            Title for the alert dialog
 * @param content
 *            Inner message content to display
 * @return A DialogBox object configured with the specified strings
 */
public static DialogBox alertWidget(final String header,
		final String content) {
	final DialogBox dialogBox = new DialogBox();
	final VerticalPanel verticalPanel = new VerticalPanel();

	final Label emptyLabel = new Label("");
	emptyLabel.setSize("auto", "25px");

	dialogBox.setText(header);

	verticalPanel.add(emptyLabel);
	verticalPanel.add(new Label(content));
	verticalPanel.add(emptyLabel);

	final Button buttonClose = new Button("Close", new ClickHandler() {

		@Override
		public void onClick(final ClickEvent event) {
			dialogBox.hide();
		}
	});
	buttonClose.setWidth("100px");
	verticalPanel.add(buttonClose);
	verticalPanel.setCellHorizontalAlignment(buttonClose,
			HasAlignment.ALIGN_CENTER);

	dialogBox.add(verticalPanel);
	return dialogBox;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:40,代碼來源:ConfigurationScreen.java

示例5: linkTo

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void linkTo() {
	// Create URL
	String url = new PlannerState(getPlanRequestBean()).getUrl();
	// Display dialog box
	final DialogBox dialogBox = new DialogBox(true, true);
	VerticalPanel dialogBoxContents = new VerticalPanel();
	dialogBoxContents.setWidth("100%");
	dialogBox.setText(I18nUtils.tr("link.to.this.page"));
	Label message = new Label(I18nUtils.tr("copy.paste.link.hint"));
	dialogBoxContents.add(message);
	final TextBox urlTextBox = new TextBox();
	urlTextBox.setText(url);
	urlTextBox.setWidth("100%");
	dialogBoxContents.add(urlTextBox);
	Scheduler.get().scheduleDeferred(new ScheduledCommand() {
		@Override
		public void execute() {
			urlTextBox.selectAll();
			urlTextBox.setFocus(true);
		}
	});
	Button button = new Button(I18nUtils.tr("ok"), new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			dialogBox.hide();
		}
	});
	dialogBoxContents.add(button);
	dialogBox.setWidth("400px");
	dialogBox.setWidget(dialogBoxContents);
	dialogBox.center();
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:33,代碼來源:PlannerFormWidget.java

示例6: HideDialog

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
/**
 * Hide a dialog box. This function is here so it can be called from
 * the blockly code. We cannot call "hide" directly from the blockly
 * code because when this code is compiled, the "hide" method disappears!
 *
 * @param dialog The dialogbox to hide.
 */

public static void HideDialog(DialogBox dialog) {
  dialog.hide();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:12,代碼來源:BlocklyPanel.java


注:本文中的com.google.gwt.user.client.ui.DialogBox.hide方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。