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


Java HasVerticalAlignment类代码示例

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


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

示例1: init

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
public void init() {

		uploader.setButtonImageURL("img/uploadimg.png").setButtonWidth(32)
		.setButtonHeight(32)
		.setButtonCursor(Uploader.Cursor.HAND);

		horizontalPanel.setStyleName("bda-fileupload-bottom-hpanel");
		horizontalPanel.setSpacing(10);
		horizontalPanel.add(uploader);
		if (Uploader.isAjaxUploadWithProgressEventsSupported()) {

			dropFilesLabel.getElement().getStyle().setCursor(Cursor.POINTER);
			dropFilesLabel.setSize("32px", "32px");
			dropFilesLabel.setTitle("File dragable upload area");
		}
		horizontalPanel.add(dropFilesLabel);
		horizontalPanel.add(progressBarPanel);
		horizontalPanel.setCellVerticalAlignment(progressBarPanel,
				HasVerticalAlignment.ALIGN_MIDDLE);
		this.add(horizontalPanel);
		initFacet();
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:23,代码来源:FileUploader.java

示例2: IconCell

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
public IconCell(ImageResource resource, final String title, String text) {
	super(null);
	iIcon = new Image(resource);
	iIcon.setTitle(title);
	iIcon.setAltText(title);
	if (text != null && !text.isEmpty()) {
		iLabel = new HTML(text, false);
		iPanel = new HorizontalPanel();
		iPanel.setStyleName("icon");
		iPanel.add(iIcon);
		iPanel.add(iLabel);
		iIcon.getElement().getStyle().setPaddingRight(3, Unit.PX);
		iPanel.setCellVerticalAlignment(iIcon, HasVerticalAlignment.ALIGN_MIDDLE);
	}
	iIcon.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			event.stopPropagation();
			UniTimeConfirmationDialog.info(title);
		}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:23,代码来源:WebTable.java

示例3: add

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
public IconsCell add(ImageResource resource, final String title) {
	if (resource == null) return this;
	Image icon = new Image(resource);
	icon.setTitle(title);
	icon.setAltText(title);
	if (iPanel.getWidgetCount() > 0)
		icon.getElement().getStyle().setPaddingLeft(3, Unit.PX);
	iPanel.add(icon);
	iPanel.setCellVerticalAlignment(icon, HasVerticalAlignment.ALIGN_MIDDLE);
	if (title != null && !title.isEmpty()) {
		icon.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				event.stopPropagation();
				UniTimeConfirmationDialog.info(title);
			}
		});
	}
	return this;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:21,代码来源:WebTable.java

示例4: createSeparatorPanel

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的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

示例5: createColumnList

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
private ColumnModel<LayerDef> createColumnList(LayerDefProperties props, 
		RowExpander<LayerDef> rowExpander) {
	
	rowExpander.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	rowExpander.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	
	ColumnConfig<LayerDef, String> nameColumn = new ColumnConfig<LayerDef, String>(
			props.name(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UIMessages.INSTANCE.layerManagerToolText() + "</b>"));
	nameColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);		
	
	ColumnConfig<LayerDef, String> typeColumn = new ColumnConfig<LayerDef, String>(
			props.type(), 75, UICatalogMessages.INSTANCE.type());
	typeColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	typeColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);		
	
	ColumnConfig<LayerDef, ImageResource> iconColumn = new ColumnConfig<LayerDef, ImageResource>(
			props.icon(), 32, "");
	iconColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	iconColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	iconColumn.setCell(new ImageResourceCell() {
		@Override
		public void render(Context context, ImageResource value, SafeHtmlBuilder sb) {
			super.render(context, value, sb);
		}
	});
			
	List<ColumnConfig<LayerDef, ?>> columns = new ArrayList<ColumnConfig<LayerDef, ?>>();
	columns.add(rowExpander);
	columns.add(iconColumn);		
	columns.add(nameColumn);
	columns.add(typeColumn);		
	
	return new ColumnModel<LayerDef>(columns);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:36,代码来源:LayerCatalogDialog.java

示例6: CancelButton

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
public CancelButton(String panel_id) {
    final String id = panel_id;
    cancel.setWidth("75px");
    cancel.addStyleDependentName("SMALLER");
    cancel.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent click) {
            eventBus.fireEvent(new CancelEvent(id));
        }
    });
    CellFormatter f = interior.getCellFormatter();
    f.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
    f.setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP);
    f.setVerticalAlignment(2, 0, HasVerticalAlignment.ALIGN_TOP);

    interior.setWidget(0, 0, batch);
    interior.setWidget(1, 0, message);
    interior.setWidget(2, 0, cancel);
    
    sizePanel.add(interior);
    
    initWidget(sizePanel);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:24,代码来源:CancelButton.java

示例7: setTopLeftAlignment

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
/**
 * @param flexTable
 * 
 */
void setTopLeftAlignment(FlexTable flexTable) {
    if (flexTable != null) {
        int rows = flexTable.getRowCount();
        for (int row = 0; row < rows; row++) {
            int cellCount = flexTable.getCellCount(row);
            for (int col = 0; col < cellCount; col++) {
                if (flexTable.isCellPresent(row, col)) {
                    flexTable.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_LEFT);
                    flexTable.getCellFormatter().setVerticalAlignment(row, col, HasVerticalAlignment.ALIGN_TOP);
                    Widget widget = flexTable.getWidget(row, col);
                    if ((widget != null) && (widget.getClass().getName().equals("FlexTable"))) {
                        try {
                            setTopLeftAlignment((FlexTable) widget);
                        } catch (Exception e) {
                           // e.printStackTrace();
                        }
                    }
                }
            }
        }
    }
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:27,代码来源:BaseUI.java

示例8: handleDoubleClick

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
protected void handleDoubleClick(TableData.Row row) {
    VerticalPanel vp = new VerticalPanel();
    final Image previewImage = new Image(getFullSizeUrl(row));
    final HTML caption = new HTML(getPopUpCaption(row));
    String title = getThumbnailDesc(row).replace("<em>", "").replace("</em>", "");

    caption.setWidth("320px");

    previewImage.addLoadHandler(new LoadHandler() {
        public void onLoad(LoadEvent ev) {
            caption.setWidth(previewImage.getWidth() + "px");
        }
    });
    GwtUtil.setStyle(vp, "margin", "8px");

    vp.setCellHorizontalAlignment(previewImage, HasHorizontalAlignment.ALIGN_CENTER);
    vp.setCellVerticalAlignment(previewImage, HasVerticalAlignment.ALIGN_MIDDLE);
    vp.add(previewImage);
    vp.add(caption);

    PopupPane popupPane = new PopupPane(title, vp, PopupType.STANDARD, false, false);

    popupPane.show();
}
 
开发者ID:lsst,项目名称:firefly,代码行数:25,代码来源:BasicImageGrid.java

示例9: addNewFieldValuePair

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
protected void addNewFieldValuePair( final FlowPanel content, final String fieldName,
		   						   final Date dateValue, final boolean addEndCommaDelimiter ) {
	final Label fieldLabel = new Label( fieldName );
	fieldLabel.setStyleName( CommonResourcesContainer.USER_DIALOG_REGULAR_FIELD_STYLE );
	final DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat( PredefinedFormat.DATE_TIME_SHORT );
	final Label dateTimeLabel = new Label( dateTimeFormat.format( dateValue ) );
	dateTimeLabel.setStyleName( CommonResourcesContainer.CONST_FIELD_VALUE_DEFAULT_STYLE_NAME );
	final int width = ( dateTimeLabel.getOffsetWidth() == 0 ? DEFAULT_PROGRESS_BAR_WIDTH_PIXELS : dateTimeLabel.getOffsetWidth() );
	DateOldProgressBarUI progressBarUI= new DateOldProgressBarUI( width, DEFAULT_PROGRESS_BAR_HEIGHT_PIXELS, dateValue );
	
	//If there are replies to this message
	VerticalPanel dateTimePanel = new VerticalPanel();
	dateTimePanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	dateTimePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
	dateTimePanel.add( dateTimeLabel );
	dateTimePanel.add( progressBarUI );
	
	//Add the widgets to the panel
	addNewFieldValuePair( content, fieldLabel, dateTimePanel, addEndCommaDelimiter );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:21,代码来源:ForumMessageWidget.java

示例10: populate

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
private void populate() {
	//Add the scroll panel
	elementPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	elementPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
	scrollPanel.add( elementPanel );
	
	//Initialize the widget
	scrollPanel.setWidth("100%");
	scrollPanel.setStyleName( CommonResourcesContainer.SCROLLABLE_SIMPLE_PANEL );
	scrollPanel.addStyleName( CommonResourcesContainer.STACK_NAVIGATOR_SCROLL_PANEL_ELEMENT_STYLE );
	
	//Set the simple panel
	setComponentWidget( scrollPanel );
	
	//Set the height of the panel to be 40 pixels
	addDecPanelStyle(CommonResourcesContainer.STACK_NAVIGATOR_DEC_PANEL_ELEMENT_STYLE);
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:18,代码来源:MessagesStackNavigator.java

示例11: getYoutubeEmbeddedFlashObject

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
/**
 * Allows to get a flash object for the youtube video url
 * @param yutubeMediaUrl the youtube video url
 * @param youtubeURL the original youtube link url
 * @param isInitiallyBlocked is true if the flash should be initially blocked
 * @return the corresponding flash object widget
 */
public static Widget getYoutubeEmbeddedFlashObject( final String yutubeMediaUrl, final String youtubeURL, final boolean isInitiallyBlocked ) {
	//Construct the youtube embedded object descriptor
	FlashEmbeddedObject flashObject = new FlashEmbeddedObject(  null );
	flashObject.setMovieUrl( yutubeMediaUrl );
	flashObject.completeEmbedFlash();
	
	//Make the widget out of a wrapped youtube video plus the video URL.
	VerticalPanel mainPanel = new VerticalPanel();
	mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	mainPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	mainPanel.add( new FlashObjectWrapperUI( flashObject.toString(), isInitiallyBlocked, null ) );
	mainPanel.add( new URLWidget( youtubeURL, false, false ) );

	return mainPanel;
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:23,代码来源:YoutubeLinksHandlerUtils.java

示例12: createColumnList

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
protected ColumnModel<VectorFeature> createColumnList(List<VectorFeature> features) {
	List<ColumnConfig<VectorFeature, ?>> columns = new ArrayList<ColumnConfig<VectorFeature, ?>>();
	
	if(features != null && features.size() > 0) {
		VectorFeature feature = features.get(0);

		if(feature.getAttributes() != null) {
			for(String attributeName : feature.getAttributes().getAttributeNames()) {	
				AttributeValueProvider attributeProvider = new AttributeValueProvider(attributeName);
				
				ColumnConfig<VectorFeature, String> attributeColumn = new ColumnConfig<VectorFeature, String>(
						attributeProvider, 100, attributeName);
				attributeColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
				if(isEnableCellRender()) {
					attributeColumn.setCell(new FeatureGridCellRenderer());
				}					
				
				columns.add(attributeColumn);
			}
		}					
	}
		
	return new ColumnModel<VectorFeature>(columns);
}
 
开发者ID:geowe,项目名称:geowe-core,代码行数:25,代码来源:FeatureGrid.java

示例13: createWidget

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
@Override
protected Widget createWidget() {
	HorizontalPanel mainPanel = new HorizontalPanel();

	save.setValue( true );

	mainPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	mainPanel.add( new Label( "Products :" ) );
	mainPanel.add( products );
	mainPanel.add( showProduct );
	mainPanel.add( new Label( "Deals :" ) );
	mainPanel.add( deals );
	mainPanel.add( showDeal );
	mainPanel.add( save );

	mainPanel.setStyleName( "bar" );

	return mainPanel;
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:20,代码来源:TopBarView.java

示例14: populateDialog

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
/**
 * Fills the main grid data
 */
protected void populateDialog(){
	addMainDataFields();
	addImagesDataGrid();
	addOptionalDataFields();
	addAboutMyselfPanel();
	//Add send message and is friend grid if we are not browsing ourselves
	if( SiteManager.getUserID() != userID ) { 
		addSendMsgAddRemoveFriendActionFields();
	} else {
		//Add the progress bar for viewing ourselve's profile
		addNewGrid( 1, 1, false, "", false);
		HorizontalPanel progressBarPanel = new HorizontalPanel();
		progressBarPanel.setWidth("100%");
		progressBarPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
		progressBarPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
		progressBarPanel.add( progressBarUI );
		addToGrid( FIRST_COLUMN_INDEX, progressBarPanel, false , false );
	}
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:23,代码来源:ViewUserProfileDialogUI.java

示例15: addViewUserProfileLink

import com.google.gwt.user.client.ui.HasVerticalAlignment; //导入依赖的package包/类
/**
 * Allows to add a small panel containing the "View Full Profile" link,
 * this is made for those who are not smart enough to click on the login
 * name in this dialog again, to get to a full profile view  
 */
private void addViewUserProfileLink() {
	//Initialize the link
	Label userProfileLink = new Label(I18NManager.getTitles().viewFullUserProfileLinkTitle());
	userProfileLink.setWordWrap(false);
	userProfileLink.setStyleName( CommonResourcesContainer.DIALOG_LINK_RED_STYLE );
	userProfileLink.addClickHandler( this.userProfileShowHandler );
	
	//Initialize the panel
	HorizontalPanel userProfileLinkPanel = new HorizontalPanel();
	userProfileLinkPanel.setStyleName( CommonResourcesContainer.VIEW_USER_PROFILE_LINK_PANEL_STYLE );
	userProfileLinkPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	userProfileLinkPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	userProfileLinkPanel.add( userProfileLink );
	
	//Add the profile view link panel to the main panel
	mainInfoVPanel.add( userProfileLinkPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:23,代码来源:ShortUserInfoPopupPanel.java


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