org.olat.core.gui.components.table
Interface ColumnDescriptor

All Known Implementing Classes:
BooleanColumnDescriptor, ChecklistMultiSelectColumnDescriptor, CustomRenderColumnDescriptor, DefaultColumnDescriptor, RepositoryEntryTypeColumnDescriptor, StaticColumnDescriptor, ThreadColumnDescriptor, TotalAwareColumnDescriptor

public interface ColumnDescriptor

Description:
TODO: Class Description for ColumnDescriptor

Author:
Felix Jost

Field Summary
static int ALIGNMENT_CENTER
          means text output of this column should be centered
static int ALIGNMENT_LEFT
          means text output of this column should be aligned to the left (default)
static int ALIGNMENT_RIGHT
          means text output of this column should be aligned to the right
 
Method Summary
 int compareTo(int rowa, int rowb)
           
 java.lang.String getAction(int row)
          gets the action code for the column, null if no action
 int getAlignment()
           
 java.lang.String getHeaderKey()
           
 HrefGenerator getHrefGenerator()
           
 java.lang.String getPopUpWindowAttributes()
           
 boolean isPopUpWindowAction()
           
 boolean isSortingAllowed()
           
 void modelChanged()
          called by the table if the model has changed.
 void otherColumnDescriptorSorted()
          called when this columnDescriptor is not being sorted by the user, but another columnDescriptor.
 void renderValue(StringOutput sb, int row, Renderer renderer)
           
 void setHrefGenerator(HrefGenerator h)
           
 void setTable(Table table)
           
 void sortingAboutToStart()
          called before the actual sorting calls with compareTo(int rowa, int rowb) take place
 java.lang.String toString(int rowid)
          String represenation of the value at specified row
 boolean translateHeaderKey()
           
 

Field Detail

ALIGNMENT_RIGHT

static final int ALIGNMENT_RIGHT
means text output of this column should be aligned to the right

See Also:
Constant Field Values

ALIGNMENT_CENTER

static final int ALIGNMENT_CENTER
means text output of this column should be centered

See Also:
Constant Field Values

ALIGNMENT_LEFT

static final int ALIGNMENT_LEFT
means text output of this column should be aligned to the left (default)

See Also:
Constant Field Values
Method Detail

getHeaderKey

java.lang.String getHeaderKey()
Returns:
the key of the header of this column. Is translated by the translator of the table to which this columndescriptor belongs to.

translateHeaderKey

boolean translateHeaderKey()
Returns:
true if the header key should be translated by the renderer, otherwise false

getAlignment

int getAlignment()
Returns:

renderValue

void renderValue(StringOutput sb,
                 int row,
                 Renderer renderer)
Parameters:
sb -
row -
renderer - the Renderer. if null this means that the renderValue should be in plain text (e.g. for excel download)

compareTo

int compareTo(int rowa,
              int rowb)
Parameters:
rowa -
rowb -
Returns:

setTable

void setTable(Table table)
Parameters:
table - the backreference to the table

getAction

java.lang.String getAction(int row)
gets the action code for the column, null if no action

Parameters:
row - the current row
Returns:

modelChanged

void modelChanged()
called by the table if the model has changed. Useful in combination with sortingAboutToStart() to know when sortingAboutToStart() can use the cache or when it has to resort again


sortingAboutToStart

void sortingAboutToStart()
called before the actual sorting calls with compareTo(int rowa, int rowb) take place


otherColumnDescriptorSorted

void otherColumnDescriptorSorted()
called when this columnDescriptor is not being sorted by the user, but another columnDescriptor. usage: e.g. so getRenderValue(int row) can deliver different results w/o being active (formatting or such)


isSortingAllowed

boolean isSortingAllowed()
Returns:
true if this column should offer sorting (by clicking on the column header)

isPopUpWindowAction

boolean isPopUpWindowAction()
Returns:
true if the action link should open in a new window using java script

getPopUpWindowAttributes

java.lang.String getPopUpWindowAttributes()
Returns:
javascript window.open attributes or null if browsers default should be used

setHrefGenerator

void setHrefGenerator(HrefGenerator h)
Parameters:
h -

getHrefGenerator

HrefGenerator getHrefGenerator()

toString

java.lang.String toString(int rowid)
String represenation of the value at specified row

Parameters:
rowid -
Returns: