當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。