Class WHeading

    • Method Detail

      • getHeadingLevel

        public HeadingLevel getHeadingLevel()
        Returns:
        the heading level
      • setHeadingLevel

        public void setHeadingLevel​(HeadingLevel headingLevel)
        Parameters:
        headingLevel - the heading level
      • getDecoratedLabel

        public WDecoratedLabel getDecoratedLabel()
        Returns:
        the decorated label which displays the heading's text/icon etc.
      • setMargin

        public void setMargin​(Margin margin)
        Set the margin for the component, or null for no margin.
        Specified by:
        setMargin in interface Marginable
        Parameters:
        margin - the margin for the component
      • getMargin

        public Margin getMargin()
        Get the margin for the component, or null if not set.
        Specified by:
        getMargin in interface Marginable
        Returns:
        the margin for the component, or null if not set
      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface Container
        Returns:
        the number of child components currently contained within this component.
      • getChildAt

        public WComponent getChildAt​(int index)
        Retrieves a child component by its index.
        Specified by:
        getChildAt in interface Container
        Parameters:
        index - the index of the child component to be retrieved.
        Returns:
        the child component at the given index.
      • getIndexOfChild

        public int getIndexOfChild​(WComponent childComponent)
        Retrieves the index of the given child.
        Specified by:
        getIndexOfChild in interface Container
        Parameters:
        childComponent - the child component to retrieve the index for.
        Returns:
        the index of the given child component, or -1 if the component is not a child of this component.
      • getChildren

        public List<WComponent> getChildren()
        Retrieves a list of this Container's.
        Specified by:
        getChildren in interface Container
        Returns:
        an immutable list of this Container.
      • toString

        public String toString()
        Description copied from class: AbstractWComponent
        Creates a String representation of this component; usually for debugging purposes.
        Overrides:
        toString in class WText
        Returns:
        a String representation of this component, for debugging purposes.
      • getComponentModel

        protected WHeading.HeadingModel getComponentModel()
        Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.
        Overrides:
        getComponentModel in class WText
        Returns:
        the effective component model
      • getOrCreateComponentModel

        protected WHeading.HeadingModel getOrCreateComponentModel()
        Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.
        Overrides:
        getOrCreateComponentModel in class WText
        Returns:
        the model for this component