|
||||||||||
| 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 |
|---|
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Field Summary | |
|---|---|
protected java.lang.String |
_tagnm
The tag name. |
| 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 | |
|---|---|
protected |
AbstractTag()
|
protected |
AbstractTag(java.lang.String tagname)
|
| Method Summary | |
|---|---|
boolean |
addEventListener(java.lang.String evtnm,
EventListener listener)
Adds an event listener to specified event for this component. |
java.lang.Object |
clone()
Clones the component. |
java.lang.Object |
getDynamicProperty(java.lang.String name)
Returns the dynamic property, or null if not found. |
java.lang.String |
getSclass()
Returns the CSS class. |
java.lang.String |
getStyle()
Returns the CSS style. |
java.lang.String |
getTag()
Returns the tag name. |
boolean |
hasDynamicProperty(java.lang.String name)
Returns whether a dynamic property is defined. |
boolean |
isChildable()
Default: return true (allows to have children). |
void |
redraw(java.io.Writer out)
Redraws this component. |
void |
setDynamicProperty(java.lang.String name,
java.lang.Object value)
Sets the dynamic property. |
void |
setSclass(java.lang.String sclass)
Sets the CSS class. |
void |
setStyle(java.lang.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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String _tagnm
| Constructor Detail |
|---|
protected AbstractTag(java.lang.String tagname)
protected AbstractTag()
| Method Detail |
|---|
public java.lang.String getSclass()
Default: null (the default value depends on element).
public void setSclass(java.lang.String sclass)
public java.lang.String getStyle()
Default: null.
public void setStyle(java.lang.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 dispaly 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 java.lang.String getTag()
public boolean hasDynamicProperty(java.lang.String name)
DynamicPropertied
hasDynamicProperty in interface DynamicPropertiedpublic java.lang.Object getDynamicProperty(java.lang.String name)
getDynamicProperty in interface DynamicPropertied
public void setDynamicProperty(java.lang.String name,
java.lang.Object value)
throws WrongValueException
Objects.toString(java.lang.Object)).
Note: it handles the style property specially. Refer to setStyle(java.lang.String)
for details.
setDynamicProperty in interface DynamicPropertiedWrongValueExceptionprotected boolean shallHideId()
Default: false.
Some tags, such as Html, won't generate the id attribute.
They will 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 ComponentsetVisible in class AbstractComponent
public boolean addEventListener(java.lang.String evtnm,
EventListener listener)
ComponentYou could register listener to all components in the same page
by use of Page.addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener).
addEventListener in interface ComponentaddEventListener in class AbstractComponentevtnm - what event to listen (never null)
Page.addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener)
public void redraw(java.io.Writer out)
throws java.io.IOException
AbstractComponentAbstractComponent.getMoldURI() to retrieve the mold
to redraw. The mold is either an URI (String) or a
ComponentRenderer instance.
Execution.include(java.io.Writer, java.lang.String, java.util.Map, int) to generate
the output.ComponentRenderer instance, ComponentRenderer.render(org.zkoss.zk.ui.Component, java.io.Writer)
is called to generate the output.
redraw in interface Componentredraw in class AbstractComponentjava.io.IOExceptionpublic boolean isChildable()
AbstractComponent
isChildable in interface ComponentisChildable in class AbstractComponentpublic java.lang.Object clone()
Component
clone in interface Componentclone in class AbstractComponentpublic java.lang.String toString()
toString in class AbstractComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||