当前位置: 首页>>代码示例>>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;未经允许,请勿转载。