Class BaseHtmlElement

    • Constructor Detail

      • BaseHtmlElement

        protected BaseHtmlElement()
        To avoid any instantiation
    • Method Detail

      • getInnerText

        @JsProperty
        public final String getInnerText()
        Returns the "rendered" text content of a node and its descendants.
        As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard.
        Returns:
        the "rendered" text content of a node and its descendants
      • setInnerText

        @JsProperty
        public final void setInnerText​(String innerText)
        Sets the "rendered" text content of a node and its descendants.
        As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard.
        Parameters:
        innerText - the "rendered" text content of a node and its descendants
      • getOffsetHeight

        @JsProperty
        public final int getOffsetHeight()
        Returns a number containing the height of an element, relative to the layout.
        Returns:
        a number containing the height of an element, relative to the layout
      • getOffsetLeft

        @JsProperty
        public final int getOffsetLeft()
        Returns a number, the distance from this element's left border to its offsetParent's left border.
        Returns:
        a number, the distance from this element's left border to its offsetParent's left border
      • getOffsetParent

        @JsProperty
        public final BaseElement getOffsetParent()
        Returns a element that is the element from which all offset calculations are currently computed.
        Returns:
        a element that is the element from which all offset calculations are currently computed
      • getOffsetTop

        @JsProperty
        public final int getOffsetTop()
        Returns a number, the distance from this element's top border to its offsetParent's top border.
        Returns:
        a number, the distance from this element's top border to its offsetParent's top border
      • getOffsetWidth

        @JsProperty
        public final int getOffsetWidth()
        Returns a number containing the width of an element, relative to the layout.
        Returns:
        a number containing the width of an element, relative to the layout
      • getStyle

        @JsProperty
        public final BaseStyleProperties getStyle()
        Returns an object representing the declarations of an element's style attributes.
        Returns:
        an object representing the declarations of an element's style attributes
      • getTabIndex

        @JsProperty
        public final int getTabIndex()
        Returns a number representing the position of the element in the tabbing order.
        Returns:
        a number representing the position of the element in the tabbing order
      • setTabIndex

        @JsProperty
        public final void setTabIndex​(int tabIndex)
        Sets a number representing the position of the element in the tabbing order.
        Parameters:
        tabIndex - a number representing the position of the element in the tabbing order
      • focus

        @JsMethod
        public final void focus()
        Sets focus on the specified element, if it can be focused. The focused element is the element that will receive keyboard and similar events by default.
      • blur

        @JsMethod
        public final void blur()
        Removes keyboard focus from the current element.
      • getParentHtmlElement

        @JsOverlay
        public final BaseHtmlElement getParentHtmlElement()
        Returns an HTML element that is the parent of this element.
        If the element has no parent, or if that parent is not an element, returns null.
        Returns:
        an element that is the parent of this node
      • removeFromParent

        @JsOverlay
        public final void removeFromParent()
        Removes this node from its parent node if it is attached to one.
      • getAbsoluteTop

        @JsOverlay
        public final double getAbsoluteTop()
        Returns an element's absolute top coordinate in the document's coordinate system.
        Returns:
        an element's absolute top coordinate in the document's coordinate system
      • getAbsoluteLeft

        @JsOverlay
        public final double getAbsoluteLeft()
        Returns an element's absolute left coordinate in the document's coordinate system.
        Returns:
        an element's absolute left coordinate in the document's coordinate system
      • getScrollingElement

        @JsOverlay
        public final BaseElement getScrollingElement()
        Returns the scrolling element of the document, if there is, or the document element.
        Returns:
        the scrolling element of the document, if there is, or the document element