Class TvmComposite<W extends org.teavm.jso.dom.html.HTMLElement,​C extends UiWidget>

    • Constructor Detail

      • TvmComposite

        public TvmComposite​(W widget)
        The constructor.
        Parameters:
        widget - the TeaVM widget.
    • Method Detail

      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface UiComposite<W extends org.teavm.jso.dom.html.HTMLElement>
        Returns:
        the number of direct children contained in this widget.
      • getChild

        public C getChild​(int index)
        Specified by:
        getChild in interface UiComposite<W extends org.teavm.jso.dom.html.HTMLElement>
        Parameters:
        index - is the index of the requested child. Should be in the range from 0 to UiComposite.getChildCount() - 1.
        Returns:
        the requested child or null if no such child exists.
        See Also:
        List.get(int)
      • getChildIndex

        public int getChildIndex​(C child)
        Specified by:
        getChildIndex in interface UiComposite<W extends org.teavm.jso.dom.html.HTMLElement>
        Parameters:
        child - the child to look for.
        Returns:
        the index of the given child or -1 if no such child exists.