Class WFigure

    • Constructor Detail

      • WFigure

        public WFigure​(WComponent content,
                       String heading)
        Creates a WFigure with the given content and heading.
        Parameters:
        content - the content for the figure
        heading - the figure's heading.
      • WFigure

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

      • setMode

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

        public WComponent getContent()
        Returns:
        the content of this figure
      • getDecoratedLabel

        public WDecoratedLabel getDecoratedLabel()
        Returns:
        the decorated label that is used to render the figure 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 WFigure.FigureModel 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 WFigure.FigureModel 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