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


Java HorizontalPanel.setStyleName方法代码示例

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


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

示例1: IconCell

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

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

示例3: create

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
/**
 * Creates dialog box.
 *
 * @param popup - UniversalPopup on which the dialog is based
 * @param title - title placed in the title bar
 * @param innerWidget - the inner widget of the dialog
 * @param dialogButtons - buttons
 */
public static void create(UniversalPopup popup, String title, Widget innerWidget,
    DialogButton[] dialogButtons) {
  // Title
  popup.getTitleBar().setTitleText(title);

  VerticalPanel contents = new VerticalPanel();
  popup.add(contents);

  // Message
  contents.add(innerWidget);

  // Buttons
  HorizontalPanel buttonPanel = new HorizontalPanel();
  for (DialogButton dialogButton : dialogButtons) {
    Button button = new Button(dialogButton.getTitle());
    button.setStyleName(Dialog.getCss().dialogButton());
    buttonPanel.add(button);
    dialogButton.link(button);
  }
  contents.add(buttonPanel);
  buttonPanel.setStyleName(Dialog.getCss().dialogButtonPanel());
  contents.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:32,代码来源:DialogBox.java

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

示例5: FooterScreen

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public FooterScreen() {
	HorizontalPanel panel = new HorizontalPanel();
	HTML label = new HTML("OneCMDB 1.4.0 Beta &copy; Lokomo Systems <<a href='javascript:;'>about</a>>");
	label.setTitle("Show about screen");
	label.setStyleName("onecmdb-footer-label");
	panel.add(label);
	panel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_RIGHT);
	panel.setStyleName("onecmdb-footer");
	label.addClickListener(new ClickListener() {

		public void onClick(Widget sender) {
			getBaseEntryScreen().showScreen(OneCMDBApplication.SHOW_STATIC_CONTENT, 
					"about.html", 
					new Long(0));
		}
		
	});
	initWidget(panel);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:FooterScreen.java

示例6: loadLayoutStructure

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void loadLayoutStructure() {
	
	page = new VerticalPanel();
	mainView = new HorizontalPanel();
	leftPanel = new VerticalPanel();
	
	mainView.setStyleName("mainViewLayer");
	mainView.setWidth("100%");
	leftPanel.setStyleName("leftPanelLayer");
	leftPanel.setWidth("700px");
	page.setWidth("100%");
	
	Label title = new Label("Import configuration");
	title.setStyleName("title");
	
	//Main layout
	page.add(title);
	page.add(mainView);
	
	//Left layout
	mainView.add(leftPanel);
	grid = new Grid(1,2);
	grid.setCellPadding(5);
	leftPanel.add(grid);
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:26,代码来源:ConfigImportModule.java

示例7: appendChilds

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				module.setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:23,代码来源:EntitiesListBox.java

示例8: generateLegend

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
protected void generateLegend(int i, String ras) {
	String c = "col" + i;
	HTMLPanel html = new HTMLPanel("<span id='" + c + "'></span>");
	SimplePanel p = new SimplePanel();
	p.setSize("20px", "20px");
	p.getElement().getStyle().setBackgroundColor(colorsArray[i]);
	p.setStyleName("colorBox");
	HorizontalPanel hp = new HorizontalPanel();
	hp.setStyleName("margin-bottom");
	hp.add(p);
	String htmlString = "<b>" + ras + "</b>";
	HTMLPanel htm = new HTMLPanel( htmlString );
	hp.add(htm);
	html.add(hp, c);
	legend.add(html);
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:17,代码来源:ComparisonPanel.java

示例9: generateTree

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void generateTree(TreeWidget c, JSONValue entity) {
	nextEntityName = entity.isObject().get("entity").isString().stringValue();
	Anchor a = new Anchor(nextEntityName);
	a.setWidth("100%");
	a.setStyleName("font");
	a.addClickHandler(new ClickHandler() {
		String name = nextEntityName;
		@Override
		public void onClick(ClickEvent event) {
			setSelectedEntity(name);
		}
	});
	HorizontalPanel cPanel = new HorizontalPanel();
	cPanel.setStyleName("tree");
	cPanel.setWidth("100%");
	cPanel.add(a);
	TreeWidget cc = new TreeWidget(cPanel);
	c.addChild(cc);
	results.put(nextEntityName, entity.isObject().get("results").isArray());
	entities.add(nextEntityName);
	for (int i = 0; i < entity.isObject().get("children").isArray().size(); ++i) {
		generateTree(cc, entity.isObject().get("children").isArray().get(i));
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:25,代码来源:RiskAnalysisResults.java

示例10: appendChilds

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:23,代码来源:RiskAnalysisWizard.java

示例11: onInitUI

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
@Override
protected void onInitUI() {
  super.onInitUI();
  setPageTitle(AdminConstants.I.groupListTitle());
  initPageHeader();

  prev = PagingHyperlink.createPrev();
  prev.setVisible(false);

  next = PagingHyperlink.createNext();
  next.setVisible(false);

  groups = new GroupTable(PageLinks.ADMIN_GROUPS);
  add(groups);

  final HorizontalPanel buttons = new HorizontalPanel();
  buttons.setStyleName(Gerrit.RESOURCES.css().changeTablePrevNextLinks());
  buttons.add(prev);
  buttons.add(next);
  add(buttons);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:22,代码来源:GroupListScreen.java

示例12: createWidget

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

示例13: onModuleLoad

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public void onModuleLoad() {
	all.setStyleName("all");
	RootPanel.get().add(all);
	HorizontalPanel footer = new HorizontalPanel();
	footer.setStyleName("footer2");
	RootPanel.get().add(footer);
	loadShowCompany();
}
 
开发者ID:amritbhat786,项目名称:DocIT,代码行数:9,代码来源:Gwt.java

示例14: JobDescPopupPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public JobDescPopupPanel(String title) {

		Label label = new Label(title);
		label.setStyleName("bda-newjob-head");
		verticalPanel.add(label);
		verticalPanel.add(createGrid());
		HorizontalPanel hpanel = new HorizontalPanel();

		hpanel.setStyleName("bda-newjob-hpanel");
		verticalPanel.add(errorLabel);
		Button cancelBtn = new Button(Constants.studioUIMsg.cancel());
		cancelBtn.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {
				JobDescPopupPanel.this.hide();
			}

		});

		hpanel.add(submitBtn);
		hpanel.add(cancelBtn);
		submitBtn.removeStyleName("gwt-Button");
		cancelBtn.removeStyleName("gwt-Button");
		submitBtn.addStyleName("button-style");
		cancelBtn.addStyleName("button-style");
		errorLabel.setStyleName("error-label");
		verticalPanel.add(hpanel);
		verticalPanel.addStyleName("bda-newjob");
		this.setCloseEnable(false);
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:32,代码来源:JobDescPopupPanel.java

示例15: InstructorCell

import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
public InstructorCell(ArrayList<String> names, ArrayList<String> emails, String separator) {
	super(null, separator);
	if (names != null && !names.isEmpty()) {
		separator = separator.replace(" ", "&nbsp;");
		for (int i = 0; i < names.size(); i++) {
			String text = names.get(i) + (i + 1 < names.size() ? separator : "");
			String email = (emails != null && i < emails.size() ? emails.get(i) : null);
			if (email != null && !email.isEmpty()) {
				iText += text;
				HorizontalPanel p = new HorizontalPanel();
				p.setStyleName("instructor");
				Anchor a = new Anchor();
				a.setHref("mailto:" + email);
				a.setHTML(new Image(RESOURCES.email()).getElement().getString());
				a.setTitle(MESSAGES.sendEmail(names.get(i)));
				a.setStyleName("unitime-SimpleLink");
				a.addClickHandler(new ClickHandler() {
					public void onClick(ClickEvent event) {
						event.stopPropagation();
					}
				});
				p.add(a);
				p.setCellVerticalAlignment(a, HasVerticalAlignment.ALIGN_MIDDLE);
				HTML h = new HTML(text, false);
				h.getElement().getStyle().setMarginLeft(2, Unit.PX);
				p.add(h);
				iPanel.add(p);
				iContent.add(h);
			} else
				add(text);
		}
	} else {
		add("&nbsp;");
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:36,代码来源:WebTable.java


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