Class WTableColumn

    • Constructor Detail

      • WTableColumn

        public WTableColumn​(String heading,
                            Class<? extends WComponent> rendererClass)
        Creates a WTableColumn.
        Parameters:
        heading - the column heading text.
        rendererClass - the renderer class for rendering row data.
      • WTableColumn

        public WTableColumn​(WDecoratedLabel label,
                            Class<? extends WComponent> rendererClass)
        Creates a WTableColumn.
        Parameters:
        label - the column heading.
        rendererClass - the renderer class for rendering row data.
      • WTableColumn

        public WTableColumn​(String heading,
                            WComponent renderer)
        Creates a WTableColumn.
        Parameters:
        heading - the column heading text.
        renderer - the component for rendering row data.
      • WTableColumn

        public WTableColumn​(WDecoratedLabel label,
                            WComponent renderer)
        Creates a WTableColumn.
        Parameters:
        label - the column heading.
        renderer - the component for rendering row data.
      • WTableColumn

        public WTableColumn​(String heading,
                            Class<? extends WComponent> rendererClass,
                            WComponent footerRender)
        Creates a WTableColumn.
        Parameters:
        heading - the column heading text.
        rendererClass - the renderer class for rendering row data.
        footerRender - the footer renderer or null for no footer
      • WTableColumn

        public WTableColumn​(WDecoratedLabel label,
                            Class<? extends WComponent> rendererClass,
                            WComponent footerRender)
        Creates a WTableColumn.
        Parameters:
        label - the column heading.
        rendererClass - the renderer class for rendering row data.
        footerRender - the footer renderer or null for no footer
      • WTableColumn

        public WTableColumn​(String heading,
                            WComponent renderer,
                            WComponent footerRender)
        Creates a WTableColumn.
        Parameters:
        heading - the column heading text.
        renderer - the component for rendering row data.
        footerRender - the footer renderer or null for no footer
      • WTableColumn

        public WTableColumn​(WDecoratedLabel label,
                            WComponent renderer,
                            WComponent footerRender)
        Creates a WTableColumn.
        Parameters:
        label - the column heading.
        renderer - the component for rendering row data.
        footerRender - the footer renderer or null for no footer
    • Method Detail

      • getRendererClass

        public Class<? extends WComponent> getRendererClass()
        Returns:
        the renderer class that will be used to render row data for this column.
      • getRenderer

        public WComponent getRenderer()
        Returns:
        the renderer that will be used to render row data for this column.
      • getFooterRender

        public WComponent getFooterRender()
        Returns:
        the footer renderer or null
      • getHeadingText

        public String getHeadingText()
        Returns the heading text for this column, in the case that the heading does not contain complex content.
        Returns:
        the heading text, if available, otherwise null.
        See Also:
        WDecoratedLabel.getText()
      • getWidth

        public int getWidth()
        Retrieves the column width, if set.
        Returns:
        the column width
      • setWidth

        public void setWidth​(int width)
        Sets the column width.
        Parameters:
        width - the column width as a percentage, or <= 0 for default width.
      • getAlign

        public WTableColumn.Alignment getAlign()
        Retrieves the column alignment.
        Returns:
        the column alignment
      • setAlign

        public void setAlign​(WTableColumn.Alignment align)
        Sets the column alignment.
        Parameters:
        align - the column alignment.
      • getColumnLabel

        public WDecoratedLabel getColumnLabel()
        Returns:
        the label for this column
      • 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.
      • getOrCreateComponentModel

        protected WTableColumn.WTableColumnModel 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
      • getComponentModel

        protected WTableColumn.WTableColumnModel 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