|
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
leon.control.LyTableController
leon.control.LyMultiPageTableController
leon.control.LyEditTableController
public class LyEditTableController
This class implements an editable table controller. Fields displayed in the table may be modified automatically. It is associated with a builder (LyTableBuilder) and a behavior that implements LyTableBehaviorInterface. Usually, this behavior is implemented by an instance of LyTableBehavior
LySimpleTableBuilder
,
LyTableController
,
LyTableBehaviorInterface
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
DEMAND_ALT_ADD
Demand id : ALT+ADD key demand. |
static java.lang.String |
DEMAND_ALT_DOWN
Demand id : ALT+DOWN key demand. |
static java.lang.String |
DEMAND_ALT_LEFT
Demand id : ALT+LEFT key demand. |
static java.lang.String |
DEMAND_ALT_RIGHT
Demand id : ALT+RIGHT key demand. |
static java.lang.String |
DEMAND_ALT_UP
Demand id : ALT+UP key demand. |
static java.lang.String |
DEMAND_CANCEL_ROW
Demand id : Cancel row. |
static java.lang.String |
DEMAND_COPY_CELLS
Demand id : Copy cells. |
static java.lang.String |
DEMAND_PASTE_CELLS
Demand id : Paste cells. |
static java.lang.String |
DEMAND_RESTORE
Restore inputs. |
static java.lang.String |
DEMAND_VALIDATE_ROW
Demand id : Validate row. |
static int |
MAX_COLUMN_WIDTH
Max column width |
static boolean |
TOOLBAR_FOR_UNCHANGED_OBJECTS
Indicates if a toolbar is visible for unchanged objects |
Fields inherited from class leon.control.LyMultiPageTableController |
---|
IMPACT_OUTSIDE_OF_CURRENT_VIEW, SELECT_PAGE |
Fields inherited from class leon.control.LyTableController |
---|
MAX_OBJECTS_COUNT_FOR_CONTEXT_FILTER |
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 | |
---|---|
LyEditTableController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList context)
Constructor. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action notification is sent to this listener. |
LyRow |
buildRow(LyObject object,
LyInfoList<LyFieldInfo> fields,
LyInfoList<LyFieldInfo> statusFields)
Current builder of a new row. |
boolean |
canBeEditable(LyFieldInfo fieldInfo)
Checks if given field info can be editable or not. |
void |
clearViewCache()
Clears all cached data for this controller (especially the view and the component). |
boolean |
enableShowMessage()
Indicates wether an error message may be shown or not. |
void |
enableShowMessage(boolean status)
Indicates wether an error message may be shown or not. |
short |
endValidate()
Internal use. |
void |
free(LyController controller)
Free this controller on request of the specified controller. |
LyObjectList |
getContent()
Get content of the table. |
int |
getDisplayListDataIndex()
Get index of fields value column. |
LyFieldInfo |
getFieldInfoDisplayList(int colIndex)
Get index of fieldInfo in fields when in list mode. |
LyEditTableSetController |
getInternalCreateController()
Internal create controlle: for internal use only. |
java.lang.String |
getModificationsColor()
Get the color resource for cells containing modifications. |
LyEditTableSetController |
getSetController(LyObject object)
For internal use, maintain a list of setControllers related to objects being modified. |
java.util.BitSet |
getSetFieldMarks()
Access to edition field marks used to build the controlled view. |
LyAction |
getStatusAction(LyObject object)
Retrieve the status action for an object. |
boolean |
hasViewLimit()
Indicates if the action has a view limit. |
boolean |
isAutoCommit()
Indicates whether auto-commit is set or not. |
boolean |
isDynamicEditionMode()
Checks if the dynamic edition mode is set or not. |
boolean |
isEditable()
Checks if the controlled form is editable or not. |
boolean |
isEditable(LyObject object,
LyFieldInfo fieldInfo)
Checks if given field info is editable or not. |
boolean |
isEnabled()
Checks if the controlled form is enabled or not. |
void |
loadPage(boolean next)
Go to next or previous page. |
boolean |
objectAdded(LyWorkSpaceEvent event)
Called when an object is added in the dynamic object list. |
boolean |
objectRemoved(LyWorkSpaceEvent event)
Called when an object is removed from the dynamic object list. |
void |
reset(boolean full)
Overridden to clean set controllers table and to cancel edition state. |
void |
selectionDemand(LySelectionDemand demand)
Invoked when an action occurs. |
boolean |
setContext(LyWorkSpace context)
Set the current context for the controller. |
LyEditTableSetController |
setControllerFactory(LyObject object)
utility method (factory) to create setControllers related to objects being modified This method may be overriden in subclasses. |
void |
setEditable(boolean editable)
Set boolean indicating if the controlled form is editable or not. |
void |
setEnabled(boolean enabled)
Set boolean indicating if the controlled form is enabled or not. |
void |
setFields(LyInfoList<LyFieldInfo> fields)
Sets the displayed fields for this controller. |
void |
setFixedColumnWidth(LyFieldInfo fieldInfo)
Forces the width of a column. |
void |
setPage(int page)
Set current page being displayed If this page is greater than the lastPage value, the method will take the page 'modulo' getLastPage() value. |
void |
setSetFieldMarks(java.util.BitSet fieldMarks)
Set edition field marks used to build the controlled view. |
void |
showError(LyObject object,
LyError error)
Show an error for the specified object. |
boolean |
startCellEdition(LyObject object,
int colIndex)
Starts the edition of a cell (dynamic edition mode only). |
boolean |
startCellEdition(LyObject object,
int colIndex,
boolean showRow)
Starts the edition of a cell (dynamic edition mode only). |
short |
startValidate()
Internal use. |
void |
updateRowObject(LyObject object)
Updates the row for a given object. |
boolean |
useEditTable()
Checks if an edit table is used for editing composition relations. |
short |
validate(LyEditTableSetController setController)
Validate edition of given controller. |
short |
validateChanges()
Public method to validate all editions. |
Methods inherited from class leon.control.LyMultiPageTableController |
---|
getLastPage, getPage, isDisplayNextPreviousTools, isDisplayPagesNumber, isPaginated, selectRow, setClassFilter, setLastModified, setPrintMode, setSort |
Methods inherited from class leon.control.LyTableController |
---|
completeMessages, print, selectObject, selectObjects |
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, setName, setUserData, showError, showWarning, updateViewFromValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.control.LyContextInterface |
---|
getContext |
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 boolean TOOLBAR_FOR_UNCHANGED_OBJECTS
public static final java.lang.String DEMAND_RESTORE
public static final java.lang.String DEMAND_VALIDATE_ROW
public static final java.lang.String DEMAND_CANCEL_ROW
public static final java.lang.String DEMAND_COPY_CELLS
public static final java.lang.String DEMAND_PASTE_CELLS
public static final java.lang.String DEMAND_ALT_UP
public static final java.lang.String DEMAND_ALT_DOWN
public static final java.lang.String DEMAND_ALT_LEFT
public static final java.lang.String DEMAND_ALT_RIGHT
public static java.lang.String DEMAND_ALT_ADD
public static int MAX_COLUMN_WIDTH
Constructor Detail |
---|
public LyEditTableController(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 void reset(boolean full)
reset
in class LyMultiPageTableController
full
- indicates if a full reset (view + data) must be performedpublic void loadPage(boolean next)
loadPage
in class LyMultiPageTableController
next
- true if we go to next page.public boolean hasViewLimit()
hasViewLimit
in class LyMultiPageTableController
public void setPage(int page)
setPage
in class LyMultiPageTableController
page
- current page we want to showpublic boolean setContext(LyWorkSpace context)
setContext
in interface LyContextInterface
setContext
in class LyMultiPageTableController
context
- Current context, or null if no context is set for the view
LyContextInterface.getContext()
public LyRow buildRow(LyObject object, LyInfoList<LyFieldInfo> fields, LyInfoList<LyFieldInfo> statusFields)
buildRow
in class LySimpleTableController
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.
LyMultiPageTableController.insertRow(leon.data.LyObject, int, boolean)
public LyAction getStatusAction(LyObject object)
object
- object of the action.
public java.lang.String getModificationsColor()
public void setFixedColumnWidth(LyFieldInfo fieldInfo)
fieldInfo
- the field whose coulmn width must be fixed.public LyEditTableSetController setControllerFactory(LyObject object)
object
- current object being modified
public void selectionDemand(LySelectionDemand demand)
selectionDemand
in class LyMultiPageTableController
demand
- selection event created from the view. User interaction.LyController.selectionDemand(leon.view.event.LySelectionDemand)
public void actionDemand(LyActionDemand demand)
This method is called by demandPerformed and may be overriden in subclasses.
Default implementation makes nothing.
actionDemand
in class LyMultiPageTableController
demand
- demand parameters sent by the view component.LyController.demandPerformed(leon.view.event.LyDemand)
public boolean startCellEdition(LyObject object, int colIndex)
object
- the object to edit.colIndex
- the index of the cell column to be edited.
public boolean startCellEdition(LyObject object, int colIndex, boolean showRow)
object
- the object to edit.colIndex
- the index of the cell column to be edited.showRow
- indicates whether edited row must be shown on view manager.
public short validateChanges()
LyFormInterface
public short validate(LyEditTableSetController setController)
setController
- the controller to validate
LyFormInterface
public short startValidate()
LyFormInterface
public short endValidate()
LyFormInterface
public void setFields(LyInfoList<LyFieldInfo> fields)
setFields
in class LySimpleTableController
fields
- List of fields to display in the table. If null, return to default list of
fields.public void free(LyController controller)
free
in class LySimpleTableController
controller
- controller instance which requested the freeing of this controller. If the
controller is the parent, this controller is freed otherwise the method
does nothing.LyAreaController.free()
public void clearViewCache()
This method may be invoked for memory optimization, but the controller is still valid and may be used. (Unlike free) Further usage, needs to rebuild internal component & view which may be time consuming.
clearViewCache
in class LySimpleTableController
public void updateRowObject(LyObject object)
object
- the object whose row must be updated.public boolean objectAdded(LyWorkSpaceEvent event)
objectAdded
in interface LyWorkSpaceListener
objectAdded
in class LySimpleTableController
event
- the workspace event
LyWorkSpaceListener.objectAdded(leon.data.LyWorkSpaceEvent)
public boolean objectRemoved(LyWorkSpaceEvent event)
objectRemoved
in interface LyWorkSpaceListener
objectRemoved
in class LySimpleTableController
event
- the workspace event
LyWorkSpaceListener.objectRemoved(leon.data.LyWorkSpaceEvent)
public LyEditTableSetController getSetController(LyObject object)
object
- current object being modified
public boolean enableShowMessage()
public void enableShowMessage(boolean status)
status
- true if raising popup message is active, false otherwisepublic void setSetFieldMarks(java.util.BitSet fieldMarks)
fieldMarks
- marks to setpublic java.util.BitSet getSetFieldMarks()
public boolean isEditable(LyObject object, LyFieldInfo fieldInfo)
object
- the object to checkfieldInfo
- the field to check
public boolean canBeEditable(LyFieldInfo fieldInfo)
fieldInfo
- the field to check
public boolean isEditable()
public void setEditable(boolean editable)
editable
- the editable statuspublic LyEditTableSetController getInternalCreateController()
public boolean isEnabled()
public boolean isDynamicEditionMode()
public boolean isAutoCommit()
public void setEnabled(boolean enabled)
enabled
- the enabled statuspublic LyObjectList getContent()
getContent
in class LySimpleTableController
public boolean useEditTable()
public void showError(LyObject object, LyError error)
showError
in class LyController
object
- The object in errorerror
- The error o showLyController.showError(String)
public LyFieldInfo getFieldInfoDisplayList(int colIndex)
colIndex
- index of column.
public int getDisplayListDataIndex()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |