public class AbstractTag
extends org.zkoss.zk.ui.AbstractComponent
implements org.zkoss.zk.ui.ext.DynamicPropertied, org.zkoss.zk.ui.ext.RawId
Note: ZHTML components ignore the page listener since it handles non-deferrable event listeners
(see Deferrable
).
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractTag.ExtraCtrl |
Modifier and Type | Field and Description |
---|---|
protected String |
_tagnm
The tag name.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractTag() |
protected |
AbstractTag(String tagname) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
String |
getAccesskey()
Returns the accesskey of this tag.
|
String |
getDir()
Returns the dir of this tag.
|
Object |
getDynamicProperty(String name)
Returns the dynamic property, or null if not found.
|
Object |
getExtraCtrl() |
String |
getLang()
Returns the lang of this tag.
|
org.zkoss.zk.ui.sys.PropertyAccess |
getPropertyAccess(String prop) |
String |
getSclass()
Returns the CSS class.
|
String |
getStyle()
Returns the CSS style.
|
Integer |
getTabindex()
Returns the tabindex of this tag.
|
String |
getTag()
Returns the tag name.
|
String |
getTitle()
Returns the title of this tag.
|
String |
getWidgetClass()
Returns the widget class, "zhtml.Widget".
|
boolean |
hasDynamicProperty(String name) |
protected boolean |
isChildable() |
boolean |
isContenteditable()
Returns the contenteditable of this tag.
|
boolean |
isDraggable()
Returns the draggable of this tag.
|
boolean |
isHidden()
Returns the hidden of this tag.
|
protected boolean |
isOrphanTag()
Returns whether this tag is an orphan tag, i.e., it shall be in the form of <tag/>.
|
boolean |
isSpellcheck()
Returns the spellcheck of this 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 |
setAccesskey(String accesskey)
Sets the accesskey of this tag.
|
void |
setContenteditable(boolean contenteditable)
Sets the contenteditable of this tag.
|
void |
setDir(String dir)
Sets the dir of this tag.
|
void |
setDraggable(boolean draggable)
Sets the draggable of this tag.
|
void |
setDynamicProperty(String name,
Object value)
Sets the dynamic property.
|
void |
setHidden(boolean hidden)
Sets the hidden of this tag.
|
void |
setLang(String lang)
Sets the lang of this tag.
|
void |
setSclass(String sclass)
Sets the CSS class.
|
void |
setSpellcheck(boolean spellcheck)
Sets the spellcheck of this tag.
|
void |
setStyle(String style)
Sets the CSS style.
|
void |
setTabindex(Integer tabindex)
Sets the tabindex of this tag.
|
void |
setTitle(String title)
Sets the title of this tag.
|
boolean |
setVisible(boolean visible)
Changes the visibility of this component.
|
protected boolean |
shallHideId()
Whether to hide the id attribute.
|
String |
toString() |
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, 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, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
protected String _tagnm
protected AbstractTag(String tagname)
protected AbstractTag()
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 getAccesskey()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setAccesskey(String accesskey) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public boolean isContenteditable()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setContenteditable(boolean contenteditable) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public String getDir()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setDir(String dir) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public boolean isDraggable()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setDraggable(boolean draggable) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public boolean isHidden()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setHidden(boolean hidden) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public String getLang()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setLang(String lang) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public boolean isSpellcheck()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setSpellcheck(boolean spellcheck) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public Integer getTabindex()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setTabindex(Integer tabindex) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
public String getTitle()
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
public void setTitle(String title) throws org.zkoss.zk.ui.WrongValueException
Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
org.zkoss.zk.ui.WrongValueException
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 org.zkoss.zk.ui.sys.PropertyAccess getPropertyAccess(String prop)
getPropertyAccess
in interface org.zkoss.zk.ui.sys.ComponentCtrl
getPropertyAccess
in class org.zkoss.zk.ui.AbstractComponent
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
Copyright © 2021. All rights reserved.