Class WTextF


public class WTextF extends WJavaScriptExposableObject
A value class that defines a text.

The text is defined by a string.

JavaScript exposability

A WTextF is JavaScript exposable. If a WTextF is JavaScript bound, it can be accessed in your custom JavaScript code through its handle's jsRef(). A text is represented in JavaScript as a string.

Warning: A WTextF that is JavaScript exposed should be modified only through its handle. Any attempt at modifying it will cause an exception to be thrown.

See Also:
  • Constructor Details

    • WTextF

      public WTextF()
      Default constructor.

      Constructs an empty text.

      See Also:
    • WTextF

      public WTextF(CharSequence text)
      Construct text from WString.
    • WTextF

      public WTextF(String text)
      Construct text from string.
    • WTextF

      public WTextF(WTextF other)
  • Method Details

    • clone

      public WTextF clone()
      Specified by:
      clone in class WJavaScriptExposableObject
    • equals

      public boolean equals(WTextF other)
      Indicates whether some other object is "equal to" this one.
    • isEmpty

      public boolean isEmpty()
      Returns whether the text is empty or not.
    • setText

      public void setText(CharSequence text)
      Sets the content of the text.

    • getText

      public WString getText()
      Returns the content of the text.
    • getJsValue

      public String getJsValue()
      Description copied from class: WJavaScriptExposableObject
      Returns a JavaScript representation of the value of this object.

      Note: The value returned will reflect the current server side value of the object. If this object is JavaScript bound, this value may not reflect the actual client side value. If you need access to the client side value, use getJsRef() intead.

      Specified by:
      getJsValue in class WJavaScriptExposableObject
    • assignFromJSON

      protected void assignFromJSON(com.google.gson.JsonElement value)
      Specified by:
      assignFromJSON in class WJavaScriptExposableObject