|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zhtml.impl.AbstractTag
public class AbstractTag
The raw component used to generate raw HTML elements.
Note: ZHTML components ignore the page listener since it handles
non-deferrable event listeners
(see Deferrable
).
Nested Class Summary | |
---|---|
protected class |
AbstractTag.ExtraCtrl
|
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
org.zkoss.zk.ui.AbstractComponent.Children |
Field Summary | |
---|---|
protected String |
_tagnm
The tag name. |
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 |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
protected |
AbstractTag()
|
protected |
AbstractTag(String tagname)
|
Method Summary | |
---|---|
Object |
clone()
|
Object |
getDynamicProperty(String name)
Returns the dynamic property, or null if not found. |
Object |
getExtraCtrl()
|
String |
getSclass()
Returns the CSS class. |
String |
getStyle()
Returns the CSS style. |
String |
getTag()
Returns the tag name. |
String |
getWidgetClass()
Returns the widget class, "zhtml.Widget". |
boolean |
hasDynamicProperty(String name)
|
protected boolean |
isChildable()
|
protected boolean |
isOrphanTag()
Returns whether this tag is an orphan tag, i.e., it shall be in the form of <tag/>. |
void |
redraw(Writer out)
|
protected void |
redrawChildrenDirectly(TagRenderContext rc,
org.zkoss.zk.ui.Execution exec,
Writer out)
Renders the children directly to the given output. |
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
|
void |
setDynamicProperty(String name,
Object value)
Sets the dynamic property. |
void |
setSclass(String sclass)
Sets the CSS class. |
void |
setStyle(String style)
Sets the CSS style. |
boolean |
setVisible(boolean visible)
Changes the visibility of this component. |
protected boolean |
shallHideId()
Whether to hide the id attribute. |
String |
toString()
|
Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String _tagnm
Constructor Detail |
---|
protected AbstractTag(String tagname)
protected AbstractTag()
Method Detail |
---|
public String getSclass()
Default: null (the default value depends on element).
public void setSclass(String sclass)
public String getStyle()
Default: null.
public void setStyle(String style)
Note: if display is not specified as part of style,
the returned value of AbstractComponent.isVisible()
is assumed.
In other words, if not visible and display is not specified as part of style,
"display:none" is appended.
On the other hand, if display is specified, then setVisible(boolean)
is called to reflect the visibility, if necessary.
public String getTag()
public boolean hasDynamicProperty(String name)
hasDynamicProperty
in interface org.zkoss.zk.ui.ext.DynamicPropertied
public Object getDynamicProperty(String name)
getDynamicProperty
in interface org.zkoss.zk.ui.ext.DynamicPropertied
public void setDynamicProperty(String name, Object value) throws org.zkoss.zk.ui.WrongValueException
Objects.toString(java.lang.Object)
).
Note: it handles the style property specially. Refer to setStyle(java.lang.String)
for details.
setDynamicProperty
in interface org.zkoss.zk.ui.ext.DynamicPropertied
org.zkoss.zk.ui.WrongValueException
protected boolean shallHideId()
Default: false.
Some tags, such as Html
, won't generate the id attribute.
They shall override this method to return true.
public boolean setVisible(boolean visible)
Note: it will adjust the style (getStyle()
) based on the visibility.
setVisible
in interface org.zkoss.zk.ui.Component
setVisible
in class org.zkoss.zk.ui.AbstractComponent
public String getWidgetClass()
getWidgetClass
in interface org.zkoss.zk.ui.Component
getWidgetClass
in class org.zkoss.zk.ui.AbstractComponent
public void redraw(Writer out) throws IOException
redraw
in interface org.zkoss.zk.ui.sys.ComponentCtrl
redraw
in class org.zkoss.zk.ui.AbstractComponent
IOException
protected void redrawChildrenDirectly(TagRenderContext rc, org.zkoss.zk.ui.Execution exec, Writer out) throws IOException
redraw(java.io.Writer)
is going to render
the content (HTML tags) directly.
If it is about to generate the JavaScript code
AbstractComponent.redrawChildren(java.io.Writer)
will be called instead.
You have to override this method if the deriving class has additional information to render.
IOException
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
renderProperties
in class org.zkoss.zk.ui.AbstractComponent
IOException
protected boolean isChildable()
isChildable
in class org.zkoss.zk.ui.AbstractComponent
protected boolean isOrphanTag()
public Object clone()
clone
in interface org.zkoss.zk.ui.Component
clone
in class org.zkoss.zk.ui.AbstractComponent
public String toString()
toString
in class org.zkoss.zk.ui.AbstractComponent
public Object getExtraCtrl()
getExtraCtrl
in interface org.zkoss.zk.ui.sys.ComponentCtrl
getExtraCtrl
in class org.zkoss.zk.ui.AbstractComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |