|
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.LyMultiAreaController
leon.control.LyFormController
public abstract class LyFormController
The form controller is an area which describes a dialog view with a set of fields and values. User may just consult or modify data. Usually (not necessary) the form is associated to one or several Leonardi objects (LyObjects).
This class is specialized in consult/create/set and other controllers.
Services offered at this level of implementation :
The form controller is also receiving updates notification on object changes and may refresh the information shown to the user : titlebar, toobar, field values ...
The behavior associated to a LyFormController is shared by several implementation of this controller : the behavior must implement LyFormBehaviorInterface and is usually an instance of LyClassBehavior.
LyFormBehaviorInterface
,
LyClassBehavior
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
DEMAND_APPLY
Interaction code on the command bar button : Apply inputs. |
static java.lang.String |
DEMAND_NEXT_OBJECT
User action on toolbar : Show next object. |
static java.lang.String |
DEMAND_NEXT_STEP
Show next window. |
static java.lang.String |
DEMAND_PREVIOUS_OBJECT
User action on toolbar : Show previous object. |
static java.lang.String |
DEMAND_PREVIOUS_STEP
Show previous window. |
static java.lang.String |
DEMAND_SAVE
Interaction code on the command bar button : Save inputs. |
static java.lang.String |
DEMAND_SELECTION
User action on toolbar : select an object in the list. |
static java.lang.String |
DEMAND_VALIDATE
Interaction code on the command bar button : Validate inputs. |
static java.lang.String |
FORM_FIELD_SEP
Separator used to build form field identifiers. |
Fields inherited from class leon.control.LyAreaController |
---|
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW |
Fields inherited from class leon.control.LyController |
---|
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action occurs. |
void |
clearViewCache()
Clears all cached data for this controller (especially the view and the component). |
boolean |
contains(LyFieldInfo fieldInfo)
Checks if the given fieldInfo is present in the controlled form. |
LyFieldController |
fieldControllerFactory(LyFieldInfo fieldInfo,
boolean forceConsult)
Factory for constructing the field controller of a field info. |
LyFormField |
findFormField(LyFieldInfo fieldInfo)
Find recursively the formField corresponding to the given fieldInfo. |
void |
free(LyController controller)
Free this controller on request of the specified controller. |
LyAreaController |
getAreaController(LyFieldInfo fieldInfo)
Gets the specific areaController for the given field info. |
java.lang.Class<?> |
getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller. |
LyClassInfo |
getClassInfo()
Gets associated classInfo. |
LyRelationFieldInfo |
getCompositionRelation()
Gets the composition relation managed by this form. |
LyObjectList |
getContent()
Gets content of this controller. |
LyUnit |
getDefaultFieldUnit(LyFieldInfo fieldInfo)
Get the default unit for the given fieldInfo. |
LyEnvironment |
getEnvironment()
Accessor to the current Environment instance (shortcut for getSession().getEnvironment()). |
LyFieldController |
getFieldController(LyFieldInfo fieldInfo)
Get the field controller of the given fieldInfo. |
java.util.BitSet |
getFieldMarks()
Accessor to the field marks required on fields added in the view of this controller. |
LyInfoList<LyFieldInfo> |
getFields()
Gets the list of fields being displayed in the form. |
LyValue |
getFieldValue(LyFieldInfo fieldInfo)
Extract current value for the specified fieldInfo in the form. |
LyValue |
getFieldValue(java.lang.String id)
Extract current value for the specified fieldInfo in the form. |
LyFormField |
getFormField(LyFieldInfo fieldInfo)
Accessor to the formField (View component) associated to the fieldInfo. |
java.lang.String |
getImage()
Gets image associated with this form. |
java.lang.String |
getImage(LyObject object)
Get the name of the image (key or path) representing an object instance. |
java.lang.Object |
getKeyValue(java.lang.String key)
Retrieves a value from a registered key. |
LyObject |
getObject()
Access to object currently beeing shown in the view. |
LyObjectList |
getObjectList()
Accessor to the list of objects associated with this form. |
LyObjectList |
getSelection()
Gets selection of this controller. |
short |
getState(LyFieldInfo fieldInfo)
Accessor to the state for a field in the form. |
LyTabs |
getTabs()
Retrieves the tabs component of this controller view. |
boolean |
isChangingObject()
Indicates if the controller is changing its object. |
boolean |
isComposition(LyFieldInfo fieldInfo)
Tests if the specified fieldInfo must be represented as a composition relation in forms. |
boolean |
isDisplayed(LyFieldInfo fieldInfo)
Utility method to know if a fieldInfo is displayed in this form or not. |
boolean |
isViewResizable()
Indicates if the view for this form controller is resizable. |
void |
menuDemand(LyMenuDemand demand)
Invoked when a menu demand occurs. |
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. |
boolean |
objectUserEvent(LyAdvancedWorkSpaceEvent event)
Called when an object user event occured. |
void |
reset(boolean full)
Reset all the content of the view. |
void |
resetFormContent()
Reset form content. |
void |
resetFromObject(LyObject object,
boolean freeOldValue,
boolean createNewValue)
Internal use. |
void |
setActiveField(LyFieldInfo fieldInfo)
Activates a field. |
void |
setCompositionRelation(LyRelationFieldInfo relation)
Sets composition relation : this method is invoked when this form manages a relation in another form. |
boolean |
setContext(LyWorkSpace context)
Set current controller context. |
void |
setFieldMarks(java.util.BitSet fieldMarks)
Set field marks required on fields added in the view of this controller. |
boolean |
setObjects(LyObjectList objects)
Accessor to the list of objects associated with this form. |
void |
setState(LyFieldInfo fieldInfo,
short status)
Sets the valid status of a field in the form. |
void |
showError(LyObject object,
LyError error)
Show an error for the specified object. |
boolean |
workSpaceEventsGrouped(java.util.ArrayList<LyWorkSpaceEvent> events)
Called when grouped events are sent. |
Methods inherited from class leon.control.LyController |
---|
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, setBuilder, setBuilderClass, setLastModified, setName, setUserData, showError, showWarning, updateViewFromValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String FORM_FIELD_SEP
public static final java.lang.String DEMAND_VALIDATE
public static final java.lang.String DEMAND_APPLY
public static final java.lang.String DEMAND_SAVE
public static final java.lang.String DEMAND_PREVIOUS_OBJECT
public static final java.lang.String DEMAND_NEXT_OBJECT
public static final java.lang.String DEMAND_SELECTION
public static final java.lang.String DEMAND_PREVIOUS_STEP
public static final java.lang.String DEMAND_NEXT_STEP
Method Detail |
---|
public java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public LyFieldController getFieldController(LyFieldInfo fieldInfo)
fieldInfo
- a field
public LyFieldController fieldControllerFactory(LyFieldInfo fieldInfo, boolean forceConsult)
fieldInfo
- Field info for which a controller is built.forceConsult
- true to force consult mode
public void setActiveField(LyFieldInfo fieldInfo)
fieldInfo
- The field info that must be selected.public LyTabs getTabs()
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 LyMultiAreaController
public void free(LyController controller)
free
in class LyMultiAreaController
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 actionDemand(LyActionDemand demand)
actionDemand
in class LyMultiAreaController
demand
- demand parameters sent by the view component.LyController.demandPerformed(leon.view.event.LyDemand)
public void menuDemand(LyMenuDemand demand)
menuDemand
in class LyAreaController
demand
- demand parameters sent by the view component.LyController.demandPerformed(leon.view.event.LyDemand)
public void setCompositionRelation(LyRelationFieldInfo relation)
relation
- the relation fieldInfopublic LyRelationFieldInfo getCompositionRelation()
public LyValue getFieldValue(java.lang.String id)
id
- fieldInfo id associated to the requested value
public LyValue getFieldValue(LyFieldInfo fieldInfo)
fieldInfo
- fieldInfo associated to the requested value
public LyObjectList getContent()
getContent
in class LyAreaController
public LyObjectList getSelection()
getSelection
in class LyAreaController
getContent()
public LyObject getObject()
public LyObjectList getObjectList()
public boolean setObjects(LyObjectList objects)
objects
- list of objects which could be shown in the form.
public LyClassInfo getClassInfo()
getClassInfo
in interface LyGetClassInfoInterface
getClassInfo
in class LyAreaController
public java.lang.String getImage()
getImage
in class LyAreaController
public java.lang.String getImage(LyObject object)
getImage
in class LyController
object
- source object for image association.
public boolean setContext(LyWorkSpace context)
setContext
in interface LyContextInterface
setContext
in class LyMultiAreaController
context
- current context or null if none is specified
LyContextInterface.getContext()
public void setFieldMarks(java.util.BitSet fieldMarks)
fieldMarks
- the fieldMark listpublic LyInfoList<LyFieldInfo> getFields()
public java.util.BitSet getFieldMarks()
public boolean isDisplayed(LyFieldInfo fieldInfo)
fieldInfo
- the fieldInfo which is tested for addition in the view.
public boolean isViewResizable()
isViewResizable
in class LyMultiAreaController
public boolean contains(LyFieldInfo fieldInfo)
fieldInfo
- the field to check
public LyFormField getFormField(LyFieldInfo fieldInfo)
fieldInfo
- the fieldInfo which is associated to the view component.
public boolean objectAdded(LyWorkSpaceEvent event)
objectAdded
in interface LyWorkSpaceListener
event
- event of adding object
public boolean objectRemoved(LyWorkSpaceEvent event)
objectRemoved
in interface LyWorkSpaceListener
event
- event of removing object
public boolean objectChanged(LyWorkSpaceEvent event)
objectChanged
in interface LyWorkSpaceListener
event
- event of changing object
public boolean objectStateChanged(LyAdvancedWorkSpaceEvent event)
objectStateChanged
in interface LyAdvancedWorkSpaceListener
event
- Event notifying object state change.
public boolean objectUserEvent(LyAdvancedWorkSpaceEvent event)
objectUserEvent
in interface LyAdvancedWorkSpaceListener
event
- Event notifying object user event.
public boolean workSpaceEventsGrouped(java.util.ArrayList<LyWorkSpaceEvent> events)
workSpaceEventsGrouped
in interface LyAdvancedWorkSpaceListener
events
- Sorted list of events.
public LyAreaController getAreaController(LyFieldInfo fieldInfo)
fieldInfo
- Field info for which an area controller is requested.
public boolean isComposition(LyFieldInfo fieldInfo)
fieldInfo
-
public void resetFormContent()
public void setState(LyFieldInfo fieldInfo, short status)
fieldInfo
- the specified fieldstatus
- current validity statuspublic short getState(LyFieldInfo fieldInfo)
fieldInfo
- the specified field
public boolean isChangingObject()
public void resetFromObject(LyObject object, boolean freeOldValue, boolean createNewValue)
object
- new object used to reset the view content.freeOldValue
- indicates if the old value should be freed (deleted) when it is an
objectcreateNewValue
- indicates if a new empty value should created when object is null and
when the value is an objectpublic LyFormField findFormField(LyFieldInfo fieldInfo)
fieldInfo
- the fieldInfo which is associated to the view component.
public LyEnvironment getEnvironment()
getEnvironment
in class LyAreaController
public void reset(boolean full)
reset
in class LyAreaController
full
- Boolean indicating if a full reset (including reset of datas) is requiered or not
(only reset graphical area).public java.lang.Object getKeyValue(java.lang.String key)
getKeyValue
in interface LyEvaluator
getKeyValue
in class LyAreaController
key
- The key that must be used.
public void showError(LyObject object, LyError error)
showError
in class LyController
object
- The object in errorerror
- The error to showLyController.showError(String)
public LyUnit getDefaultFieldUnit(LyFieldInfo fieldInfo)
fieldInfo
- a fieldInfo
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |