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