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


Java HTMLPanel类代码示例

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


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

示例1: CardUserInfo

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
public CardUserInfo(UserPresenter presenter) {
	this.presenter = presenter;
	addButton(edituser);
	if (presenter.getZuser().getUid().equals(UserUtil.admin)) {
		addButton(checkuser);
	}
	FlowLayoutContainer centerContainer=new FlowLayoutContainer();
	VerticalLayoutContainer p = new VerticalLayoutContainer();
	luid=new Label();
	lname=new Label();
	luserType=new Label();
	leffective=new Label();
	lemail=new Label("");
	phoneContent=new HTMLPanel("");
	descriptionContent=new HTMLPanel("");
	p.add(new FieldLabel(luid, "用户账号"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(lname,"用户姓名"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(luserType,"用户状态"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(leffective,"用户类型"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(lemail, "邮箱地址"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(phoneContent, "手机号码"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	p.add(new FieldLabel(descriptionContent, "描述"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
	
	centerContainer.add(p);
	setCenter(centerContainer);
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:27,代码来源:CardUserInfo.java

示例2: View

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
View(Window.Resources res, boolean showBottomPanel) {
  this.res = res;
  this.css = res.windowCss();
  windowWidth = com.google.gwt.user.client.Window.getClientWidth();
  clientLeft = Document.get().getBodyOffsetLeft();
  clientTop = Document.get().getBodyOffsetTop();
  initWidget(uiBinder.createAndBindUi(this));
  footer = new HTMLPanel("");
  if (showBottomPanel) {
    footer.setStyleName(res.windowCss().footer());
    contentContainer.add(footer);
  }
  handleEvents();

  FocusPanel dummyFocusElement = new FocusPanel();
  dummyFocusElement.setTabIndex(0);
  dummyFocusElement.addFocusHandler(
      new FocusHandler() {
        @Override
        public void onFocus(FocusEvent event) {
          setFocus();
        }
      });
  contentContainer.add(dummyFocusElement);
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:View.java

示例3: generateLegend

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

示例4: getPublishPanel

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
private static HTMLPanel getPublishPanel() {
    HTMLPanel publishPanel = new HTMLPanel(GerritCiPlugin.publishJobPanel.toString());
    TextBox publishCommand = new TextBox();
    publishCommand.setName("publishCommand");
    publishCommand.setText("./scripts/publish.sh");
    TextBox publishBranchRegex = new TextBox();
    publishBranchRegex.setName("publishBranchRegex");
    publishBranchRegex.setText("refs/heads/(develop|master)");
    TextBox jobType = new TextBox();
    jobType.setText("publish");
    jobType.setName("jobType");
    jobType.setVisible(false);
    publishPanel.add(jobType);
    publishPanel.addAndReplaceElement(publishCommand, "publishCommand");
    publishPanel.addAndReplaceElement(publishBranchRegex, "publishBranchRegex");
    addCommonFields(publishPanel);
    return publishPanel;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:19,代码来源:JobPanels.java

示例5: getVerifyPanel

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
private static HTMLPanel getVerifyPanel() {
    HTMLPanel verifyPanel = new HTMLPanel(GerritCiPlugin.verifyJobPanel.toString());
    TextBox verifyCommand = new TextBox();
    verifyCommand.setName("verifyCommand");
    verifyCommand.setText("./scripts/verify.sh");
    TextBox verifyBranchRegex = new TextBox();
    verifyBranchRegex.setName("verifyBranchRegex");
    verifyBranchRegex.setText(".*");
    TextBox jobType = new TextBox();
    jobType.setText("verify");
    jobType.setName("jobType");
    jobType.setVisible(false);
    verifyPanel.add(jobType);
    verifyPanel.addAndReplaceElement(verifyCommand, "verifyCommand");
    verifyPanel.addAndReplaceElement(verifyBranchRegex, "verifyBranchRegex");
    addCommonFields(verifyPanel);
    return verifyPanel;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:19,代码来源:JobPanels.java

示例6: createJob

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
private HTMLPanel createJob(String jobType) {
    final HTMLPanel p = JobPanels.createJobPanel(jobType);
    TextBox jobName = new TextBox();
    jobName.setName("jobName");
    jobName.setText(jobType + "_" + projectName + "_" + Random.nextInt());
    jobName.setVisible(false);
    p.add(jobName);
    final Button deleteButton = new Button("delete");
    deleteButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            deletePanel(p);
        }
    });
    p.addAndReplaceElement(deleteButton, "delete");
    if(jobType.equals("cron")) {
        addCronToggleButton(p, deleteButton);
    }
    activePanels.add(p);
    return p;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:22,代码来源:ProjectConfigurationScreen.java

示例7: addImageWithLine

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
/**
 * @param line
 */
public void addImageWithLine (String line) {
	if (line.length() > 0) {
		ConfigLine config = parseConfigLine(line);

		if (config.url != null && config.url.length() > 0) {
			Image image = new Image(config.url);

			if (config.name != null) {
				image.setTitle(config.name);
				image.setAltText(config.caption);
			}

			((HTMLPanel) this.getWidget()).add(image);

			if (config.caption != null) {
				((HTMLPanel) this.getWidget())
						.add(new HTMLPanel(SafeHtmlUtils.fromTrustedString(
								PostHelper.makeMarkup(config.caption))));
			}
		}
	}
}
 
开发者ID:billy1380,项目名称:blogwt,代码行数:26,代码来源:GalleryPart.java

示例8: emit

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public void emit (StringBuilder out, final List<String> lines,
		final Map<String, String> params) {

	final String id = HTMLPanel.createUniqueId();
	out.append("<div id=\"");
	out.append(id);
	out.append("\"> Loading form...</div>");

	Scheduler.get().scheduleDeferred( () -> {
		if (manager != null) {
			manager.fireEvent(new PluginContentReadyEvent(FormPlugin.this,
					lines, params, id, "None"));
		}
	});
}
 
开发者ID:billy1380,项目名称:blogwt,代码行数:17,代码来源:FormPlugin.java

示例9: emit

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public void emit (StringBuilder out, final List<String> lines,
		final Map<String, String> params) {
	final String id = HTMLPanel.createUniqueId();
	out.append("<div id=\"");
	out.append(id);
	out.append("\"> Loading gallery...</div>");

	Scheduler.get().scheduleDeferred(new ScheduledCommand() {

		@Override
		public void execute () {
			if (manager != null) {
				manager.fireEvent(new PluginContentReadyEvent(
						GalleryPlugin.this, lines, params, id, "None"));
			}
		}
	});
}
 
开发者ID:billy1380,项目名称:blogwt,代码行数:20,代码来源:GalleryPlugin.java

示例10: emit

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public void emit (StringBuilder out, List<String> lines,
		Map<String, String> params) {
	String src = params.get("src");
	try {
		if (src != null && src.length() > 0) {
			String id = HTMLPanel.createUniqueId();
			out.append(CachedIncludePluginTemplates.INSTANCE.loadingButton(
					id, Resources.RES.defaultLoader().getSafeUri(), src)
					.asString());

			getContent(src, id, lines, params);
		}
	} catch (Exception e) {
		throw new RuntimeException("Error while rendering "
				+ this.getClass().getName(), e);
	}
}
 
开发者ID:billy1380,项目名称:blogwt,代码行数:19,代码来源:CachedIncludePlugin.java

示例11: render

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public Widget render(Schema property) {
  HTMLPanel panel = new HTMLPanel("");
  panel.getElement().getStyle().setDisplay(Display.INLINE);

  panel.add(new InlineLabel("\""));
  if (property.locked()) {
    InlineLabel label = new InlineLabel();
    panel.add(label);
    hasText = label;
  } else {
    TextArea editor = new TextArea();
    panel.add(editor);
    hasText = editor;
  }
  panel.add(new InlineLabel("\""));

  if (property.getDefault() != null) {
    hasText.setText(property.getDefault());
  }

  return panel;
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:24,代码来源:SchemaForm.java

示例12: createWidget

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public Widget createWidget() {
    final Button resetButton = new Button(Singleton.MESSAGES.label_resetAllMetrics(), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            _presenter.resetSystemMetrics();
        }
    });
    SimpleLayout layout = new SimpleLayout().setTitle(Singleton.MESSAGES.label_switchYardMessageMetrics()).setHeadline(Singleton.MESSAGES.label_system())
            .setDescription(Singleton.MESSAGES.description_systemMetrics())
            .addContent(Singleton.MESSAGES.label_systemMessageMetrics(), _systemMetricsViewer.asWidget())
            .addContent("reset", resetButton) //$NON-NLS-1$
            .addContent("spacer", new HTMLPanel("&nbsp;")) //$NON-NLS-1$ //$NON-NLS-2$
            .addContent(Singleton.MESSAGES.label_serviceMessageMetrics(), _servicesList.asWidget())
            .addContent(Singleton.MESSAGES.label_referenceMessageMetrics(), _referencesList.asWidget());

    final Widget result = layout.build();
    // hackery, prevent button from filling the row
    resetButton.getElement().removeClassName("fill-layout-width"); //$NON-NLS-1$
    return result;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:22,代码来源:MetricsView.java

示例13: buildTabContent

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
/**
 * We'll build the tab panel's content from the HTML that is already in the HTML
 * page.
 */
private void buildTabContent(){
	// Create the main content widget
	// First retrieve the existing content for the pages from the HTML page
	this.homePanel = new HTMLPanel(getContent(Pages.HOME.getText()));
	this.productsPanel = new HTMLPanel(getContent(Pages.PRODUCTS.getText()));
	this.contactPanel = new HTMLPanel(getContent(Pages.CONTACT.getText()));
	
	// set the style of HTMLPanels
	this.homePanel.addStyleName("htmlPanel");
	this.productsPanel.addStyleName("htmlPanel");
	this.contactPanel.addStyleName("htmlPanel");
	
	// Create the tab panel widget
	this.content = new TabLayoutPanel(20, Unit.PX);

	// Add the content we have just created to the tab panel widget
	this.content.add(this.homePanel, Pages.HOME.getText());
	this.content.add(this.productsPanel, Pages.PRODUCTS.getText());
	this.content.add(this.contactPanel, Pages.CONTACT.getText());
	
	// Indicate that we should show the HOME tab initially.
	this.content.selectTab(DECK_HOME);
}
 
开发者ID:robert0714,项目名称:gwtinaction2,代码行数:28,代码来源:BasicProject.java

示例14: create

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
public HTMLPanel create()
{
	FormCreatorBundle.CSS.ensureInjected();

	HTMLPanel panel = new HTMLPanel( sb.toString() );
	panel.setStyleName( FormCreatorBundle.CSS.form() );
	panel.setWidth( totalWidth + "px" );

	for( Entry<String, Widget> e : wMap.entrySet() )
	{
		e.getValue().setWidth( "100%" );
		panel.add( e.getValue(), e.getKey() );
	}

	return panel;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:17,代码来源:FormCreator.java

示例15: switchResultView

import com.google.gwt.user.client.ui.HTMLPanel; //导入依赖的package包/类
@Override
public void switchResultView(boolean showResultView) {
	this.isResultView = showResultView;
	if (!isResultView)
	{		
		if (answerCheckbox.getElement().getId() == null || answerCheckbox.getElement().getId() == "")
		{
			String id = HTMLPanel.createUniqueId();		
			// link them together
			answerCheckbox.getElement().setId(id); // works because we use a SimpleCheckBox
			answerLabel.setHtmlFor(id);
		}
		oldCheckboxValue = answerCheckbox.getValue();
		
		answerCheckbox.setEnabled(true);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "1");
		resultBar.addClassName("hidden");
	}
	else	// in case this is a result display, just show results and hide form stuff
	{
		answerCheckbox.setEnabled(false);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "0");
		resultBar.removeClassName("hidden");
	}
}
 
开发者ID:jkonert,项目名称:socom,代码行数:26,代码来源:InfluenceAnswerTextView.java


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