|
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.control.LyController
leon.control.LyAreaController
leon.control.LyPanelController
leon.control.LySimpleTableController
public abstract class LySimpleTableController
This class implements the basics of a table controller. It is used to factorize code between all table controllers. It is associated with a builder (LySimpleTableBuilder) and a behavior that implements LySimpleTableBehaviorInterface. There is no default implementation of this behavior.
LySimpleTableBuilder
,
LyTableBehaviorInterface
,
LyTableController
,
LyMultiPageTableController
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
DEMAND_CHOOSE_COLUMNS
Menu id : Choose columns. |
static java.lang.String |
DEMAND_COPY_CELL_CONTENT
Demand id : Copy cell content. |
static java.lang.String |
DEMAND_FIX_COLUMN
Menu id : Fix column. |
static java.lang.String |
DEMAND_GROUP_BY
Menu id : Group. |
static java.lang.String |
DEMAND_INVERT_STATUS_SORT
Menu id : Invert status sort. |
static java.lang.String |
DEMAND_LIST_DISPLAY
Display List |
static java.lang.String |
DEMAND_NEXT_PAGE
Menu id : Next page. |
static java.lang.String |
DEMAND_PREVIOUS_PAGE
Menu id : Previous page. |
static java.lang.String |
DEMAND_PRINT_TABLE
Menu id : Print list. |
static java.lang.String |
DEMAND_REVERSE
Menu id : Reverse list. |
static java.lang.String |
DEMAND_ROW_TOOL
Demand id : Row tool. |
static java.lang.String |
DEMAND_SORT_BY
Menu id : Simple Sort. |
static java.lang.String |
DEMAND_SORT_DEFAULT
Menu id : Default sort. |
static java.lang.String |
DEMAND_SORT_EXTEND
Menu id : Extended sort. |
static java.lang.String |
DEMAND_SORT_REVERSE
Menu id : Reverse sort. |
static java.lang.String |
DEMAND_SORT_WIZARD
Menu id : Sort Wizard. |
static java.lang.String |
DEMAND_STATUS_SORT
Menu id : Status sort. |
static java.lang.String |
DEMAND_SUB_TOOL_ACTION
Tool id : subtoolbar action. |
static java.lang.String |
DEMAND_UNFIX_COLUMN
Menu id : Unfix column. |
static java.lang.String |
EMPTY_CELL
Empty cell id. |
static java.lang.String |
FOOTER_ROW_PREFIX
Prefix used for footer row identifiers. |
static java.lang.String |
MESSAGE_OBJECTS_COUNT
Message id : Objects count. |
static java.lang.String |
SECTION_ROW_PREFIX
Prefix used for section row identifiers. |
Fields inherited from class leon.control.LyAreaController |
---|
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_APPLY, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW, DEMAND_VALIDATE |
Fields inherited from class leon.control.LyController |
---|
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP |
Constructor Summary | |
---|---|
LySimpleTableController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList context)
Constructor. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action occurs. |
boolean |
allowSortOnField(LyFieldInfo fieldInfo)
Indicates whether sort is allowed on multiple relations. |
LyRow |
buildRow(LyObject object,
LyInfoList<LyFieldInfo> fields,
LyInfoList<LyFieldInfo> statusFields)
Current builder of a new row. |
void |
clearTranslatedStringMap()
Clear the translated string map. |
void |
clearViewCache()
Clears all cached data for this controller (especially the view and the component). |
void |
completeMessages(LyMessages messages,
int level)
This method is invoked to enable the the area(s) to complete the message bar of the view and add its own message items. |
void |
dragDropDemand(LyDragDropDemand demand)
Invoked when a Drag & Drop occurs. |
boolean |
enablesMultiSelection()
Method that indicates if controlled panel enables multi-selection or not. |
void |
endFastFilter(LyController controller,
java.lang.String actionDemand,
java.lang.String filterValue,
LyFilter filter,
LyFieldInfo fieldInfo,
boolean extend)
The fast filter edition form is closed : notify registered listener. |
void |
endSort(LyController parent,
java.lang.String actionDemand,
LySort sort)
The sort edition form is closed : notify registered listener. |
int |
findObject(LyFindController find,
int from,
boolean next)
Find object in the table and select it. |
void |
fixColumn(int column)
Freeze or unFreeze a column. |
void |
free(LyController controller)
Free this controller. |
java.lang.Class<?> |
getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller. |
LyFilter |
getClassFilter()
Accessor on internal classFilter : filter always applied on data shown in view. |
LyClassInfo |
getClassInfo()
Class info : content description. |
int |
getColsNumberListDisplay()
Return the number of columns in display list. 1 column for status, 1 for first image field, 1 for field name, 1 for field value, 1 for each footer field. |
double |
getColumnSize(LyFieldInfo fieldInfo)
Get the colum size for a fieldInfo. |
LyInfoList<LyFieldInfo> |
getComplexFields()
Get complex fields. |
LyObjectList |
getContent()
Get content of the table. |
LyFieldInfo |
getFastFilterFieldInfo()
Gets initial fast filter field info : indicates to the fast filter controller the default filter field info. |
java.lang.String |
getFastFilterValue()
Gets initial fast filter value : indicates to the fast filter controller the default filter value. |
java.util.BitSet |
getFieldMarks()
Access to field marks used to build the controlled view. |
LyInfoList<LyFieldInfo> |
getFields()
Gets the list of fields being displayed in the columns of the table The default implementation uses the specified fieldsMarks or if specified the lists of fields given by the setFields method. |
int |
getLimit()
Gets limit parameter for pagination. |
LyPanel |
getPanelComponent()
Accessor to panel component. |
LyInfoList<LyFieldInfo> |
getRealFields()
Gets the list of real fields being displayed in the columns of the table The default implementation returns the list of fields given by the getFields method. |
LyObjectList |
getSelection()
Gets list of selected objects. |
LyObjectList |
getSelection(boolean sorted)
Gets list of selected objects. |
LySort |
getSort()
Gets current sort. |
LyInfoList<LyFieldInfo> |
getStatusFieldInfos()
Returns the list of field infos that represent the object status for this table. |
LyTable |
getTableComponent()
Accessor to the Table component. |
LyInfoList<LyFieldInfo> |
getTableComponentFields()
Return the list of fields displayed in the table component. |
LyInfoList<LyFieldInfo> |
getTableComponentFields(boolean classFieldsOnly)
Return the list of fields displayed in the table component. |
boolean |
hasDisplayListToggleButton()
Checks if we have to add toggle button. |
boolean |
hasPrintMode()
Checks if print mode is activated. |
boolean |
isDisplayList()
Says if table is in display list or not. |
boolean |
isDisplayListShowFields()
Says if we have to show fields in display list. |
boolean |
isFastFilterExtended()
Indicates if fast filter creation is an extension of current filter. |
boolean |
isFastFilterSet()
Indicates if a fast filter is set. |
boolean |
isFopMode()
Checks if fop mode is activated. |
boolean |
isImageColumn(LyInfoList<LyFieldInfo> fields)
Check if there is an image to display first in list display. |
boolean |
isStatusColumn(LyInfoList<LyFieldInfo> statusFields)
check if the status column exists. |
void |
menuDemand(LyMenuDemand demand)
Invoked when an menu item notification is sent to this listener. |
boolean |
objectAdded(LyWorkSpaceEvent event)
Called when an object is added in the dynamic object list. |
boolean |
objectChanged(LyWorkSpaceEvent event)
Called when an object has changed in the dynamic object list. |
boolean |
objectRemoved(LyWorkSpaceEvent event)
Called when an object is removed from the dynamic object list. |
boolean |
objectStateChanged(LyAdvancedWorkSpaceEvent event)
Called when an object state is changed. |
void |
print(int page)
Implementation of LyPrintListenerInterface. |
void |
printList()
Print the content of the list Run it asynchronous. |
void |
questionAnswer(boolean result,
java.lang.Object clientData)
Answer to a askQuestion request. |
void |
reset(boolean full)
Reset component. |
void |
run()
Starting printList request. |
void |
selectAllObjects(boolean select)
Select all objects in panel. |
void |
selectionDemand(LySelectionDemand demand)
Invoked when a selection occurs. |
void |
selectObject(LyObject object,
boolean select)
Select an object in the table. |
void |
selectObject(LyObject object,
boolean select,
boolean updateView,
boolean showSelected)
Select an object in the table. |
void |
selectObjects(LyObjectList objects,
boolean select)
Select all given objects in the table. |
int |
selectRow(LyFieldInfo fieldInfo,
java.lang.String pattern,
int from,
boolean next,
boolean substring,
boolean caseSensitive)
Select object in the panel for given parameters. |
void |
setClassFilter(LyFilter filter,
boolean reset)
Accessor on internal classFilter : filter always applied on data shown in view. |
void |
setFieldMarks(java.util.BitSet fieldMarks)
Set field marks used to build the controlled view. |
void |
setFields(LyInfoList<LyFieldInfo> fields)
Sets the displayed fields for this controller. |
void |
setFopMode(boolean status)
Set the fop mode to the given status |
void |
setPreference(LyPreference preference)
Sets the preference for this controller. |
void |
setPrintMode(boolean status)
(De)Activate print mode. |
void |
setSort(LySort sort)
Set current sort criteria on the view. |
void |
showObject(LyObject object)
Scrolls list to make the given object visible. |
java.lang.String |
translate(java.lang.String key)
Translate the given key to a displayable string. |
Methods inherited from class leon.control.LyPanelController |
---|
buildFilter, closeBorderPanel, endFilter, getFilter, getFilterController, getFilterEditorController, getPreference, getRefreshTime, isFilterActive, isHorizontal, objectUserEvent, setFilter, setIdle, setRefreshTime, updatePreferencesMenu, workSpaceEventsGrouped |
Methods inherited from class leon.control.LyController |
---|
activateViewDemand, demandPerformed, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, setBuilder, setBuilderClass, setLastModified, setName, setUserData, showError, showError, showWarning, updateViewFromValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyAdvancedWorkSpaceListener |
---|
objectUserEvent, workSpaceEventsGrouped |
Methods inherited from interface leon.control.LyFilterEndInterface |
---|
endFilter, getFilter |
Methods inherited from interface leon.control.LyFastFilterEndInterface |
---|
getFilter |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String DEMAND_PREVIOUS_PAGE
public static final java.lang.String DEMAND_NEXT_PAGE
public static final java.lang.String DEMAND_FIX_COLUMN
public static final java.lang.String DEMAND_UNFIX_COLUMN
public static final java.lang.String DEMAND_REVERSE
public static final java.lang.String DEMAND_SORT_BY
public static final java.lang.String DEMAND_SORT_EXTEND
public static final java.lang.String DEMAND_SORT_REVERSE
public static final java.lang.String DEMAND_SORT_DEFAULT
public static final java.lang.String DEMAND_STATUS_SORT
public static final java.lang.String DEMAND_INVERT_STATUS_SORT
public static final java.lang.String DEMAND_GROUP_BY
public static final java.lang.String MESSAGE_OBJECTS_COUNT
public static final java.lang.String DEMAND_PRINT_TABLE
public static final java.lang.String DEMAND_SUB_TOOL_ACTION
public static final java.lang.String DEMAND_CHOOSE_COLUMNS
public static final java.lang.String DEMAND_SORT_WIZARD
public static final java.lang.String DEMAND_ROW_TOOL
public static final java.lang.String DEMAND_COPY_CELL_CONTENT
public static final java.lang.String SECTION_ROW_PREFIX
public static final java.lang.String FOOTER_ROW_PREFIX
public static final java.lang.String EMPTY_CELL
public static final java.lang.String DEMAND_LIST_DISPLAY
Constructor Detail |
---|
public LySimpleTableController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList context)
session
- current session associated to the controller. The controller automatically
registers on the specified session.parent
- parent controller (or null for 'root' controller). Controller hierarchy
indicates a child controller (for example a dialog created from a main view)action
- related action. If an action is specified, the controller uses action
parameters (action name, action specific XML view description ...)classInfo
- class info for objects displayed in the list.context
- current context (may be null if the view is not contextual to a list of
objects).Method Detail |
---|
public java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public void setFieldMarks(java.util.BitSet fieldMarks)
fieldMarks
- marks to setpublic java.util.BitSet getFieldMarks()
public void reset(boolean full)
reset
in class LyPanelController
full
- Boolean indicating if a full reset (including reset of datas) is requiered or not
(only reset graphical area).public void free(LyController controller)
free
in class LyPanelController
controller
- parent controllerLyAreaController.free()
public void clearViewCache()
clearViewCache
in class LyAreaController
public void selectionDemand(LySelectionDemand demand)
selectionDemand
in class LyController
demand
- selection event created from the view. User interaction.LyController.demandPerformed(leon.view.event.LyDemand)
public void actionDemand(LyActionDemand demand)
actionDemand
in class LyPanelController
demand
- action event created from the view. User interaction.LyController.demandPerformed(leon.view.event.LyDemand)
public void dragDropDemand(LyDragDropDemand demand)
dragDropDemand
in class LyController
demand
- drag-drop demandpublic void menuDemand(LyMenuDemand demand)
This method overriden to create a popup menu : buildPopupMenu.
menuDemand
in class LyAreaController
demand
- demand parameters sent by the view component.LyController.demandPerformed(leon.view.event.LyDemand)
public boolean isStatusColumn(LyInfoList<LyFieldInfo> statusFields)
statusFields
- (optional) list of status fields
public boolean isImageColumn(LyInfoList<LyFieldInfo> fields)
fields
- Fields
public LyInfoList<LyFieldInfo> getStatusFieldInfos()
public boolean allowSortOnField(LyFieldInfo fieldInfo)
public void setSort(LySort sort)
sort
- new sort criteriapublic double getColumnSize(LyFieldInfo fieldInfo)
fieldInfo
- a fieldInfo
public void selectObject(LyObject object, boolean select)
selectObject
in class LyPanelController
object
- selected or unselected objectselect
- new selection statuspublic void selectObject(LyObject object, boolean select, boolean updateView, boolean showSelected)
object
- selected or unselected objectselect
- new selection statusupdateView
- indicates if we must update the viewsshowSelected
- indicates wether the view should scroll to the new selectionpublic void selectAllObjects(boolean select)
selectAllObjects
in class LyPanelController
select
- new selection statuspublic void selectObjects(LyObjectList objects, boolean select)
objects
- Objects to select/deselectselect
- new selection statuspublic void showObject(LyObject object)
object
- Object to be shown. If object is null, the first row is shown.public java.lang.String getFastFilterValue()
getFastFilterValue
in interface LyFastFilterEndInterface
public LyFieldInfo getFastFilterFieldInfo()
getFastFilterFieldInfo
in interface LyFastFilterEndInterface
public boolean isFastFilterExtended()
isFastFilterExtended
in interface LyFastFilterEndInterface
public boolean isFastFilterSet()
isFastFilterSet
in interface LyFastFilterEndInterface
public void fixColumn(int column)
column
- column index to fixpublic int findObject(LyFindController find, int from, boolean next)
findObject
in interface LyFindInterface
findObject
in class LyPanelController
find
- the find controllerfrom
- index to start from (-1 : begin)next
- find command is searching forward (next selection) or previous.
public int selectRow(LyFieldInfo fieldInfo, java.lang.String pattern, int from, boolean next, boolean substring, boolean caseSensitive)
fieldInfo
- the fieldinfopattern
- the pattern to selectfrom
- the start indexnext
- indicates the direction of the searchsubstring
- indicates if we look at substringcaseSensitive
- indicates if the search is case sensitive
public LyClassInfo getClassInfo()
getClassInfo
in interface LyGetClassInfoInterface
getClassInfo
in class LyAreaController
public LyObjectList getContent()
getContent
in class LyPanelController
public LyObjectList getSelection()
getSelection
in class LyPanelController
public LyObjectList getSelection(boolean sorted)
sorted
- True if selection list is given with current table sort, false if selection order is desired.
public LySort getSort()
getSort
in interface LySortEndInterface
public LyTable getTableComponent()
public LyPanel getPanelComponent()
getPanelComponent
in class LyPanelController
getTableComponent()
public LyInfoList<LyFieldInfo> getTableComponentFields()
public LyInfoList<LyFieldInfo> getTableComponentFields(boolean classFieldsOnly)
classFieldsOnly
- indicates whether only fields of current class info must be returned.
public boolean objectAdded(LyWorkSpaceEvent event)
objectAdded
in interface LyWorkSpaceListener
objectAdded
in class LyPanelController
event
- the workspace event
LyWorkSpaceListener.objectAdded(leon.data.LyWorkSpaceEvent)
public boolean objectRemoved(LyWorkSpaceEvent event)
objectRemoved
in interface LyWorkSpaceListener
objectRemoved
in class LyPanelController
event
- the workspace event
LyWorkSpaceListener.objectRemoved(leon.data.LyWorkSpaceEvent)
public boolean objectChanged(LyWorkSpaceEvent event)
objectChanged
in interface LyWorkSpaceListener
objectChanged
in class LyPanelController
event
- the workspace event
LyWorkSpaceListener.objectChanged(leon.data.LyWorkSpaceEvent)
public boolean objectStateChanged(LyAdvancedWorkSpaceEvent event)
objectStateChanged
in interface LyAdvancedWorkSpaceListener
objectStateChanged
in class LyPanelController
event
- Event notifying object state change.
LyAdvancedWorkSpaceListener.objectStateChanged(leon.data.LyAdvancedWorkSpaceEvent)
public LyRow buildRow(LyObject object, LyInfoList<LyFieldInfo> fields, LyInfoList<LyFieldInfo> statusFields)
object
- object added in the contextual list, and which should set the content of
row cells.fields
- list of fields which should be seen.statusFields
- list of fields which may set the status icon.
insertRow(leon.data.LyObject, int, boolean)
public boolean isDisplayList()
public boolean isDisplayListShowFields()
public LyInfoList<LyFieldInfo> getComplexFields()
public void completeMessages(LyMessages messages, int level)
completeMessages
in class LyAreaController
messages
- the messages to updatelevel
- the levelLyAreaBuilder.completeMessages(leon.view.LyMessages, int)
public LyInfoList<LyFieldInfo> getFields()
setFields(LyInfoList)
public LyInfoList<LyFieldInfo> getRealFields()
getFields()
public final java.lang.String translate(java.lang.String key)
key
- the string to translate
public final void clearTranslatedStringMap()
public void endFastFilter(LyController controller, java.lang.String actionDemand, java.lang.String filterValue, LyFilter filter, LyFieldInfo fieldInfo, boolean extend)
endFastFilter
in interface LyFastFilterEndInterface
controller
- reference to the fast filter controller (filter form which is closing)actionDemand
- actionDemand on filter controller : id of the command such as
LyFormController.DEMAND_VALIDATE, LyFormController.DEMAND_CANCELfilterValue
- the filter value that was typed in the formfilter
- the filter that was created in the formfieldInfo
- the fast filter field infoextend
- indicates if fast filter creation is an extension of current filter.public void endSort(LyController parent, java.lang.String actionDemand, LySort sort)
endSort
in interface LySortEndInterface
parent
- reference to the sort controller (sort form which is closing)actionDemand
- actionDemand on sort controller : id of the command such as
LyFormController.DEMAND_VALIDATE, LyFormController.DEMAND_APPLY,
LyFormController.DEMAND_CANCELsort
- the sort that was created in the formpublic void printList()
public void run()
run
in interface java.lang.Runnable
public void print(int page)
print
in interface LyPrintListenerInterface
page
- the page to printpublic LyFilter getClassFilter()
public void setClassFilter(LyFilter filter, boolean reset)
filter
- classFilter value, or null if no filter is set (default).reset
- indicates wheter the content is immediately calculated and view is refreshed.
This parameter should be true to recalculate content. This is useless only if
the content is explicitely reset by the application, using setContext for
instance.public void setFields(LyInfoList<LyFieldInfo> fields)
fields
- List of fields to display in the table. If null, return to default list of
fields.public boolean enablesMultiSelection()
enablesMultiSelection
in class LyPanelController
public void setPreference(LyPreference preference)
setPreference
in class LyPanelController
preference
- the preference to setpublic int getLimit()
public void setPrintMode(boolean status)
setPrintMode
in interface LySetPrintModeInterface
status
- true if printing is active, false otherwise.public final boolean hasPrintMode()
public final void setFopMode(boolean status)
status
- the new fop statuspublic final boolean isFopMode()
public final boolean hasDisplayListToggleButton()
public void questionAnswer(boolean result, java.lang.Object clientData)
questionAnswer
in interface LyQuestionAnswerInterface
questionAnswer
in class LyPanelController
result
- true if the user has clicked on Yes or Okclient
- data specified in the askQuestion methodLyQuestionAnswerInterface
public int getColsNumberListDisplay()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |