|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.components.table.DefaultColumnDescriptor
public class DefaultColumnDescriptor
Description:
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_POPUP_ATTRIBUTES
|
| Fields inherited from interface org.olat.core.gui.components.table.ColumnDescriptor |
|---|
ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT |
| Constructor Summary | |
|---|---|
DefaultColumnDescriptor(java.lang.String headerKey,
int dataColumn,
java.lang.String action,
java.util.Locale locale)
Constructor for table default column descriptor |
|
DefaultColumnDescriptor(java.lang.String headerKey,
int dataColumn,
java.lang.String action,
java.util.Locale locale,
int alignment)
|
|
| Method Summary | |
|---|---|
int |
compareTo(int rowa,
int rowb)
is called repeatedly caused by Collections.sort(...); |
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.util.Locale |
getLocale()
|
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 |
setAlignment(int alignment)
Sets the alignment. |
void |
setHrefGenerator(HrefGenerator hrefGenerator)
|
void |
setIsPopUpWindowAction(boolean popUpWindowAction,
java.lang.String popUpWindowAttributes)
TODO:fj:b replace with PopupObject which is easily configurable Optional action link configuration |
void |
setTable(Table table)
|
void |
setTranslateHeaderKey(boolean translateHeaderKey)
|
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()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_POPUP_ATTRIBUTES
| Constructor Detail |
|---|
public DefaultColumnDescriptor(java.lang.String headerKey,
int dataColumn,
java.lang.String action,
java.util.Locale locale)
headerKey - translation key for column headerdataColumn - position of columnaction - name of event that should be fired when rows column is clicken. null allowed for no actionlocale - the users locale
public DefaultColumnDescriptor(java.lang.String headerKey,
int dataColumn,
java.lang.String action,
java.util.Locale locale,
int alignment)
headerKey - dataColumn - action - locale - used ONLY for method getRenderValue in case the Object is of type Date to provide locale-sensitive Date formattingalignment - left, middle or right; constants in ColumnDescriptor| Method Detail |
|---|
public java.lang.String getHeaderKey()
getHeaderKey in interface ColumnDescriptorColumnDescriptor.getHeaderKey()public boolean translateHeaderKey()
translateHeaderKey in interface ColumnDescriptortrue if the header key should be translated by the
renderer, otherwise falsepublic void setTranslateHeaderKey(boolean translateHeaderKey)
public void renderValue(StringOutput sb,
int row,
Renderer renderer)
renderValue in interface ColumnDescriptorrenderer - the Renderer. if null this means that the renderValue
should be in plain text (e.g. for excel download)ColumnDescriptor.renderValue(org.olat.core.gui.render.StringOutput, int, org.olat.core.gui.render.Renderer)public int getAlignment()
getAlignment in interface ColumnDescriptorColumnDescriptor.getAlignment()
public int compareTo(int rowa,
int rowb)
compareTo in interface ColumnDescriptorColumnDescriptor.compareTo(int, int)public void setTable(Table table)
setTable in interface ColumnDescriptortable - the backreference to the tableColumnDescriptor.setTable(org.olat.core.gui.components.table.Table)public java.lang.String getAction(int row)
ColumnDescriptor
getAction in interface ColumnDescriptorrow - the current row
ColumnDescriptor.getAction(int)public void setAlignment(int alignment)
alignment - The alignment to setpublic void modelChanged()
ColumnDescriptor
modelChanged in interface ColumnDescriptorColumnDescriptor.modelChanged()public void sortingAboutToStart()
ColumnDescriptor
sortingAboutToStart in interface ColumnDescriptorColumnDescriptor.sortingAboutToStart()public void otherColumnDescriptorSorted()
ColumnDescriptor
otherColumnDescriptorSorted in interface ColumnDescriptorColumnDescriptor.otherColumnDescriptorSorted()public boolean isSortingAllowed()
isSortingAllowed in interface ColumnDescriptorColumnDescriptor.isSortingAllowed()public java.util.Locale getLocale()
public boolean isPopUpWindowAction()
isPopUpWindowAction in interface ColumnDescriptorColumnDescriptor.isPopUpWindowAction()public java.lang.String getPopUpWindowAttributes()
getPopUpWindowAttributes in interface ColumnDescriptorColumnDescriptor.getPopUpWindowAttributes()
public void setIsPopUpWindowAction(boolean popUpWindowAction,
java.lang.String popUpWindowAttributes)
popUpWindowAction - true: action link will open in new window, false: action opens in current windowpopUpWindowAttributes - javascript window.open attributes or null if default values are used
e.g. something like this: "height=600, width=600, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no"public HrefGenerator getHrefGenerator()
getHrefGenerator in interface ColumnDescriptorpublic void setHrefGenerator(HrefGenerator hrefGenerator)
setHrefGenerator in interface ColumnDescriptorhrefGenerator - The hrefGenerator to set.public java.lang.String toString(int rowid)
ColumnDescriptor
toString in interface ColumnDescriptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||