Class WSection

    • Constructor Detail

      • WSection

        public WSection​(String heading)
        Creates a WSection with the given heading.
        Parameters:
        heading - the section's heading.
      • WSection

        public WSection​(WPanel content,
                        String heading)
        Creates a WSection with the given content and heading.
        Parameters:
        content - the content for the section
        heading - the section's heading.
      • WSection

        public WSection​(WPanel content,
                        WDecoratedLabel label)
        Creates a WSection with the given content and heading.
        Parameters:
        content - the content for the section.
        label - the section's heading.
    • Method Detail

      • setMode

        public void setMode​(WSection.SectionMode mode)
        Sets this WSection's mode of operation.
        Parameters:
        mode - the mode of operation.
      • getContent

        public WPanel getContent()
        Returns:
        the content of this section
      • getDecoratedLabel

        public WDecoratedLabel getDecoratedLabel()
        Returns:
        the decorated label that is used to render the section heading.
      • 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
      • toString

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

        protected WSection.SectionModel 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 AbstractWComponent
        Returns:
        the effective component model
      • getOrCreateComponentModel

        protected WSection.SectionModel 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 AbstractWComponent
        Returns:
        the model for this component