|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.app.behavior.LyBehavior
leon.app.behavior.LyActionBehavior
leon.app.behavior.LyPanelBehavior
leon.app.behavior.LyTableBehavior
public class LyTableBehavior
This class implements the default behavior for a table controller.
LyTableController
,
LyTableBehaviorInterface
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
static short |
MAX_ROW_HEIGHT
Max row height. |
Constructor Summary | |
---|---|
LyTableBehavior()
Default constructor. |
Method Summary | |
---|---|
LyComponent |
buildRowItem(LySimpleTableController tableController,
LyObject object,
LyFieldInfo fieldInfo)
Current builder of a new cell in a row. |
void |
completeRow(LySimpleTableController tableController,
LyRow row,
LyObject object)
Completes the given row that corresponds to specified object. |
void |
dragFinished(LySimpleTableController tableController,
int type)
Method called at the end of a drag-and-drop. |
void |
dragStart(LySimpleTableController tableController,
LyObject draggedObject)
Method invoked at the beginning of the given object drag. |
void |
drop(LySimpleTableController tableController,
LyObject droppedObject,
LyObject draggedObject)
Method called when the given dragged object is dropped on the given dropped object. |
boolean |
enableGroupBy(LySimpleTableController tableController,
LyFieldInfo fieldInfo)
Enables groupBy feature on given field info. |
java.lang.String |
getCellImage(LySimpleTableController tableController,
LyObject object,
LyFieldInfo fieldInfo,
java.lang.String newLabel)
Gets the cell image representing the value of the specified field info for the given object. |
java.lang.String |
getCellLabel(LySimpleTableController controller,
LyObject object,
LyFieldInfo fieldInfo)
Deprecated. Use LyTableBehaviorInterface.updateCell(LySimpleTableController, LyCell,
LyObject, LyFieldInfo) instead. |
java.lang.String |
getCellLabel(LySimpleTableController controller,
LyObject object,
LyFieldInfo fieldInfo,
java.lang.Object value)
Gets the cell label representing the value of the given field info for the given object. |
java.lang.String |
getCellObjectId(LySimpleTableController controller,
LyObject object,
LyFieldInfo fieldInfo)
Gets the cell object id that displays the value of the given field info for the given object. |
LyInfoList<LyFieldInfo> |
getChooseColumnsFieldInfos(LySimpleTableController controller)
Gets the list of fieldinfos that may be displayed in the column chooser tool. |
double |
getColumnWidth(LySimpleTableController controller,
LyFieldInfo fieldInfo)
Gets the initial column width of a fieldInfo in a table. |
LyWorkSpace |
getContent(LyTableController tableController,
LyWorkSpace context)
Gets the content of the table corresponding of the given context. |
LySortCriterion |
getDefaultCriterion(LySimpleTableController tableController,
LyFieldInfo fieldInfo)
Return default criterion for a given field info. |
LyInfoList<LyFieldInfo> |
getDependsFieldInfos(LySimpleTableController tableController,
LyAction action)
Gets the list of fieldinfos that will be used to compute/display values for the table. |
LyFileFieldInfo |
getDisplayListFirstImage(LySimpleTableController tableController)
Gives the image to display in first column in list display. |
LyInfoList<LyFieldInfo> |
getFields(LySimpleTableController tableController,
LyInfoList<LyFieldInfo> fields)
Gets the list of fields to display in the table from the given list. |
java.lang.String |
getFooterLabel(LySimpleTableController controller,
LyFieldInfo fieldInfo,
LyObjectList objects)
Gets the footer label associated to the given field info for the given list of objects presented in the table. |
java.lang.String |
getGroupColor(LySimpleTableController tableController,
LyObject object,
LyFieldInfoValue value)
Gets row color associated to the given group. |
java.lang.String |
getGroupLabel(LySimpleTableController tableController,
LyObject object,
LyFieldInfoValue value)
Gets group name for given value on specified object. |
java.lang.String |
getHeaderLabel(LySimpleTableController controller,
LyFieldInfo fieldInfo)
Gets the header label representing the given field info. |
java.lang.String |
getHeaderTooltip(LySimpleTableController controller,
LyFieldInfo fieldInfo)
Gets the header tooltip associated to the given field info. |
java.lang.String |
getIndex(LySimpleTableController tableController,
LyObject object)
Gets index for object. |
java.lang.String |
getLabel(LySimpleTableController tableController,
LyObject object)
Gets label for object. |
LyInfoList<LyFieldInfo> |
getLoadedFieldInfos(LySimpleTableController controller)
Gets the list of fieldinfos that must be loaded in the given table controller. |
java.lang.String |
getRowColor(LySimpleTableController controller,
LyObject object)
Gets row color associated to the given object. |
java.lang.String |
getRowImage(LySimpleTableController tableController,
LyObject object)
Gets the row image of the given table object used on display list mode. |
java.lang.String[] |
getShortLabel(LySimpleTableController controller,
LyObject object,
LyFieldInfo fieldInfo,
java.lang.Object value)
Gets short label of an object, for specified field info and value. |
java.lang.String |
getStatusImage(LySimpleTableController controller,
LyInfoList<LyFieldInfo> statusFields,
LyObject object)
Gets the status image of the given object. |
java.lang.String |
getStatusTooltip(LySimpleTableController tableController,
LyInfoList<LyFieldInfo> statusFields,
LyObject object)
Gets status image tooltip for the given object. |
void |
selectionChanged(LySimpleTableController controller)
Method called when the selection has changed in the view. |
void |
updateCell(LySimpleTableController tableController,
LyCell cell,
LyObject object,
LyFieldInfo fieldInfo)
Updates the label of the given cell for the given object and fieldinfo. |
void |
updateRowItem(LySimpleTableController tableController,
LyComponent component,
LyObject object,
LyFieldInfo fieldInfo)
Updates the given component for the given object and fieldinfo. |
LySort |
validateSort(LySimpleTableController tableController,
LySort sort)
Method used to enable a sort. |
Methods inherited from class leon.app.behavior.LyPanelBehavior |
---|
completePopupMenu, getPopupMenuActions, getTitle, needRefresh, validateFilter |
Methods inherited from class leon.app.behavior.LyActionBehavior |
---|
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, reset, startAction |
Methods inherited from class leon.app.behavior.LyBehavior |
---|
free, getSession, handleDemand, init |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.app.behaviorinterface.LyPanelBehaviorInterface |
---|
completePopupMenu, getPopupMenuActions, needRefresh, validateFilter |
Methods inherited from interface leon.app.behaviorinterface.LyActionBehaviorInterface |
---|
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction |
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface |
---|
free, handleDemand, init |
Field Detail |
---|
public static final java.lang.String __VERSION
public static short MAX_ROW_HEIGHT
Constructor Detail |
---|
public LyTableBehavior()
Method Detail |
---|
public LyInfoList<LyFieldInfo> getFields(LySimpleTableController tableController, LyInfoList<LyFieldInfo> fields)
getFields
in interface LyTableBehaviorInterface
tableController
- the table controller that requires the listfields
- a list of fields from where fields to display are taken
public java.lang.String getStatusImage(LySimpleTableController controller, LyInfoList<LyFieldInfo> statusFields, LyObject object)
getStatusImage
in interface LyTableBehaviorInterface
controller
- Table controller that requires the status image.statusFields
- List of field infos that have the status mark.object
- Object to which the status image is associated.
public java.lang.String getStatusTooltip(LySimpleTableController tableController, LyInfoList<LyFieldInfo> statusFields, LyObject object)
getStatusImage(LySimpleTableController, LyInfoList,
LyObject)
method didn't return null.
getStatusTooltip
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the status image.statusFields
- List of field infos that have the status mark.object
- Object to which the status image is associated.
public java.lang.String getRowColor(LySimpleTableController controller, LyObject object)
getRowColor
in interface LyTableBehaviorInterface
controller
- Table controller that requires the row color.object
- Object for which a row color is required.
public java.lang.String getRowImage(LySimpleTableController tableController, LyObject object)
getRowImage
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the row image.object
- Object to which the row image is associated.
public java.lang.String getHeaderLabel(LySimpleTableController controller, LyFieldInfo fieldInfo)
field internal alias
is it is not null, else
returns the field info label of type name if it is not null, else returns the field alias
.
getHeaderLabel
in interface LyTableBehaviorInterface
controller
- Table controller that requires the header label.fieldInfo
- Field info for which a header label is required.
public java.lang.String getHeaderTooltip(LySimpleTableController controller, LyFieldInfo fieldInfo)
getHeaderTooltip
in interface LyTableBehaviorInterface
controller
- Table controller that requires the header tooltip.fieldInfo
- Field info for which a header tooltip is required.
public java.lang.String getCellLabel(LySimpleTableController controller, LyObject object, LyFieldInfo fieldInfo)
LyTableBehaviorInterface.updateCell(LySimpleTableController, LyCell,
LyObject, LyFieldInfo)
instead.
getCellLabel(controller, object, fieldInfo, object.getValue(fieldInfo))
otherwise.
getCellLabel
in interface LyTableBehaviorInterface
controller
- Table controller that requires the cell label.object
- Object from which the field info value is represented in the table
cell.fieldInfo
- Field info for which a cell label is required.
getCellLabel(LySimpleTableController, LyObject, LyFieldInfo, Object)
public java.lang.String getCellLabel(LySimpleTableController controller, LyObject object, LyFieldInfo fieldInfo, java.lang.Object value)
short label)
list. Else if the field is an array, builds a label with sub fields label.
getCellLabel
in interface LyTableBehaviorInterface
controller
- the table controller that requires the cell labelobject
- the object from which the field info value is represented in the table
cellfieldInfo
- the field info for which a cell label is requiredvalue
- the given field value
LyTableBehaviorInterface.updateCell(LySimpleTableController,LyCell,LyObject,LyFieldInfo)
public java.lang.String[] getShortLabel(LySimpleTableController controller, LyObject object, LyFieldInfo fieldInfo, java.lang.Object value)
controller
- the table controllerobject
- list of Object for which a short label is required.fieldInfo
- field info.value
- the given field value
public java.lang.String getCellObjectId(LySimpleTableController controller, LyObject object, LyFieldInfo fieldInfo)
controller
- Table controller that requires the cell.object
- Object from which the field info value is represented in the table cell.fieldInfo
- Field info for which a cell is required.
public void updateCell(LySimpleTableController tableController, LyCell cell, LyObject object, LyFieldInfo fieldInfo)
updateCell
in interface LyTableBehaviorInterface
tableController
- the table controller that requires the cell labelcell
- the cell to updateobject
- the object from which the field info value is represented in the table
cellfieldInfo
- the field info for which a cell label is requiredpublic java.lang.String getCellImage(LySimpleTableController tableController, LyObject object, LyFieldInfo fieldInfo, java.lang.String newLabel)
tableController
- Table controller that requires the cell image.object
- Object from which the field info value is represented in the table
cell.fieldInfo
- Field info for which a cell image is required.newLabel
- Value of the field info given as a string.
public java.lang.String getFooterLabel(LySimpleTableController controller, LyFieldInfo fieldInfo, LyObjectList objects)
getFooterLabel
in interface LyTableBehaviorInterface
controller
- Table controller that requires the footer label.fieldInfo
- Field info for which a footer label is required.objects
- List of objects for which a footer label is computed.
LyFieldInfo.compute(LyObjectList)
public void selectionChanged(LySimpleTableController controller)
selectionChanged
in interface LyTableBehaviorInterface
controller
- the current table controllerpublic LyWorkSpace getContent(LyTableController tableController, LyWorkSpace context)
getContent
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the content.context
- Context for which the content is required.
public LyInfoList<LyFieldInfo> getLoadedFieldInfos(LySimpleTableController controller)
status mark
and all fieldinfos that are displayed in the table.
getLoadedFieldInfos
in interface LyTableBehaviorInterface
controller
- Table controller that requires the list.
public LyInfoList<LyFieldInfo> getDependsFieldInfos(LySimpleTableController tableController, LyAction action)
loaded
fields.
getDependsFieldInfos
in interface LyTableBehaviorInterface
tableController
- the associated table controlleraction
- the table action
getLoadedFieldInfos(LySimpleTableController)
public LyInfoList<LyFieldInfo> getChooseColumnsFieldInfos(LySimpleTableController controller)
getChooseColumnsFieldInfos
in interface LyTableBehaviorInterface
controller
- Table controller that requires the list.
public double getColumnWidth(LySimpleTableController controller, LyFieldInfo fieldInfo)
getColumnWidth
in interface LyTableBehaviorInterface
controller
- Table controller that requires the list.fieldInfo
- fieldInfo associated to this column.
public void dragStart(LySimpleTableController tableController, LyObject draggedObject)
dragStart
in interface LyTableBehaviorInterface
tableController
- Table controller that displays the tabledraggedObject
- dragged objectpublic void drop(LySimpleTableController tableController, LyObject droppedObject, LyObject draggedObject)
drop
in interface LyTableBehaviorInterface
tableController
- table controller that displays the tabledroppedObject
- object on where the dragged object is droppeddraggedObject
- the dragged objectpublic void dragFinished(LySimpleTableController tableController, int type)
dragFinished
in interface LyTableBehaviorInterface
tableController
- table controller that displays the treetype
- drag-and-drop type (org.eclipse.swt.dnd.DND#DROP_COPY
or
org.eclipse.swt.dnd.DND#DROP_MOVE
)public LySort validateSort(LySimpleTableController tableController, LySort sort)
validateSort
in interface LyTableBehaviorInterface
tableController
- Table controller that asks for the sort.sort
- The sort that is asked.
public boolean enableGroupBy(LySimpleTableController tableController, LyFieldInfo fieldInfo)
enableGroupBy
in interface LyTableBehaviorInterface
tableController
- the table controllerfieldInfo
- Field info that is checked for groupBy feature.
public java.lang.String getGroupLabel(LySimpleTableController tableController, LyObject object, LyFieldInfoValue value)
getGroupLabel
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the group value label.object
- Object from which the group is requested.value
- Field value for which the group is requested.
public java.lang.String getGroupColor(LySimpleTableController tableController, LyObject object, LyFieldInfoValue value)
getGroupColor
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the row color.object
- Group for which a row color is asked.value
- the value needed to compute the color
public LyComponent buildRowItem(LySimpleTableController tableController, LyObject object, LyFieldInfo fieldInfo)
buildRowItem
in interface LyTableBehaviorInterface
tableController
- Table controller that requires the new row item.object
- object added in the contextual list, and which should set the content of row
cells.fieldInfo
- field value shown in the cell content
public void updateRowItem(LySimpleTableController tableController, LyComponent component, LyObject object, LyFieldInfo fieldInfo)
updateRowItem
in interface LyTableBehaviorInterface
tableController
- the table controller that requires the updatecomponent
- the component to update.object
- the object from which the field info value is represented in the table.fieldInfo
- the field info for which a component is updated.public void completeRow(LySimpleTableController tableController, LyRow row, LyObject object)
completeRow
in interface LyTableBehaviorInterface
tableController
- the table controller that requires the completion.row
- the row to be completed.object
- the object that corresponds to the row.public LyFileFieldInfo getDisplayListFirstImage(LySimpleTableController tableController)
getDisplayListFirstImage
in interface LyTableBehaviorInterface
tableController
- the table controller.
LyFileFieldInfo
which contains the image else return nullpublic java.lang.String getLabel(LySimpleTableController tableController, LyObject object)
getLabel
in interface LyTableBehaviorInterface
tableController
- the table controller.object
- Object for which the label is requested.
public java.lang.String getIndex(LySimpleTableController tableController, LyObject object)
getIndex
in interface LyTableBehaviorInterface
tableController
- the table controller.object
- Object for which the index is requested.
public LySortCriterion getDefaultCriterion(LySimpleTableController tableController, LyFieldInfo fieldInfo)
getDefaultCriterion
in interface LyTableBehaviorInterface
tableController
- the table controller.fieldInfo
- the field info we want to get the criterion
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |