Interface DynamicTableColumn<ROW_TYPE,​COLUMN_TYPE,​DATA_SOURCE>

    • Method Detail

      • getColumnName

        java.lang.String getColumnName()
        Determines the unique column heading that may be used to identify a column instance. This name must be non-changing and is used to save/restore state information.
        Returns:
        the field instance name.
      • getColumnClass

        java.lang.Class<COLUMN_TYPE> getColumnClass()
        Determines the class of object that is associated with this field (column).
        Returns:
        the column class
      • getColumnPreferredWidth

        int getColumnPreferredWidth()
        Returns the preferred width for this column. Column should either return a valid positive preferred size or -1.
        Returns:
        the preferred width for this column.
      • getSupportedRowType

        java.lang.Class<ROW_TYPE> getSupportedRowType()
        Returns the single class type of the data that this table field can use to generate columnar data.
        Returns:
        the single class type of the data that this table field can use to generate columnar data.
      • getValue

        COLUMN_TYPE getValue​(ROW_TYPE rowObject,
                             Settings settings,
                             DATA_SOURCE data,
                             ServiceProvider serviceProvider)
                      throws java.lang.IllegalArgumentException
        Creates an object that is appropriate for this field (table column) and for the object that is associated with this row of the table.
        Parameters:
        rowObject - the object associated with the row in the table.
        settings - field settings
        data - the expected data object, as defined by the DATA_SOURCE type
        serviceProvider - the ServiceProvider associated with the table.
        Returns:
        the object for the model to display in the table cell.
        Throws:
        java.lang.IllegalArgumentException - if the rowObject is not one supported by this class.
      • getColumnRenderer

        GColumnRenderer<COLUMN_TYPE> getColumnRenderer()
        Returns the optional cell renderer for this column; null if no renderer is used.

        This method allows columns to define custom rendering. The interface returned here ensures that the text used for filtering matches what the users sees (via the GColumnRenderer.getFilterString(Object, Settings) method).

        Note: some types should not make use of the aforementioned filter string. These types include the Number wrapper types, Date and Enums. (This is because the filtering system works naturally with these types.) See GColumnRenderer.

        Returns:
        the renderer
      • getSettingsDefinitions

        SettingsDefinition[] getSettingsDefinitions()
        Returns a list of settings definitions for this field.
        Returns:
        list of settings definitions for this field.
      • getMaxLines

        int getMaxLines​(Settings settings)
        Gets the maximum number of text display lines needed for any given cell with the specified settings.
        Parameters:
        settings - field settings
        Returns:
        maximum number of lines needed
      • getColumnDisplayName

        java.lang.String getColumnDisplayName​(Settings settings)
        Determines the column heading that will be displayed.
        Parameters:
        settings -
        Returns:
        the field name to display as the column heading.
      • getColumnDescription

        java.lang.String getColumnDescription()
        Returns a description of this column. This may be used as a tooltip for the column header
        Returns:
        a description of this column. This may be used as a tooltip for the column header.
      • getUniqueIdentifier

        java.lang.String getUniqueIdentifier()
        Returns a value that is unique for this table column. This is different than getting the display name, which may be shared by different columns.
        Returns:
        the identifier
      • getComparator

        java.util.Comparator<COLUMN_TYPE> getComparator()
        If implemented, will return a comparator that knows how to sort values for this column. Implementors should return null if they do not wish to provider a comparator
        Returns:
        the comparator