当前位置: 首页>>代码示例>>Java>>正文


Java HorizontalPanel.setVerticalAlignment方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HorizontalPanel.setVerticalAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalPanel.setVerticalAlignment方法的具体用法?Java HorizontalPanel.setVerticalAlignment怎么用?Java HorizontalPanel.setVerticalAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.HorizontalPanel的用法示例。


在下文中一共展示了HorizontalPanel.setVerticalAlignment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSeparatorPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void createSeparatorPanel() {
	separatorPanel = new HorizontalPanel();
	separatorPanel.setSpacing(1);
	separatorPanel.setWidth("100%");
	separatorPanel.addStyleName(ThemeStyles.get().style().borderTop());
	separatorPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	separatorPanel
			.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	separatorPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	separatorPanel.add(new Label(UIMessages.INSTANCE
			.separator(DEFAULT_CSV_SEPARATOR)));
	separatorTextField = new TextField();
	separatorTextField.setText(DEFAULT_CSV_SEPARATOR);
	separatorTextField.setWidth(30);

	separatorPanel.add(separatorTextField);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:JoinDataDialog.java

示例2: PageListWidget

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * The basic constructor 
 * @param siteSectionPrefix the history token site section prefix
 */
public PageListWidget( final String siteSectionPrefix ) {
	this.siteSectionPrefix = siteSectionPrefix;
	final HorizontalPanel mainPanel = new HorizontalPanel();
	mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
	mainPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM);
	indexesPanel = new HorizontalPanel();
	indexesPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
	indexesPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM);
	Label pageLabel = new Label( I18NManager.getTitles().pageString() );
	pageLabel.setStyleName( CommonResourcesContainer.REGULAR_FIELD_STYLE );
	mainPanel.add( pageLabel );
	mainPanel.add( new HTML(": ") );
	mainPanel.add( indexesPanel );
	//The wrapper panel
	HorizontalPanel wrapPanel = new HorizontalPanel();
	wrapPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	wrapPanel.add( mainPanel );
	initWidget( wrapPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:24,代码来源:PageListWidget.java

示例3: getPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private HorizontalPanel getPanel(final HTML data) {
	HorizontalPanel panel = new HorizontalPanel();
	panel.setSize("520px", "310px");
	panel.setSpacing(5);
	panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

	panel.add(getAuthenticationPanel());
	panel.add(data);
	return panel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:11,代码来源:Welcome.java

示例4: SlidingToolbar

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private SlidingToolbar(PanelSizeInfo sizeInfo) {
	HorizontalPanel container = new HorizontalPanel();
	this.initWidget(container);
	setWidth("340px");
	setStylePrimaryName("toolbar");
	setHeight("100%");
	container.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	DOM.setStyleAttribute(getElement(), "marginLeft", "-320px");
	mainPanel = new VerticalPanel();
	mainPanel.setStylePrimaryName("mainToolbarPanel");
	tab = new Label(">");
	tab.setStylePrimaryName("tabToolbarPanel");
	container.add(mainPanel);
	container.add(tab);
	
	// Configure Main Panel
	mainPanel.setHeight("80%");
	mainPanel.setWidth("320px");
	mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	Element mainElem = mainPanel.getElement();
	DOM.setStyleAttribute(mainElem, "paddingLeft", "70px");
	DOM.setStyleAttribute(mainElem, "paddingTop", "20px");
	DOM.setStyleAttribute(mainElem, "paddingRight", "20px");
	DOM.setStyleAttribute(mainElem, "paddingBottom", "20px");
	
	// Configure Tab
	tab.setWidth("20px");
	tab.setHeight("50px");
	tab.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	Element tabElem = tab.getElement();
	DOM.setStyleAttribute(tabElem, "lineHeight", "50px");
	
	// Add to Window
	RootPanel.get().add(this, 0, 0);
	
	addAnimation();
	
	createToolbarContent(sizeInfo);
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:40,代码来源:SlidingToolbar.java

示例5: AbsolutePanelComponent

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public AbsolutePanelComponent() {
	componentContainer = new HorizontalPanel();
	componentContainer.setWidth("100%");
	componentContainer.setHeight("100%");
	componentContainer.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
	componentContainer.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
	
	setPanelWidget(componentContainer);
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:10,代码来源:AbsolutePanelComponent.java

示例6: OperationsMenu

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public OperationsMenu() {
	buttonBar = new HorizontalPanel();
	buttonBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
       turnOffButtons();
       animationButton.addStyleDependentName("SMALLER");
       animationButton.setTitle("Interactive interface for making a sequence of plots over time.");
       compareButton.addStyleDependentName("SMALLER");
       correlationButton.addStyleDependentName("SMALLER");
       correlationButton.setTitle("Beta interface to make a scatter plot of a property vs. another property.");
       googleEarthButton.addStyleDependentName("SMALLER");
       googleEarthButton.setTitle("View a plot of data draped over the globe using Google Earth.");
       showValuesButton.addStyleDependentName("SMALLER");
       showValuesButton.setTitle("Look at the data values in a new window.");
       exportToDesktopButton.addStyleDependentName("SMALLER");
       exportToDesktopButton.setTitle("Get a few lines of native script for various analysis packages.");
       saveAsButton.addStyleDependentName("SMALLER");
       saveAsButton.ensureDebugId("saveAsButton");
       saveAsButton.setTitle("Save data in various text and binary formats.");
       climateAnalysis.addStyleDependentName("SMALLER");
       climateAnalysis.setTitle("Perform time average spectrum and other advanced analysis.");
       dsgTable.addStyleDependentName("SMALLER");
       dsgTable.setTitle("See a table of current observations by ID.");
       thumbnailTable.addStyleDependentName("SMALLER");
       thumbnailTable.setTitle("See a table of select property-property plots.");
	buttonBar.add(animationButton);
	buttonBar.add(correlationButton);
	buttonBar.add(googleEarthButton);
	buttonBar.add(showValuesButton);
	buttonBar.add(exportToDesktopButton);
	buttonBar.add(saveAsButton);
	buttonBar.add(climateAnalysis);
	buttonBar.add(dsgTable);
	buttonBar.add(thumbnailTable);
	climateAnalysis.setVisible(false);
	dsgTable.setVisible(false);
	thumbnailTable.setVisible(false);
	initWidget(buttonBar);
	buttonBar.setSize("100%", "100%");
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:40,代码来源:OperationsMenu.java

示例7: SiteTitle

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public SiteTitle() {
	//Add the widgets to the main panel
	HorizontalPanel titlePanel = new HorizontalPanel();
	titlePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	titlePanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	titlePanel.add( SiteDynamicDecorations.getBackgroundTimeImage() );
	//titlePanel.add( new HTML(" ") ); //Add some spacing
	//titlePanel.add( SiteDynamicDecorations.getSiteTitleLabel() );
	
	//Initialize the composite
	initWidget( titlePanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:13,代码来源:SiteTitle.java

示例8: getLocaleSelectionPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Allows to get the locale selection Panel
 * @return
 */
public static HorizontalPanel getLocaleSelectionPanel() {
	final HorizontalPanel localeSelectionPanel = new HorizontalPanel();
	localeSelectionPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	localeSelectionPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
	localeSelectionPanel.setStyleName( CommonResourcesContainer.LOCALE_PANEL_STYLE );
	
	String[] localeNames = LocaleInfo.getAvailableLocaleNames();
	for( String localeValue : localeNames ) {
		if( !localeValue.equals( InterfaceUtils.DEFAULT_LOCALE_VALUE ) ) {
			String nativeName = LocaleInfo.getLocaleNativeDisplayName( localeValue );
			Image localeImage = new Image();
			localeImage.addStyleName( CommonResourcesContainer.LOCALIZATION_IMAGE_STYLE );
			localeImage.setUrl( ServerSideAccessManager.SITE_IMAGES_LOCATION + "locale_small_" + localeValue + ".png");
			localeImage.setTitle( nativeName );
			final String currLocaleValue = localeValue;
			localeImage.addClickHandler( new ClickHandler() {
				@Override
				public void onClick(ClickEvent event) {
					reloadWebSitePages( currLocaleValue );
				}
			});
			localeSelectionPanel.add( new HTML("&nbsp") );
			localeSelectionPanel.add( localeImage );
		}
	}
	
	return localeSelectionPanel;
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:33,代码来源:InterfaceUtils.java

示例9: displayStatisticsElement

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Allows to display the statistics entry based on the statistical data text and the image
 * @param avatarVerticalPanel the vertical panel to add the statistical widget to
 * @param widget the widget that described the value 
 * @param image_name the name of the image describing the statistics 
 */
private void displayStatisticsElement( final VerticalPanel avatarVerticalPanel,
									   final Widget widget, final String image_name) {
	final HorizontalPanel panel = new HorizontalPanel();
	panel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
	panel.add( new Image( ServerSideAccessManager.USER_INFO_RELATED_IMAGES_LOCATION +
						  ServerSideAccessManager.SERVER_CONTEXT_DELIMITER + image_name + ".png" ) );
	panel.add( new HTML(" ") );
	panel.add( widget );
	avatarVerticalPanel.add( panel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:17,代码来源:UserAvatarWidget.java

示例10: createPageSizeWidget

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
protected Widget createPageSizeWidget() {
  HorizontalPanel panel = new HorizontalPanel();
  panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  panel.add(new HTML(_messages.pagesize1()));
  panel.add(new ListBox());
  panel.add(new HTML(_messages.pagesize2()));
  panel.setStylePrimaryName(STYLE_PAGESIZE);
  return panel;
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:10,代码来源:PagingBar.java

示例11: TextMaximumSizeProgress

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * This constructor should be only visible inside of the package.
 * Note that to initialize the progress bar one has to bind it to the text base object.
 * This should be done using the method bindProgressBar(...).
 */
TextMaximumSizeProgress( ) {
	//Initialize the progress bar content first
	HorizontalPanel innerProgressBarPanel = new HorizontalPanel(); 
	innerProgressBarPanel.setStyleName( CommonResourcesContainer.PROGRESS_BAR_STYLE_NAME );
	innerProgressBarPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	innerProgressBarPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	innerProgressBarPanel.add( leftBar );
	innerProgressBarPanel.add( rightBar );
	progressBarPanel.addClickHandler( new ClickHandler(){
		public void onClick(ClickEvent e) {
			if( isMaximumLengthExceeded ) {
				(new SplitLoad( true ) {
					@Override
					public void execute() {
						//Report the error
						ErrorMessagesDialogUI.openErrorDialog( infoToolTipMessage );
					}
				}).loadAndExecute();
			} else {
				(new SplitLoad( true ) {
					@Override
					public void execute() {
						//Open the info dialog
						InfoMessageDialogUI.openInfoDialog( infoToolTipMessage );
					}
				}).loadAndExecute();
			}
		}
	});
	progressBarPanel.add( innerProgressBarPanel );
	
	//Initialize the composite
	initWidget( progressBarPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:40,代码来源:TextMaximumSizeProgress.java

示例12: UserProfileFilesView

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * The basic constructor
 */
public UserProfileFilesView( final DialogBox parentDialog, final UserData userData ) {
	//Store the reference to the parent dialog
	this.parentDialog = parentDialog;
	
	//Set the local scroll panel
	ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.addStyleName( CommonResourcesContainer.FILE_TUMBNAILS_PANEL_STYLE );
	//Set up the images panel
	thumbnailsPanel = new HorizontalPanel();
	thumbnailsPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	thumbnailsPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	scrollPanel.add( thumbnailsPanel );
	
	//Instantiate the buttons
	previousButton = new LeftRightButtons( CommonResourcesContainer.NAV_LEFT_IMG_BUTTON, false , false );
	nextButton 	   = new LeftRightButtons( CommonResourcesContainer.NAV_RIGHT_IMG_BUTTON, false , false );
	
	//Set up the main panel
	mainHorPanel = new HorizontalPanel();
	mainHorPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );

	mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	mainHorPanel.add( previousButton );
	mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	mainHorPanel.add( scrollPanel );
	mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	mainHorPanel.add( nextButton );
	
	//Set the user profile files
	setUserProfile( userData );
	
	//Initialize the widget
	initWidget( mainHorPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:38,代码来源:UserProfileFilesView.java

示例13: initializeWarning

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public void initializeWarning( final String warningString ) {
   	//For the MS IE we add an error/warning message
   	//about that we do not really suport it
   	VerticalPanel warningPanel = new VerticalPanel();
   	warningPanel.setStyleName( CommonResourcesContainer.IE_ERROR_PANEL_STYLE_NAME );
   	warningPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
   	warningPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
   	//Add the error/warning message
   	HTML errorMessage = new HTML( warningString );
   	warningPanel.add( errorMessage );
  	
   	//Add the horizontal panel with the continue button and the localization list box
   	HorizontalPanel horizPanel = new HorizontalPanel();
   	horizPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
   	horizPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
   	//Add the continue button
   	Button continueButon = new Button();
   	continueButon.setText( I18NManager.getTitles().continueButtonTitle() );
   	continueButon.setStyleName( CommonResourcesContainer.USER_DIALOG_ACTION_BUTTON_STYLE );
   	continueButon.addClickHandler( new ClickHandler() {
   		public void onClick( ClickEvent e) {
   	    	//Remember that the user was warned about using MS IE
   	    	SiteManager.setMSIEWarned();
   	    	//Initialize the web site
   	    	initializeSite();
   		}
   	});
   	horizPanel.add( continueButon );
   	//Add spacing
   	horizPanel.add( new HTML(" ") );
   	//Add the localization list box
   	horizPanel.add( InterfaceUtils.getLocaleSelectionPanel() );
   	
   	warningPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
   	warningPanel.add( horizPanel );
   	RootPanel.get().add( warningPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:38,代码来源:XCureChatMain.java

示例14: Top10UserFileWidget

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * The basic constructor
 * @param parentDialog the reference to the parent dialog or null if none
 * @param fileDescriptors the list of the users' profile files to browse through 
 * @param fileIndex the index of the file we create this preview widget for
 */
public Top10UserFileWidget( final DialogBox parentDialog, final List<ShortUserFileDescriptor> fileDescriptors, final int fileIndex ) {
	//Store the data
	this.parentDialog = parentDialog;
	this.fileDescr = fileDescriptors.get( fileIndex );
	
	//Initialize and fill out the main panel
	mainPanel = new VerticalPanel();
	mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	
	//Initialize the image 
	previewImage = constructThumbnailImage( fileDescriptors, fileIndex );
	
	//Initialize the upload date panel
	final HorizontalPanel uploadDatePanel = new HorizontalPanel();
	uploadDatePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
	//Add the image
	uploadDatePanel.add( new Image( ServerSideAccessManager.USER_INFO_RELATED_IMAGES_LOCATION +
			  			 ServerSideAccessManager.SERVER_CONTEXT_DELIMITER + "uploaded.png" ) );
	uploadDatePanel.add( new HTML("&nbsp;") );
	//Add the date label
	{
		final DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat( PredefinedFormat.DATE_TIME_SHORT );
		final Label uploadDateLabel = new Label( dateTimeFormat.format( fileDescr.uploadDate ) );
		uploadDateLabel.setStyleName( CommonResourcesContainer.TOP_TEN_USER_FILE_UPLOAD_DATE_STYLE );
		uploadDatePanel.add( uploadDateLabel );
	}
	
	//Initialize the user name label
	userNameAvatar = new UserAvatarWidget( fileDescr.ownerID, fileDescr.ownerLoginName );
	
	mainPanel.add( previewImage );
	mainPanel.add( uploadDatePanel );
	mainPanel.add( userNameAvatar );
	
	//Initialize the composite
	initWidget(mainPanel);
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:44,代码来源:Top10UserFileWidget.java

示例15: addAvatarDataFields

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void addAvatarDataFields() {
	//ADD THE MAIN DATA FIELDS
	addNewGrid( 1, true, titlesI18N.avatarUserProfilePanel(), true);
	
	//Initialize the avatar's image actions
	VerticalPanel avatarActionPanel = new VerticalPanel();
	avatarActionPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	avatarActionPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	ActionLinkPanel chooseAvatarActionLink = new ActionLinkPanel( ServerSideAccessManager.getChooseImageURL(), "",
																  ServerSideAccessManager.getChooseImageURL(), "",
																  titlesI18N.chooseLinkTitle(), avatarChooseAction, true, true ); 
	chooseAvatarActionLink.setImportant();
	avatarActionPanel.add( chooseAvatarActionLink );
	avatarActionPanel.add( new ActionLinkPanel( ServerSideAccessManager.getUploadImageURL(), "",
												ServerSideAccessManager.getUploadImageURL(), "",
												titlesI18N.uploadLinkTitle(), avatarUploadAction, true, true ) );
	avatarActionPanel.add( new ActionLinkPanel( ServerSideAccessManager.getDeleteImageURL(), "",
												ServerSideAccessManager.getDeleteImageURL(), "",
												titlesI18N.deleteLinkTitle(), avatarDeleteAction, true, true ) );
	
	HorizontalPanel avatarPanel = new HorizontalPanel();
	avatarPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	avatarPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	avatarPanel.add( avatarImage );
	avatarPanel.add( new HTML("&nbsp;") );
	avatarPanel.add( avatarActionPanel );
	addToGrid( FIRST_COLUMN_INDEX, avatarPanel, false, false );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:29,代码来源:UserProfileDialogUI.java


注:本文中的com.google.gwt.user.client.ui.HorizontalPanel.setVerticalAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。