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


Java HasHTML类代码示例

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


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

示例1: hasValueChanged

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * Returns if a value has changed into the report.
 * 
 * @return if a value has changed into the report.
 */
public boolean hasValueChanged() {

	if (ClientUtils.isEmpty(textAreas)) {
		return false;
	}

	for (final Entry<Integer, String> entry : oldContents.entrySet()) {
		final HasHTML textArea = textAreas.get(entry.getKey());
		if (!ClientUtils.equals(textArea.getHTML(), entry.getValue())) {
			return true;
		}
	}

	return false;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:21,代码来源:ReportsPresenter.java

示例2: setText

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
public void setText(String html) {
	if (iReadOnly == null) {
		iReadOnly = new P("label");
		iReadOnly.setVisible(!getWidget().isVisible());
		if (iPrint != null)
			iReadOnly.addStyleName("unitime-NoPrint");
		insert(iReadOnly, 1);
	}
	if (iReadOnly instanceof HasHTML) {
		((HasHTML)iReadOnly).setHTML(html);
	} else if (iReadOnly instanceof HasText) {
		((HasText)iReadOnly).setText(html);
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:15,代码来源:UniTimeWidget.java

示例3: getCaptionWidget

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
@Override
public HasHTML getCaptionWidget() {
	if (captionWidget instanceof HasHTML) {
		return (HasHTML) captionWidget;
	} else {
		return null;
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:WindowPanel.java

示例4: addTextArea

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public HasHTML addTextArea(final RichTextElementDTO richTextElement, final FoldPanel sectionPanel, final boolean draftMode) {

	if (draftMode) {

		final RichTextArea textArea = new RichTextArea();

		textArea.setHTML(richTextElement.getText());
		textArea.addFocusHandler(new FocusHandler() {

			@Override
			public void onFocus(FocusEvent event) {
				globalFormatterArray[0] = textArea.getFormatter();
			}
		});

		sectionPanel.add(textArea);
		return textArea;

	} else {

		final HTML html = new HTML();
		final String value = richTextElement.getText();

		if (ClientUtils.isBlank(value)) {
			html.setText(I18N.CONSTANTS.reportEmptySection());
			html.addStyleName(STYLE_PROJECT_REPORT_FIELD_EMPTY);

		} else {
			html.setHTML(value);
			html.addStyleName(STYLE_PROJECT_REPORT_FIELD);
		}

		sectionPanel.add(html);
		return null;
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:41,代码来源:ReportsView.java

示例5: addKeyQuestion

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public HasHTML addKeyQuestion(final KeyQuestionDTO keyQuestion, final FoldPanel sectionPanel, final boolean draftMode) {

	keyQuestionState.increaseCount();

	keyQuestion.setNumber(keyQuestionState.getCount());

	// Rich text field.
	final RichTextArea textArea = new RichTextArea();
	final RichTextElementDTO richTextElementDTO = keyQuestion.getRichTextElementDTO();

	if (richTextElementDTO != null) {
		textArea.setHTML(richTextElementDTO.getText());
	}

	// Compas icon.
	final ImageResource icon;
	if (ClientUtils.isBlank(textArea.getText())) {
		icon = ToolbarImages.IMAGES.compasRed();

	} else {
		icon = ToolbarImages.IMAGES.compasGreen();
		keyQuestionState.increaseValids();
	}

	sectionPanel.addToolButton(icon, new ClickHandler() {

		@Override
		public void onClick(ClickEvent event) {
			KeyQuestionDialog.getDialog(keyQuestion, textArea, sectionPanel, sectionPanel.getToolButtonCount(), keyQuestionState, draftMode).show();
		}
	});

	return textArea;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:39,代码来源:ReportsView.java

示例6: getChanges

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * Returns the report sections corresponding HTML changes map.
 * 
 * @return The report sections corresponding HTML changes map.
 */
private Map<String, Object> getChanges() {

	final Map<String, Object> changes = new HashMap<String, Object>();

	for (final Map.Entry<Integer, HasHTML> textArea : textAreas.entrySet()) {
		changes.put(textArea.getKey().toString(), textArea.getValue().getHTML());
	}

	return changes;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:16,代码来源:ReportsPresenter.java

示例7: getDetails

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
@Override
public HasHTML getDetails() {
    return projectDetailsPanel;
}
 
开发者ID:kaaproject,项目名称:sandbox-frame,代码行数:5,代码来源:ProjectViewImpl.java

示例8: get

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/** @return the existing HTML property of a widget. */
public static SafeHtml get(HasHTML t) {
  return new SafeHtmlString(t.getHTML());
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:5,代码来源:SafeHtml.java

示例9: set

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/** Set the HTML property of a widget. */
public static <T extends HasHTML> T set(T e, SafeHtml str) {
  e.setHTML(str.asString());
  return e;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:6,代码来源:SafeHtml.java

示例10: setCaptionWidget

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
@Override
public void setCaptionWidget(HasHTML aCaptionWidget) {
    window.setCaptionWidget(aCaptionWidget);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:5,代码来源:WindowPopupPanel.java

示例11: getCaptionWidget

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
@Override
public HasHTML getCaptionWidget() {
    return window.getCaptionWidget();
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:5,代码来源:WindowPopupPanel.java

示例12: getTextField

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
@Override
public HasHTML getTextField() {
	return valueField;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:5,代码来源:SliderViewGwtImpl.java

示例13: getNameLabel

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public HasHTML getNameLabel() {
	return usernameLabel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:AuthenticationBannerView.java

示例14: getNameLabel

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public HasHTML getNameLabel() {
	return nameLabel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:OrganizationBannerView.java

示例15: onSaveReport

import com.google.gwt.user.client.ui.HasHTML; //导入依赖的package包/类
/**
 * Method executed on report save action.
 * 
 * @param report
 *          The current report.
 * @param changes
 *          The changes.
 * @param loadingMask
 *          Set to {@code true} to display a loading mask on the entire report during save action. Set to
 *          {@code false} to ignore loading mask.
 */
private void onSaveReport(final ProjectReportDTO report, final Map<String, Object> changes, final boolean loadingMask) {

	changes.put(ProjectReportDTO.CURRENT_PHASE, phaseName);

	dispatch.execute(new UpdateEntity(ProjectReportDTO.ENTITY_NAME, report.getVersionId(), changes), new CommandResultHandler<VoidResult>() {

		@Override
		public void onCommandFailure(final Throwable caught) {
			N10N.error(I18N.CONSTANTS.projectTabReports(), I18N.CONSTANTS.reportSaveError());
		}

		@Override
		public void onCommandSuccess(final VoidResult result) {

			N10N.infoNotif(I18N.CONSTANTS.projectTabReports(), I18N.CONSTANTS.reportSaveSuccess());

			// --
			// Updates store.
			// --

			for (int index = 0; index < view.getReportsStore().getCount(); index++) {

				final ReportReference reference = view.getReportsStore().getAt(index);

				if (reference.getId().equals(report.getId())) {
					view.getReportsStore().remove(reference);
					reference.setEditorName(auth().getUserShortName());
					reference.setPhaseName(phaseName);
					reference.setLastEditDate(new Date());
					view.getReportsStore().add(reference);
					break;
				}
			}

			// --
			// Updates changes.
			// --

			if (ClientUtils.isEmpty(textAreas)) {
				return;
			}

			for (final Entry<Integer, String> entry : oldContents.entrySet()) {
				final HasHTML textArea = textAreas.get(entry.getKey());
				oldContents.put(entry.getKey(), textArea.getHTML());
			}

			// --
			// Cancels timer.
			// --

			autoSaveTimer.cancel();
			autoSaveTimer.schedule(AUTO_SAVE_PERIOD);
		}
	}, loadingMask ? new LoadingMask(view.getMainPanel()) : null);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:68,代码来源:ReportsPresenter.java


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