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


Java HorizontalPanel.setHorizontalAlignment方法代码示例

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


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

示例1: initializew3wPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void initializew3wPanel() {
	w3wPanel = new HorizontalPanel();
	w3wPanel.setSpacing(5);
	w3wPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
	StyleInjector.inject(".w3wPanel { " + "background: #E0ECF8;"
			+ "border-radius: 5px 10px;" + "opacity: 0.8}");
	w3wPanel.setStyleName("w3wPanel");
	w3wPanel.setWidth("415px");

	wordsLabel = new Label();
	w3wAnchor = new AnchorBuilder().setHref("https://what3words.com/")
			.setText(UIMessages.INSTANCE.what3Words())
			.setTitle("https://what3words.com/").build();
	w3wAnchor.getElement().getStyle().setColor("#FF0000");
	w3wAnchor.setVisible(false);
	w3wPanel.add(w3wAnchor);
	w3wPanel.add(wordsLabel);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:BasicToolBar.java

示例2: 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

示例3: Toolbar

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Initializes and assembles all commands into buttons in the toolbar.
 */
public Toolbar() {
  buttonMap = new HashMap<String, TextButton>();
  dropDownButtonMap = new HashMap<String, DropDownButton>();

  leftButtons = new HorizontalPanel();
  leftButtons.setSpacing(4);

  rightButtons = new HorizontalPanel();
  rightButtons.setSpacing(4);
  rightButtons.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);

  HorizontalPanel toolbar = new HorizontalPanel();
  toolbar.add(leftButtons);  // this nesting keeps buttons left aligned
  toolbar.add(rightButtons);
  toolbar.setCellHorizontalAlignment(rightButtons, HorizontalPanel.ALIGN_RIGHT);
  toolbar.setWidth("100%");
  toolbar.setStylePrimaryName("ya-Toolbar");

  initWidget(toolbar);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:24,代码来源:Toolbar.java

示例4: GalleryAppBox

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Creates new Gallery app box.
 */
private GalleryAppBox() {
  gContainer = new FlowPanel();
  final HorizontalPanel container = new HorizontalPanel();
  container.setWidth("100%");
  container.setSpacing(0);
  container.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
  HorizontalPanel panel = new HorizontalPanel();
  Image image = new Image();
  image.setResource(Ode.getImageBundle().waitingIcon());
  panel.add(image);
  Label label = new Label();
  label.setText(Ode.getMessages().defaultRpcMessage());
  panel.add(label);
  gContainer.add(panel);
  this.add(gContainer);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:20,代码来源:GalleryAppBox.java

示例5: StatusPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
   * Initializes and assembles all UI elements shown in the status panel.
   */
  public StatusPanel() {
    HorizontalPanel hpanel = new HorizontalPanel();
    hpanel.setWidth("100%");
    hpanel.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
    String tosUrl = Ode.getInstance().getSystemConfig().getTosUrl();
    if (!Strings.isNullOrEmpty(tosUrl)) {
      String appInventorFooter =
          "<a href=\"" + tosUrl + "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";
      hpanel.add(new HTML(appInventorFooter));
    }

    // This shows the git version and the date of the build
//    String version = GitBuildId.getVersion();
//    String date = GitBuildId.getDate();
//    if (version != null && date != null) {
//      Label buildId = new Label(MESSAGES.gitBuildId(date, version));
//      hpanel.add(buildId);
//      hpanel.setCellHorizontalAlignment(buildId, HorizontalPanel.ALIGN_RIGHT);
//    }

    initWidget(hpanel);
    setStyleName("ode-StatusPanel");
  }
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:27,代码来源:StatusPanel.java

示例6: addForumMessageSharingLinks

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Allows to add a horizontal panel with various sharing links to the forum messages.
 * All of the forum messages get a web link to the post.
 * THe regular posts get also sharing links for Twitter, Mail.ru and Facebook.
 * @param panel the panel to add the panel to.
 */
private void addForumMessageSharingLinks( HorizontalPanel panel ) {
	final String forumMessageURL = getForumMessageURL( messageData );
	final String forumMessageTitle = messageData.messageTitle;
	
	HorizontalPanel linksPanel = new HorizontalPanel();
	linksPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
	linksPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
	//Add the post link
	linksPanel.add( new ShareMessageLinkURL( forumMessageURL, forumMessageTitle, i18nTitles.forumPostLinkTitle() ) );
	
	//If it is a regular forum post then add the sharing links
	if( ! messageData.isForumSectionMessage() && ! messageData.isForumTopicMessage() ) {
		linksPanel.add( new HTML("&nbsp;") );
		linksPanel.add( new ShareMessageTwitterURL( forumMessageURL, forumMessageTitle, i18nTitles.shareInTwitterLinkTitle() ) );
		linksPanel.add( new HTML("&nbsp;") );
		linksPanel.add( new ShareMessageVKontakteURL( forumMessageURL, forumMessageTitle, i18nTitles.shareInVKontakteLinkTitle() ) );
		linksPanel.add( new HTML("&nbsp;") );
		linksPanel.add( new ShareMessageMailRuURL( forumMessageURL, forumMessageTitle, i18nTitles.shareInMyWorldLinkTitle() ) );
		linksPanel.add( new HTML("&nbsp;") );
		linksPanel.add( new ShareMessageFacebookURL( forumMessageURL, forumMessageTitle, i18nTitles.shareInInFacebookLinkTitle() ) );
	}
	
	panel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
	panel.add( linksPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:32,代码来源:ForumMessageWidget.java

示例7: 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(":&nbsp;") );
	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

示例8: ButtonBar

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public ButtonBar() {
    HorizontalPanel hp = new HorizontalPanel();
    hp.setWidth("100%");
    hp.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
    left = new HorizontalPanel();
    left.setSpacing(3);
    left.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
    left.setWidth("100%");

    right = new HorizontalPanel();
    right.setSpacing(3);
    right.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    right.setWidth("100%");
    Label spacerRight = new Label();
    right.add(spacerRight);
    right.setCellWidth(spacerRight, "100%");

    hic.setPixelSize(16,16);
    hp.add(left);
    hp.add(right);
    hp.setCellWidth(right, "100%");
    hp.add(GwtUtil.getFiller(10,1));
    hp.add(hic);

    initWidget(hp);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:27,代码来源:Form.java

示例9: populateDialog

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

示例10: addViewUserProfileLink

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

示例11: addCreateFilterButton

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void addCreateFilterButton(final Command addfilterCommand) {
    HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.setWidth("100%");
    buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

    Button createFilterButton = new Button();
    createFilterButton.setText(CommonConstants.INSTANCE.Add_New_Filter());

    createFilterButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            getFormValues(filterControlGroups);
            if (validateForm()) {
                addfilterCommand.execute();
                refreshGrid();
                cleanFormValues(filterControlGroups);
                tabAdd.showTab();
            }
        }
    });
    buttonPanel.add(createFilterButton);
    horizontalForm.add(buttonPanel);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:NewFilterPopup.java

示例12: createUrlToShareAnchor

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private Widget createUrlToShareAnchor() {
	urlPanel = new HorizontalPanel();
	urlPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
	urlPanel.setSpacing(1);
	urlToShareAnchor = new AnchorBuilder().build();
	urlPanel.add(urlToShareAnchor);
	Image img = new Image(ImageProvider.INSTANCE.externalLink16());
	urlPanel.add(img);
	urlPanel.setVisible(false);
	return urlPanel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:12,代码来源:OpenProjectDialog.java

示例13: 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

示例14: ScreenIndicator

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public ScreenIndicator(List<Integer> screenIds) {
	super(new HorizontalPanel(), CLASS_NAME);
	HorizontalPanel container = (HorizontalPanel)getWidget();
	DOM.setIntStyleAttribute(getElement(), "zIndex", 1000 );
	DOM.setStyleAttribute(getElement(), "overflow", "hidden");
	container.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
	this.screenIds = screenIds;
	screenIndicators = new ArrayList<Widget>();
	
	if (screenIds != null) {
		width = INDICATOR_SIZE * ((screenIds.size()*2) - 1);
		setWidth(width + "px");
		setHeight(INDICATOR_SIZE + "px");
		height = INDICATOR_SIZE;
		
		// Add a simple div for each screen
		for (int i=0; i<screenIds.size(); i++) {
			int cellWidth = INDICATOR_SIZE;
			//cellWidth = i != screenIds.size()-1 ? cellWidth + INDICATOR_SPACING : cellWidth;
			Widget screenIndicator = new SimplePanel();
			screenIndicator.setWidth(INDICATOR_SIZE + "px");
			screenIndicator.setHeight(INDICATOR_SIZE + "px");
			screenIndicator.setStylePrimaryName(ITEM_CLASS_NAME);
			screenIndicators.add(screenIndicator);
			container.add(screenIndicator);
			container.setCellWidth(screenIndicator, cellWidth + "px");
			
			if (i<screenIds.size()-1) {
				// Add a spacer
				Widget spacer = new SimplePanel();
				spacer.setWidth(INDICATOR_SIZE + "px");
				spacer.setHeight(INDICATOR_SIZE + "px");
				spacer.setStylePrimaryName(SPACER_CLASS_NAME);
				container.add(spacer);
				container.setCellWidth(spacer, cellWidth + "px");
			}
		}
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:40,代码来源:ScreenIndicator.java

示例15: ThreeLevelSiteMenu

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * The leveled site menu. It has the user status manager
 * that has to be instantiated prior to instantiating this class
 */
public ThreeLevelSiteMenu( ) {
	//Position the choice of locale and the menu one above another
	final VerticalPanel menuLevelsPanel = new VerticalPanel();
	menuLevelsPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
	
	//Add the user statistics menu level
	final HorizontalPanel topLevel = new HorizontalPanel();
	topLevel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	topLevel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
	SiteInfoWidget statisticsWidget = new SiteInfoWidget();
	statisticsWidget.startUpdates(); //Start the updates
	topLevel.add( statisticsWidget ); //Add the user statistics widget
	topLevel.add( InterfaceUtils.getLocaleSelectionPanel() ); //Add the locale selector
	menuLevelsPanel.add( topLevel );
	
	//Add the user info menu level
	final HorizontalPanel userAndLocalePanel = new HorizontalPanel();
	userAndLocalePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	userAndLocalePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
	userAndLocalePanel.add( userStatusPanel );							//Add the user status panel
	userAndLocalePanel.add( userTreasurePanel );						//The user treasure wallet panel
	userAndLocalePanel.add( alertWidgetPanel );      					//Add the sound notifier button panel
	userAndLocalePanel.add( helpItemPanel );							//Add the help link panel
	menuLevelsPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
	menuLevelsPanel.add( userAndLocalePanel );
	
	//Add the main menu level
	theMainMenuUI.setLoggedOutMenu();
	menuLevelsPanel.add( theMainMenuUI );
	menuLevelsPanel.setWidth("100%");
	
	//Initialize the composite
	initWidget( menuLevelsPanel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:39,代码来源:ThreeLevelSiteMenu.java


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