Class CustomButton.Face

java.lang.Object
com.google.gwt.user.client.ui.CustomButton.Face
All Implemented Interfaces:
HasSafeHtml, HasHTML, HasText
Enclosing class:
CustomButton

public abstract class CustomButton.Face extends Object implements HasHTML, HasSafeHtml
Represents a button's face. Each face is associated with its own style modifier and, optionally, its own contents html, text, or image.
  • Method Details

    • getHTML

      public String getHTML()
      Gets the face's contents as html.
      Specified by:
      getHTML in interface HasHTML
      Returns:
      face's contents as html
    • getText

      public String getText()
      Gets the face's contents as text.
      Specified by:
      getText in interface HasText
      Returns:
      face's contents as text
    • setHTML

      public void setHTML(SafeHtml html)
      Set the face's contents as html.
      Specified by:
      setHTML in interface HasSafeHtml
      Parameters:
      html - html to set as face's contents html
    • setHTML

      public void setHTML(String html)
      Set the face's contents as html.
      Specified by:
      setHTML in interface HasHTML
      Parameters:
      html - html to set as face's contents html
    • setImage

      public final void setImage(Image image)
      Set the face's contents as an image.
      Parameters:
      image - image to set as face contents
    • setText

      public final void setText(String text)
      Sets the face's contents as text.
      Specified by:
      setText in interface HasText
      Parameters:
      text - text to set as face's contents
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getFaceID

      abstract int getFaceID()
      Gets the ID associated with this face. This will be a bitwise and of all of the attributes that comprise this face.
    • getName

      abstract String getName()
      Get the name of the face. This property is also used as a modifier on the CustomButton style.

      For instance, if the CustomButton style is "gwt-PushButton" and the face name is "up", then the CSS class name will be "gwt-PushButton-up".

      Returns:
      the face's name