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


Java DialogBox.add方法代碼示例

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


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

示例1: createLyricsDialog

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void createLyricsDialog()
{
	lyricsDialog = new DialogBox();
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setHeight( "100%" );
	vPanel.setHorizontalAlignment( VerticalPanel.ALIGN_CENTER );
	vPanel.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
	lyricsDialog.add( vPanel );
	
	lyrics = new HTML();
	ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setWidth( "300px" );
	scrollPanel.setHeight( "250px" );
	scrollPanel.add( lyrics );
	vPanel.add( scrollPanel );
	
	Button close = new NativeButton( "Close" );
	close.addClickListener( new ClickListener() {
		public void onClick( Widget arg0 ) {
			lyricsDialog.hide();
		}
	} );
	vPanel.add( close );
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:25,代碼來源:Echoes.java

示例2: closeClientSession

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void closeClientSession()
{
	final DialogBox dialog = new DialogBox();
	dialog.add( new Label( "Exiting..." ) );
	dialog.center();
	dialog.show();
	Value v = getLocationValue();
	v.getNewChild( "sid" ).setValue( sid );
	JolieService.Util.getInstance().call(
		"closeClientSession", v, new EchoesCallback() {
		@Override
		public void onSuccess( Value response ) {
			dialog.hide();
		}
	} );
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:17,代碼來源:Echoes.java

示例3: showProposals

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void showProposals() {
	proposalDialog = new DialogBox();
	proposalDialog.setAnimationEnabled(true);
	VerticalPanel rootPanel = new VerticalPanel();
	proposalDialog.add(rootPanel);
	rootPanel.add(proposalPanel);
	HorizontalPanel buttonPanel = new HorizontalPanel();
	rootPanel.add(buttonPanel);
	Button cancelButton = new Button(I18nUtils.tr("cancel"));
	buttonPanel.add(cancelButton);
	cancelButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			hideProposals();
		}
	});
	proposalDialog.setAutoHideEnabled(true);
	proposalDialog.showRelativeTo(getAsWidget());
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:20,代碼來源:AddressProposalBox.java

示例4: displayFault

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
private void displayFault( String faultString )
{
	final DialogBox dialog = new DialogBox();
	dialog.add( new Label( faultString ) );
	Button closeButton = new Button( "Close" );
	closeButton.addClickListener( new ClickListener() {
		public void onClick( Widget arg0 ) {
			dialog.hide();
		}
	} );
	dialog.center();
	dialog.show();
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:14,代碼來源:EchoesCallback.java

示例5: 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

示例6: 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

示例7: onModuleLoad

import com.google.gwt.user.client.ui.DialogBox; //導入方法依賴的package包/類
public void onModuleLoad() {
	final DialogBox loginBox=new DialogBox();
	loginBox.setAnimationEnabled(true);
	loginBox.setGlassEnabled(true);
	loginBox.setTitle("This panel allows you to login to the system.");
	
	final VerticalPanel vp=new VerticalPanel();
	final PasswordTextBox ptb=new PasswordTextBox();
	final Button lbutton=new Button("Go");
	vp.add(ptb);
	vp.add(lbutton);
	loginBox.add(vp);
	
	lbutton.addClickHandler(new ClickHandler() {

		@Override
		public void onClick(ClickEvent event) {
			if(ptb.getText().startsWith("abracadabra")) {
				user=ptb.getText().substring("abracadabra".length());
				loadModule();
				loginBox.hide();
			}
			else
				Window.alert("Sorry better luck next time :)");
		}	
		
	});		
	
	loginBox.center();		
	
}
 
開發者ID:ganeshjawahar,項目名稱:ire-seimp,代碼行數:32,代碼來源:SEIMPAnnotator.java


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