Java Code Examples for com.google.gwt.user.client.ui.DialogBox#add()

The following examples show how to use com.google.gwt.user.client.ui.DialogBox#add() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Echoes.java    From jolie with GNU Lesser General Public License v2.1 6 votes vote down vote up
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 );
}
 
Example 2
Source File: Echoes.java    From jolie with GNU Lesser General Public License v2.1 6 votes vote down vote up
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();
		}
	} );
}
 
Example 3
Source File: EchoesCallback.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
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();
}