Class AbstractListColumnBean<I,​V>

    • Field Detail

      • tooltip

        private String tooltip
      • property

        private String property
      • valueType

        private Type valueType
      • sortable

        private boolean sortable
      • sortProperty

        private String sortProperty
      • filterable

        private boolean filterable
      • filterProperty

        private String filterProperty
      • exportable

        private boolean exportable
      • exportProperty

        private String exportProperty
      • exportFormatter

        private Formatter<?> exportFormatter
      • formatter

        private Formatter<? super V> formatter
    • Constructor Detail

      • AbstractListColumnBean

        public AbstractListColumnBean()
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: ListColumnAction
        ID attribute of the column. This is requried and must be a unique id among all columns in the list.
        Specified by:
        getId in interface ListColumnAction<I,​V>
      • setId

        public void setId​(String id)
      • setClazz

        public void setClazz​(String clazz)
      • setStyle

        public void setStyle​(String style)
      • setTitle

        public void setTitle​(String title)
      • setTooltip

        public void setTooltip​(String tooltip)
      • getProperty

        public String getProperty()
        Description copied from interface: ListColumnAction
        The property name for referencing data in the column. This is optional but is needed to enable filtering, sorting and/or exporting.
        Specified by:
        getProperty in interface ListColumnAction<I,​V>
        Returns:
        The property or null
      • setProperty

        public void setProperty​(String property)
      • getValueType

        public Type getValueType()
        Description copied from interface: ListColumnAction
        The data type of the values that are referenced by the property. Required if a property has been set.
        Specified by:
        getValueType in interface ListColumnAction<I,​V>
        Returns:
        The data type of the values
      • setValueType

        public void setValueType​(Type valueType)
      • setSortable

        public void setSortable​(boolean sortable)
      • getSortProperty

        public String getSortProperty()
        Description copied from interface: ListColumnAction
        Override the default property when this column is used for sorting.
        Specified by:
        getSortProperty in interface ListColumnAction<I,​V>
        Returns:
        NULL if the default property should be used for sorting
      • setSortProperty

        public void setSortProperty​(String sortProperty)
      • setFilterable

        public void setFilterable​(boolean filterable)
      • getFilterProperty

        public String getFilterProperty()
        Description copied from interface: ListColumnAction
        Override the default property when this column is used for filtering.
        Specified by:
        getFilterProperty in interface ListColumnAction<I,​V>
        Returns:
        NULL if the default property should be used for filtering
      • setFilterProperty

        public void setFilterProperty​(String filterProperty)
      • isExportable

        public boolean isExportable()
        Description copied from interface: ListColumnAction
        A flag to indicate if it is possible to export this column with the generic table exporter or not. The export uses the default property unless it has been overridden by ListColumnAction.getExportProperty().
        Specified by:
        isExportable in interface ListColumnAction<I,​V>
        Returns:
        TRUE to enable exporting, FALSE to disable
      • setExportable

        public void setExportable​(boolean exportable)
      • getExportProperty

        public String getExportProperty()
        Description copied from interface: ListColumnAction
        Override the default property when this column is used for exporting.
        Specified by:
        getExportProperty in interface ListColumnAction<I,​V>
        Returns:
        NULL if the default property should be used for exporting
      • setExportProperty

        public void setExportProperty​(String exportProperty)
      • getEnumeration

        public Enumeration<String,​String> getEnumeration()
        Description copied from interface: ListColumnAction
        Get an enumeration of possible values that can be found in the column. This is used to generate a filter with a drop-down containing checkboxes for each option. If no enumeration is specified, a default filter input field is used.
        Specified by:
        getEnumeration in interface ListColumnAction<I,​V>
      • getFormatter

        public Formatter<? super V> getFormatter()
        Description copied from interface: ListColumnAction
        Get a formatter that converts the current value to a string that is displayed in the column. The string may include HTML that is required for proper display. The Formatter.format(Object) method is called once for every item that is listed in the table.
        Specified by:
        getFormatter in interface ListColumnAction<I,​V>
        Returns:
        A formatter, or null to simply use Object.toString()
      • setFormatter

        public void setFormatter​(Formatter<? super V> formatter)
      • getExportFormatter

        public Formatter<?> getExportFormatter()
        Description copied from interface: ListColumnAction
        Get a formatter that converts the exported value to a string that is written to the file. The Formatter.format(Object) method is called once for every item that is listed in the table.
        Specified by:
        getExportFormatter in interface ListColumnAction<I,​V>
        Returns:
        A formatter, or null to simply use Object.toString()
      • setExportFormatter

        public void setExportFormatter​(Formatter<?> exportFormatter)
      • getExportValue

        public Object getExportValue​(DbControl dc,
                                     I item)
        This implementation simply forward to ListColumnAction.getValue(DbControl, Object). If the exported value should be different from the regular value the subclass must override this method as well.
        Specified by:
        getExportValue in interface ListColumnAction<I,​V>
        Parameters:
        dc - An open DbControl than can be used to query the database
        item - The current item
        Returns:
        The value that should be exported