org.zkoss.zhtml
Class Text

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

public class Text
extends AbstractComponent
implements RawId

Represents a piece of text (of DOM).

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.AbstractComponent
_visible
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Text()
           
Text(java.lang.String value)
           
 
Method Summary
 java.lang.String getValue()
          Returns the value.
 void invalidate()
          Invalidates this component by setting the dirty flag such that it will be redraw the whole content later.
 boolean isChildable()
          Default: return true (allows to have children).
 void redraw(java.io.Writer out)
          Redraws this component.
 void setParent(Component parent)
          Sets the parent component.
 void setValue(java.lang.String value)
          Sets the value.
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, containsVariable, detach, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, isAsapRequired, isInvalidated, isListenerAvailable, isVisible, newChildren, newExtraCtrl, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Text

public Text()

Text

public Text(java.lang.String value)
Method Detail

getValue

public java.lang.String getValue()
Returns the value.

Default: "".


setValue

public void setValue(java.lang.String value)
Sets the value.


setParent

public void setParent(Component parent)
Description copied from interface: Component
Sets the parent component.

Note: Component.setParent(org.zkoss.zk.ui.Component) always calls back Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and/or Component.removeChild(org.zkoss.zk.ui.Component), while Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.removeChild(org.zkoss.zk.ui.Component) always calls back Component.setParent(org.zkoss.zk.ui.Component), if the parent is changed. Thus, you don't need to override both Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.setParent(org.zkoss.zk.ui.Component), if you want to customize the behavior.

Specified by:
setParent in interface Component
Overrides:
setParent in class AbstractComponent

invalidate

public void invalidate()
Description copied from interface: Component
Invalidates this component by setting the dirty flag such that it will be redraw the whole content later.

It can be called only in the request-processing and event-processing phases; excluding the redrawing phase.

Specified by:
invalidate in interface Component
Overrides:
invalidate in class AbstractComponent

redraw

public void redraw(java.io.Writer out)
            throws java.io.IOException
Description copied from class: AbstractComponent
Redraws this component. This method implements the mold mechanism.
  1. It first invokes AbstractComponent.getMoldURI() to retrieve the mold to redraw. The mold is either an URI (String) or a ComponentRenderer instance.
  2. If URI, it invokes Execution.include(java.io.Writer, java.lang.String, java.util.Map, int) to generate the output.
  3. If a ComponentRenderer instance, ComponentRenderer.render(org.zkoss.zk.ui.Component, java.io.Writer) is called to generate the output.
  4. Specified by:
    redraw in interface Component
    Overrides:
    redraw in class AbstractComponent
    Throws:
    java.io.IOException

isChildable

public boolean isChildable()
Description copied from class: AbstractComponent
Default: return true (allows to have children).

Specified by:
isChildable in interface Component
Overrides:
isChildable in class AbstractComponent


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo