org.olat.core.gui.components.table
Class BooleanColumnDescriptor

java.lang.Object
  extended by org.olat.core.gui.components.table.DefaultColumnDescriptor
      extended by org.olat.core.gui.components.table.BooleanColumnDescriptor
All Implemented Interfaces:
ColumnDescriptor

public class BooleanColumnDescriptor
extends DefaultColumnDescriptor

Description:
TODO: Class Description for

Author:
Felix Jost

Field Summary
 
Fields inherited from class org.olat.core.gui.components.table.DefaultColumnDescriptor
DEFAULT_POPUP_ATTRIBUTES
 
Fields inherited from interface org.olat.core.gui.components.table.ColumnDescriptor
ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT
 
Constructor Summary
BooleanColumnDescriptor(java.lang.String headerKey, int datacolumn, java.lang.String trueValue, java.lang.String falseValue)
          constructor for the columndescriptor with no action (column is not clickable)
BooleanColumnDescriptor(java.lang.String headerKey, int datacolumn, java.lang.String action, java.lang.String trueValue, java.lang.String falseValue)
           
 
Method Summary
 java.lang.String getAction(int row)
          gets the action code for the column, null if no action
 boolean isSortingAllowed()
           
 void renderValue(StringOutput sb, int row, Renderer renderer)
           
 void setSortingAllowed(boolean sortingAllowed)
          allow column sorting or not, default is true
 java.lang.String toString(int rowid)
          String represenation of the value at specified row
 
Methods inherited from class org.olat.core.gui.components.table.DefaultColumnDescriptor
compareTo, getAlignment, getHeaderKey, getHrefGenerator, getLocale, getPopUpWindowAttributes, isPopUpWindowAction, modelChanged, otherColumnDescriptorSorted, setAlignment, setHrefGenerator, setIsPopUpWindowAction, setTable, setTranslateHeaderKey, sortingAboutToStart, translateHeaderKey
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanColumnDescriptor

public BooleanColumnDescriptor(java.lang.String headerKey,
                               int datacolumn,
                               java.lang.String trueValue,
                               java.lang.String falseValue)
constructor for the columndescriptor with no action (column is not clickable)

Parameters:
headerKey - Key for internationalizable header title
datacolumn - position in table
trueValue - Text string if result is true
falseValue - Text string if result is false

BooleanColumnDescriptor

public BooleanColumnDescriptor(java.lang.String headerKey,
                               int datacolumn,
                               java.lang.String action,
                               java.lang.String trueValue,
                               java.lang.String falseValue)
Parameters:
headerKey - Key for internationalizable header title
datacolumn - position in table
action - action for true value (rendered as link)
trueValue - Text string if result is true
falseValue - Text string if result is false
Method Detail

renderValue

public void renderValue(StringOutput sb,
                        int row,
                        Renderer renderer)
Specified by:
renderValue in interface ColumnDescriptor
Overrides:
renderValue in class DefaultColumnDescriptor
renderer - the Renderer. if null this means that the renderValue should be in plain text (e.g. for excel download)
See Also:
ColumnDescriptor.renderValue(org.olat.core.gui.render.StringOutput, int, org.olat.core.gui.render.Renderer)

getAction

public java.lang.String getAction(int row)
Description copied from interface: ColumnDescriptor
gets the action code for the column, null if no action

Specified by:
getAction in interface ColumnDescriptor
Overrides:
getAction in class DefaultColumnDescriptor
Parameters:
row - the current row
Returns:
See Also:
ColumnDescriptor.getAction(int)

toString

public java.lang.String toString(int rowid)
Description copied from interface: ColumnDescriptor
String represenation of the value at specified row

Specified by:
toString in interface ColumnDescriptor
Overrides:
toString in class DefaultColumnDescriptor
Returns:

isSortingAllowed

public boolean isSortingAllowed()
Specified by:
isSortingAllowed in interface ColumnDescriptor
Overrides:
isSortingAllowed in class DefaultColumnDescriptor
Returns:
true if this column should offer sorting (by clicking on the column header)
See Also:
ColumnDescriptor.isSortingAllowed()

setSortingAllowed

public void setSortingAllowed(boolean sortingAllowed)
allow column sorting or not, default is true

Parameters:
sortingAllowed -