Class AbstractTag

    • Field Detail

      • _tagnm

        protected java.lang.String _tagnm
        The tag name.
    • Constructor Detail

      • AbstractTag

        protected AbstractTag​(java.lang.String tagname)
      • AbstractTag

        protected AbstractTag()
    • Method Detail

      • getSclass

        public java.lang.String getSclass()
        Returns the CSS class. Due to Java's limitation, we cannot use the name called getClas.

        Default: null (the default value depends on element).

      • setSclass

        public void setSclass​(java.lang.String sclass)
        Sets the CSS class.
      • getStyle

        public java.lang.String getStyle()
        Returns the CSS style.

        Default: null.

      • setStyle

        public void setStyle​(java.lang.String style)
        Sets the CSS 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.

      • getAccesskey

        public java.lang.String getAccesskey()
        Returns the accesskey of this tag.

        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.

        Since:
        8.0.3
      • setAccesskey

        public void setAccesskey​(java.lang.String accesskey)
                          throws WrongValueException
        Sets the accesskey of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • isContenteditable

        public boolean isContenteditable()
        Returns the contenteditable of this tag.

        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.

        Since:
        8.0.3
      • setContenteditable

        public void setContenteditable​(boolean contenteditable)
                                throws WrongValueException
        Sets the contenteditable of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • getDir

        public java.lang.String getDir()
        Returns the dir of this tag.

        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.

        Since:
        8.0.3
      • setDir

        public void setDir​(java.lang.String dir)
                    throws WrongValueException
        Sets the dir of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • isDraggable

        public boolean isDraggable()
        Returns the draggable of this tag.

        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.

        Since:
        8.0.3
      • setDraggable

        public void setDraggable​(boolean draggable)
                          throws WrongValueException
        Sets the draggable of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • isHidden

        public boolean isHidden()
        Returns the hidden of this tag.

        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.

        Since:
        8.0.3
      • setHidden

        public void setHidden​(boolean hidden)
                       throws WrongValueException
        Sets the hidden of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • getLang

        public java.lang.String getLang()
        Returns the lang of this tag.

        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.

        Since:
        8.0.3
      • setLang

        public void setLang​(java.lang.String lang)
                     throws WrongValueException
        Sets the lang of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • isSpellcheck

        public boolean isSpellcheck()
        Returns the spellcheck of this tag.

        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.

        Since:
        8.0.3
      • setSpellcheck

        public void setSpellcheck​(boolean spellcheck)
                           throws WrongValueException
        Sets the spellcheck of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • getTabindex

        public java.lang.Integer getTabindex()
        Returns the tabindex of this tag.

        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.

        Since:
        8.0.3
      • setTabindex

        public void setTabindex​(java.lang.Integer tabindex)
                         throws WrongValueException
        Sets the tabindex of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • getTitle

        public java.lang.String getTitle()
        Returns the title of this tag.

        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.

        Since:
        8.0.3
      • setTitle

        public void setTitle​(java.lang.String title)
                      throws WrongValueException
        Sets the title of this tag.

        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.

        Throws:
        WrongValueException
        Since:
        8.0.3
      • getTag

        public java.lang.String getTag()
        Returns the tag name.
      • getDynamicProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getDynamicProperties()
        Description copied from interface: DynamicPropertied
        Returns all available dynamic properties.
        Specified by:
        getDynamicProperties in interface DynamicPropertied
      • getDynamicProperty

        public java.lang.Object getDynamicProperty​(java.lang.String name)
        Returns the dynamic property, or null if not found. Note: it must be a String object or null.
        Specified by:
        getDynamicProperty in interface DynamicPropertied
      • shallHideId

        protected boolean shallHideId()
        Whether to hide the id attribute.

        Default: false.

        Some tags, such as Html, won't generate the id attribute. They shall override this method to return true.

      • setVisible

        public boolean setVisible​(boolean visible)
        Changes the visibility of this component.

        Note: it will adjust the style (getStyle()) based on the visibility.

        Specified by:
        setVisible in interface Component
        Overrides:
        setVisible in class AbstractComponent
        Returns:
        the previous visibility
      • redrawChildrenDirectly

        protected void redrawChildrenDirectly​(TagRenderContext rc,
                                              Execution exec,
                                              java.io.Writer out)
                                       throws java.io.IOException
        Renders the children directly to the given output. Notice it is called only if 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.

        Throws:
        java.io.IOException
        Since:
        5.0.7
      • isChildable

        protected boolean isChildable()
        Description copied from class: AbstractComponent
        Returns whether this component can have a child.

        Default: return true (means it can have children).

        Overrides:
        isChildable in class AbstractComponent
      • isOrphanTag

        protected boolean isOrphanTag()
        Returns whether this tag is an orphan tag, i.e., it shall be in the form of <tag/>.
        Since:
        5.0.8
      • clone

        public java.lang.Object clone()
        Description copied from interface: Component
        Clones the component. All of its children and descendants are cloned. Also, ID are preserved.
        Specified by:
        clone in interface Component
        Overrides:
        clone in class AbstractComponent
        Returns:
        the new component. Notice that it doesn't belong to any page, nor desktop. It doesn't have a parent, either.
      • getExtraCtrl

        public java.lang.Object getExtraCtrl()
        Description copied from class: AbstractComponent
        Returns the extra controls that tell ZK how to handle this component specially. It is used only by component developers.

        Default: null.

        Specified by:
        getExtraCtrl in interface ComponentCtrl
        Overrides:
        getExtraCtrl in class AbstractComponent
        Returns:
        null if no special handling required. If the component requires some special controls, it could return an object that implements one or several interfaces in the org.zkoss.zk.ui.ext.render package. For example, Cropper.
        See Also:
        ComponentCtrl.getExtraCtrl()