Class Text

java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zhtml.Text
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.RawId, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

public class Text extends org.zkoss.zk.ui.AbstractComponent implements org.zkoss.zk.ui.ext.RawId
Represents a piece of text (of DOM).
Author:
tomyeh
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
     

    Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

    org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
  • Field Summary

    Fields inherited from interface org.zkoss.zk.ui.Component

    APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE

    Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl

    AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Text(String value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.zkoss.zk.ui.sys.PropertyAccess
     
    Returns null if not set.
    Returns the value.
    Returns the widget class, "zhtml.Text".
    void
     
    protected boolean
     
    boolean
    Returns whether to encode the text, such as converting < to &lt;.
    void
     
    protected void
    renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
     
    void
    setEncode(boolean encode)
    Sets whether to encode the text, such as converting < to &lt;.
    void
    setParent(org.zkoss.zk.ui.Component parent)
     
    void
    setTabindex(Integer tabindex)
    Sets the tab order of this component.
    void
    Sets the value.

    Methods inherited from class org.zkoss.zk.ui.AbstractComponent

    addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Text

      public Text()
    • Text

      public Text(String value)
  • Method Details

    • getValue

      public String getValue()
      Returns the value.

      Default: "".

    • setValue

      public void setValue(String value)
      Sets the value.
    • getTabindexInteger

      public Integer getTabindexInteger()
      Returns null if not set.
      Returns:
      the tab order of this component
      Since:
      8.0.2
    • setTabindex

      public void setTabindex(Integer tabindex)
      Sets the tab order of this component. Removes the tabindex attribute if it's set to null.
      Parameters:
      tabindex -
    • isEncode

      public boolean isEncode()
      Returns whether to encode the text, such as converting < to &lt;.

      Default: true.

      Since:
      5.0.8
    • setEncode

      public void setEncode(boolean encode)
      Sets whether to encode the text, such as converting < to &lt;.

      Default: true.

      Since:
      5.0.8
    • getWidgetClass

      public String getWidgetClass()
      Returns the widget class, "zhtml.Text".
      Specified by:
      getWidgetClass in interface org.zkoss.zk.ui.Component
      Overrides:
      getWidgetClass in class org.zkoss.zk.ui.AbstractComponent
      Since:
      5.0.0
    • setParent

      public void setParent(org.zkoss.zk.ui.Component parent)
      Specified by:
      setParent in interface org.zkoss.zk.ui.Component
      Overrides:
      setParent in class org.zkoss.zk.ui.AbstractComponent
    • invalidate

      public void invalidate()
      Specified by:
      invalidate in interface org.zkoss.zk.ui.Component
      Overrides:
      invalidate in class org.zkoss.zk.ui.AbstractComponent
    • redraw

      public void redraw(Writer out) throws IOException
      Specified by:
      redraw in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      redraw in class org.zkoss.zk.ui.AbstractComponent
      Throws:
      IOException
    • renderProperties

      protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
      Overrides:
      renderProperties in class org.zkoss.zk.ui.AbstractComponent
      Throws:
      IOException
    • isChildable

      protected boolean isChildable()
      Overrides:
      isChildable in class org.zkoss.zk.ui.AbstractComponent
    • getExtraCtrl

      public Object getExtraCtrl()
      Specified by:
      getExtraCtrl in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      getExtraCtrl in class org.zkoss.zk.ui.AbstractComponent
    • getPropertyAccess

      public org.zkoss.zk.ui.sys.PropertyAccess getPropertyAccess(String prop)
      Specified by:
      getPropertyAccess in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      getPropertyAccess in class org.zkoss.zk.ui.AbstractComponent