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


Java DialogBox類代碼示例

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


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

示例1: upgradeWarnDialog

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
private static void upgradeWarnDialog(String aMessage) {
  final DialogBox dialogBox = new DialogBox(false, true);
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.warningDialogTitle());
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  final HTML message = new HTML(aMessage);
  message.setStyleName("DialogBox-message");
  VerticalPanel vPanel = new VerticalPanel();
  Button okButton = new Button("OK");
  okButton.addClickListener(new ClickListener() {
      @Override
      public void onClick(Widget sender) {
        dialogBox.hide();
      }
    });
  vPanel.add(message);
  vPanel.add(okButton);
  dialogBox.setWidget(vPanel);
  dialogBox.center();
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:23,代碼來源:YoungAndroidFormUpgrader.java

示例2: finalDialog

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * The "Final" Dialog box. When a user chooses to end their session
 * due to a conflicting login, we should show this dialog which is modal
 * and has no exit! My preference would have been to close the window
 * altogether, but the browsers won't let javascript code close windows
 * that it didn't open itself (like the main window). I also tried to
 * use document.write() to write replacement HTML but that caused errors
 * in Firefox and strange behavior in Chrome. So we do this...
 *
 * We are called from invalidSessionDialog() (above).
 */
private void finalDialog() {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.finalDialogText());
  dialogBox.setHeight("100px");
  dialogBox.setWidth("400px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(MESSAGES.finalDialogMessage());
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:29,代碼來源:Ode.java

示例3: corruptionDialog

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * corruptionDialog -- Put up a dialog box explaining that we detected corruption
 * while reading in a project file. There is no continuing once this happens.
 *
 */
void corruptionDialog() {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.corruptionDialogText());
  dialogBox.setHeight("100px");
  dialogBox.setWidth("400px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(MESSAGES.corruptionDialogMessage());
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:23,代碼來源:Ode.java

示例4: disabledAccountDialog

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * This dialog is showned if an account is disabled. It is
 * completely modal with no escape. The provided URL is displayed in
 * an iframe, so it can be tailored to each person whose account is
 * disabled.
 *
 * @param Url the Url to display in the dialog box.
 */

public void disabledAccountDialog(String Url) {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.accountDisabledMessage());
  dialogBox.setHeight("700px");
  dialogBox.setWidth("700px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML("<iframe src=\"" + Url + "\" style=\"border: 0; width: 680px; height: 660px;\"></iframe>");
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:27,代碼來源:Ode.java

示例5: ForumFilesManagerUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * The constructor
 * @param forumMessage the forum message we will manage filed for
 * @param parentDialog the parent dialog
 */
public ForumFilesManagerUI( final ShortForumMessageData forumMessage, final DialogBox parentDialog ) {
	super( false, true, true, NUMBER_OF_FILES_PER_PAGE, NUMBER_OF_COLUMNS, SiteManager.getUserID(), parentDialog );
	
	//Store the message data
	this.forumMessage = forumMessage;
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Set the dialog's caption.
	updateDialogTitle();
	
	//Disable the actual dialog buttons for now
	disableAllControls();
	
	//Fill dialog with data
	populateDialog();	    
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:26,代碼來源:ForumFilesManagerUI.java

示例6: MoveMessageDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * @param messageID the ID of the message that we want to move
 * @param parentDialog the id of the parent dialog or null if none
 */
public MoveMessageDialogUI(final int messageID, DialogBox parentDialog) {
	super( false, false, true, parentDialog );
	
	//Store the message ID
	this.messageID = messageID;
	
	//Set the dialog's caption.
	this.setText( titlesI18N.moveForumMessageDialogTitle( messageID ) );
	
	//Enable the action buttons and hot key
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Fill dialog with data
	populateDialog();
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:21,代碼來源:MoveMessageDialogUI.java

示例7: UserSearchDialog

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * The user search constructor. Allows to provide the type of
 * user selection: single or multiple users. The latter is needed
 * if we select users when adding them to rooms, or writing messages.
 * @param numberOfRows the number of result rows in the user rearch, per page.
 * @param parentDialog the parent dialog, from which we open this one.
 * @param isSelectSingle true if we allow for a single user selection only
 */
public UserSearchDialog(final int numberOfRows, final DialogBox parentDialog, final boolean isSelectSingle) {
	super(true, true, true, SiteManager.getUserID(), parentDialog, isSelectSingle);
	
	//Store the needed param values
	NUMBER_OF_ROWS_PER_PAGE = numberOfRows;

	USER_GENDER_UNKNOWN_STR = titlesI18N.genderUnknownValue();
	USER_GENDER_MALE_STR = titlesI18N.genderMaleValue();
	USER_GENDER_FEMALE_STR = titlesI18N.genderFemaleValue();

	//Enable the default action buttons it will be used to close the dialog
	setLeftEnabled( true );
	
	this.setStyleName( CommonResourcesContainer.USER_DIALOG_STYLE_NAME );
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:24,代碼來源:UserSearchDialog.java

示例8: ViewMediaDialogBase

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * The generic constructor
 * @param hasSmileyTarget must be true if the dialog contains smiley selection targets, instances. 
 * @param autoHide true for auto hide
 * @param modal true for a modal dialog
 * @param parentDialog the parent dialog
 * @param numberOfFiles the number of files that we are going to view
 * @param initialFileIndex the index of the initial file to view
 */
public ViewMediaDialogBase( final boolean hasSmileyTarget, final boolean autoHide,
		 					final boolean modal, final DialogBox parentDialog,
		 					final int numberOfFiles, final int initialFileIndex ) {
	super( hasSmileyTarget, autoHide, modal, parentDialog);
	
	//Store the parameters
	this.numberOfFiles = numberOfFiles;
	this.currentFileIndex = initialFileIndex;
	
	//Enable dialog's animation
	this.setAnimationEnabled(true);
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:27,代碼來源:ViewMediaDialogBase.java

示例9: ProfileFilesManagerUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * The constructor
 * @param forumMessage the forum message we will manage filed for
 * @param parentDialog the parent dialog
 */
public ProfileFilesManagerUI( final UserData userData, final DialogBox parentDialog ) {
	super( false, true, true, NUMBER_OF_FILES_PER_PAGE, NUMBER_OF_COLUMNS, SiteManager.getUserID(), parentDialog );
	
	//Store the profile data
	this.userData = userData;
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Set the dialog's caption.
	updateDialogTitle();
	
	//Disable the actual dialog buttons for now
	disableAllControls();
	
	//Fill dialog with data
	populateDialog();	    
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:26,代碼來源:ProfileFilesManagerUI.java

示例10: UserProfileDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
public UserProfileDialogUI(final DialogBox parendDialog) {
	//No autohide, and the dialog is modal
	super( true, false, true, parendDialog );
	
	//Initialize the user files view
	this.userFilesView = new UserProfileFilesView( this, null);
	
	//Set the dialog's caption.
	setText( titlesI18N.userProfileDialogTitle( ) );
	
	//Set a style name so we can style it with CSS.
	this.setStyleName(CommonResourcesContainer.USER_DIALOG_STYLE_NAME);
	
	//Fill dialog with data
	populateDialog();
	
	//Get the current MainUserData object from the server
	retrieveUserData();
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:20,代碼來源:UserProfileDialogUI.java

示例11: MessagesManagerDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
    * A simple sialog for viewing the rooms of a user
 * @param forUserID the user ID we browse statistics for
 * @param forUserLoginName the login name of the user we brows data for
 * @param roomsManager the instance of the rooms manager
    */
public MessagesManagerDialogUI( final int forUserID, final String forUserLoginName,
								final DialogBox parentDialog, final RoomsManagerUI roomsManager ) {
	super( false, true, true, NUMBER_OF_ROWS_PER_PAGE, NUMBER_OF_COLUMNS_IN_MESSAGES_TABLE, forUserID, parentDialog );
	
	//Store the data
	this.forUserID = forUserID;
	this.forUserLoginName = forUserLoginName;
	this.roomsManager = roomsManager;
	
	//Set the dialog's caption.
	updateDialogTitle();
	
	this.setStyleName( CommonResourcesContainer.USER_DIALOG_STYLE_NAME );
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Disable the actual dialog buttons for now
	disableAllControls();
	
	//Fill dialog with data
	populateDialog();	    
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:32,代碼來源:MessagesManagerDialogUI.java

示例12: RoomsManagerDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
    * A simple sialog for viewing the rooms of a user
 * @param forUserID the user ID we browse statistics for
 * @param forUserLoginName the login name of the user we brows data for
 * @param roomsManager the instance of the rooms manager
    */
public RoomsManagerDialogUI( final int forUserID, final String forUserLoginName,
							 final DialogBox parentDialog, final RoomsManagerUI roomsManager ) {
	super( false, true, true, NUMBER_OF_ROWS_PER_PAGE, NUMBER_OF_ROOM_COLUMNS, forUserID, parentDialog );
	
	//Store the data
	this.forUserID = forUserID;
	this.forUserLoginName = forUserLoginName;
	this.roomsManager = roomsManager;
	
	//Set the dialog's caption.
	updateDialogTitle();
	
	this.setStyleName( CommonResourcesContainer.USER_DIALOG_STYLE_NAME );
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Disable the actual dialog buttons for now
	disableAllControls();
	
	//Fill dialog with data
	populateDialog();	    
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:32,代碼來源:RoomsManagerDialogUI.java

示例13: RoomUserAccessDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * This constructor allows to initialize the dialog
 * to work with a new room or with an existing room.
 * @param isNew if true then we want to create a new room.
 * @param userAccess the room data in case isNew == false
 * @param forUserID the user ID we create/edit user access rule for
 * @param forUserLoginName the user login name we create/edit user access rule for
 */
public RoomUserAccessDialogUI(final boolean isNew, final RoomUserAccessData userAccess,
								final DialogBox parentDialog,
								final int forUserID, final String forUserLoginName,
								final int roomID, final String roomName ) {
	super( false, false, true, parentDialog );
	
	//Store the id and login of the user we manage rooms for
	this.forUserID = forUserID;
	this.forUserLoginName = forUserLoginName;
	
	//Store the values
	this.isNew = isNew;
	this.userAccess = userAccess;
	this.roomID = roomID;
	this.roomName = roomName;
	
	//Set title and style
	updateTitle();
	this.setStyleName( CommonResourcesContainer.USER_DIALOG_STYLE_NAME );
	
	//Fill dialog with data
	populateDialog();
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:32,代碼來源:RoomUserAccessDialogUI.java

示例14: RoomDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
 * This constructor allows to initialize the dialog
 * to work with a new room or with an existing room.
 * @param isNew if true then we want to create a new room.
 * @param roomData the room data in case isNew == false
 * @param forUserID the user ID we create/edit room for
 * @param forUserLoginName the user login name we create/edit room for
 * @param roomsManager the instane of the rooms manager
 */
public RoomDialogUI(final boolean isNew, ChatRoomData roomData,
					final DialogBox parentDialog, final int forUserID,
					final String forUserLoginName, final RoomsManagerUI roomsManager ) {
	super( true, false,true, parentDialog );
	
	//Store the data
	this.forUserID = forUserID;
	this.forUserLoginName = forUserLoginName;
	this.roomsManager = roomsManager;
	
	//Store the values
	this.isNew = isNew;
	this.roomData = roomData;
	
	//Set the amin marker
	isAdmin = (SiteManager.getUserProfileType() == MainUserData.ADMIN_USER_TYPE);
	
	//Set title and style
	updateTitle();
	this.setStyleName( CommonResourcesContainer.USER_DIALOG_STYLE_NAME );
	
	//Fill dialog with data
	populateDialog();
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:34,代碼來源:RoomDialogUI.java

示例15: RoomUsersManagerDialogUI

import com.google.gwt.user.client.ui.DialogBox; //導入依賴的package包/類
/**
    * A simple sialog for viewing the rooms of a user
 * @param roomData the room object we manage users for
 * @param parentDialog the reference to the parent dialog
    */
public RoomUsersManagerDialogUI( ChatRoomData roomData, final DialogBox parentDialog ) {
	super( false, true, true, NUMBER_OF_ROWS_PER_PAGE,
			( (SiteManager.getUserProfileType() == MainUserData.ADMIN_USER_TYPE) ? NUMBER_OF_COLUMNS_ADMIN : NUMBER_OF_COLUMNS_USER ),
			SiteManager.getUserID(), parentDialog );
			
	this.thisRoomData = roomData;
	this.thisDialogRef = this;
	
	//Enable the action buttons and hot key, even though we will not be adding these buttons
	//to the grid, we will use the hot keys associated with them to close this dialog
	setLeftEnabled( true );
	setRightEnabled( true );
	
	//Set the dialog's caption.
	updateDialogTitle();
	
	//Disable the actual dialog buttons for now
	disableAllControls();
	
	//Fill dialog with data
	populateDialog();	    
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:28,代碼來源:RoomUsersManagerDialogUI.java


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