Tabnine Logo
HasHTML
Code IndexAdd Tabnine to your IDE (free)

How to use
HasHTML
in
com.google.gwt.user.client.ui

Best Java code snippets using com.google.gwt.user.client.ui.HasHTML (Showing top 20 results out of 315)

origin: org.apache.james.hupa/hupa-widgets

public String getHTML() {
  return ((HasHTML)link).getHTML();
}
 
origin: com.google.gwt/gwt-servlet

/**
 * Sets a stack header's HTML contents.
 *
 * Use care when setting an object's HTML; it is an easy way to expose
 * script-based security problems. Consider using
 * {@link #setHeaderHTML(int, SafeHtml)} or
 * {@link #setHeaderText(int, String)} whenever possible.
 *
 * @param index the index of the header whose HTML is to be set
 * @param html the header's new HTML contents
 */
public void setHeaderHTML(int index, @IsSafeHtml String html) {
 checkIndex(index);
 LayoutData data = layoutData.get(index);
 Widget headerWidget = data.header.getWidget();
 assert headerWidget instanceof HasHTML : "Header widget does not implement HasHTML";
 ((HasHTML) headerWidget).setHTML(html);
}
origin: gwt-test-utils/gwt-test-utils

protected String getString(Object o) {
  String actualValue;
  if (o == null) {
    return null;
  } else if (HasHTML.class.isInstance(o)) {
    HasHTML hasHTML = (HasHTML) o;
    String html = hasHTML.getHTML();
    actualValue = html != null && html.length() > 0 ? html : hasHTML.getText();
  } else if (HasText.class.isInstance(o)) {
    actualValue = ((HasText) o).getText();
  } else {
    actualValue = "" + o;
  }
  return actualValue;
}
origin: org.apache.james.hupa/hupa-widgets

public String getText() {
  return ((HasHTML)link).getText();
}
 
origin: com.googlecode.mgwt/mgwt

@Override
public void setTitleText(String text) {
 dialogPanel.getDialogTitle().setText(text);
}
origin: com.googlecode.mgwt/mgwt

@Override
public String getTitleText() {
 return dialogPanel.getDialogTitle().getText();
}
origin: org.apache.james.hupa/hupa-widgets

public void setText(String text) {
  ((HasHTML)link).setText(text);
  html.setText(text);
}
 
origin: stephenh/tessell

@Override
public String getValue() {
 return target.getHTML();
}
origin: stephenh/tessell

 @Override
 public void setValue(String value) {
  target.setHTML(value);
 }
};
origin: dankurka/mgwt

@Override
public String getTitleText() {
 return dialogPanel.getDialogTitle().getText();
}
origin: dankurka/mgwt

@Override
public void setTitleText(String text) {
 dialogPanel.getDialogTitle().setText(text);
}
origin: gwt-test-utils/gwt-test-utils

public void visitHasHTML(HasHTML hasHTML, WidgetRepository repository) {
  if (hasHTML.getHTML() != null && hasHTML.getHTML().length() > 0) {
    repository.addAlias(hasHTML.getHTML(), hasHTML);
  }
}
origin: dankurka/mgwt

@Override
public void setTitleText(String title) {
 dialogPanel1.getDialogTitle().setHTML(title);
}
origin: org.jboss.errai/errai-data-binding

private Optional<Supplier<Object>> maybeCreateElementValueGetter(final Element element) {
 final Optional<Supplier<Object>> uiGetter;
 final Supplier<ElementWrapperWidget> toWidget = () -> ElementWrapperWidget.getWidget(element);
 final ElementWrapperWidget wrapper = toWidget.get();
 if (wrapper instanceof HasValue) {
  uiGetter = Optional.ofNullable(() -> ((HasValue) toWidget.get()).getValue());
 }
 else if (wrapper instanceof HasHTML) {
  uiGetter = Optional.ofNullable(() -> ((HasHTML) toWidget.get()).getText());
 }
 else {
  uiGetter = Optional.empty();
 }
 return uiGetter;
}
origin: com.googlecode.mgwt/mgwt

@Override
public String getTitleText() {
 return dialogPanel1.getDialogTitle().getHTML();
}
origin: com.googlecode.mgwt/mgwt

@Override
public void setTitleText(String title) {
 dialogPanel1.getDialogTitle().setHTML(title);
}
origin: errai/errai

private Optional<Supplier<Object>> maybeCreateElementValueGetter(final Element element) {
 final Optional<Supplier<Object>> uiGetter;
 final Supplier<ElementWrapperWidget> toWidget = () -> ElementWrapperWidget.getWidget(element);
 final ElementWrapperWidget wrapper = toWidget.get();
 if (wrapper instanceof HasValue) {
  uiGetter = Optional.ofNullable(() -> ((HasValue) toWidget.get()).getValue());
 }
 else if (wrapper instanceof HasHTML) {
  uiGetter = Optional.ofNullable(() -> ((HasHTML) toWidget.get()).getText());
 }
 else {
  uiGetter = Optional.empty();
 }
 return uiGetter;
}
origin: dankurka/mgwt

@Override
public String getTitleText() {
 return dialogPanel1.getDialogTitle().getHTML();
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets a stack header's HTML contents.
 *
 * Use care when setting an object's HTML; it is an easy way to expose
 * script-based security problems. Consider using
 * {@link #setHeaderHTML(int, SafeHtml)} or 
 * {@link #setHeaderText(int, String)} whenever possible.
 *
 * @param index the index of the header whose HTML is to be set
 * @param html the header's new HTML contents
 */
public void setHeaderHTML(int index, String html) {
 checkIndex(index);
 LayoutData data = layoutData.get(index);
 Widget headerWidget = data.header.getWidget();
 assert headerWidget instanceof HasHTML : "Header widget does not implement HasHTML";
 ((HasHTML) headerWidget).setHTML(html);
}
origin: com.googlecode.gwt-test-utils/gwt-test-utils

/**
 * Verifies that the actual {@link UIObject} HTML contains the given sequence.
 *
 * @param sequence the sequence to search for.
 * @return this assertion object.
 * @throws AssertionError if the actual HTML value does not contain the given sequence.
 */
public S htmlContains(String sequence) {
  String html = HasHTML.class.isInstance(actual) ? ((HasHTML) actual).getHTML()
      : actual.getInnerHTML();
  if (!html.contains(sequence))
    failWithMessage("actual HTML [%s] does not contains [%s]", html, sequence);
  return myself;
}
com.google.gwt.user.client.uiHasHTML

Javadoc

An object that implements this interface contains text, which can be set and retrieved using these methods. The object's text can be set either as HTML or as text.

Use in UiBinder Templates

The body of an XML element representing a widget that implements HasHTML will be parsed as HTML and be used in a call to its #setHTML(String) method.

For example:

 
<g:PushButton><b>Click me!</b></g:PushButton> 

Most used methods

  • getHTML
    Gets this object's contents as HTML.
  • setHTML
    Sets this object's contents via HTML. Use care when setting an object's HTML; it is an easy way to e
  • getText
  • setText

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • startActivity (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BoxLayout (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now