|
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.form.LyFieldController
public class LyFieldController
Default field controller.
LyFormController
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
static java.lang.String |
FORM_FIELD_SEP
Separator used to build form field identifiers. |
static java.lang.String |
OLD_FORM_FIELD_SEP
Old form field sep |
Fields inherited from class leon.control.LyController |
---|
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP |
Constructor Summary | |
---|---|
LyFieldController(LyAreaController parent,
LyFieldInfo fieldInfo)
Constructor. |
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). |
void |
free()
Free this controller. |
LyAction |
getAction()
Get the current action |
LyAreaController |
getAreaController()
Gets the specific areaController for the given field info. |
LyBehaviorInterface |
getBehavior()
Accessor to controller behavior A behavior is associated to a controller to let the Developer specify application logic in the behavior. |
LyClassInfo |
getClassInfo()
Get the classInfo associated with this controller |
LyComponent |
getComponent()
Accessor to the view component instance. |
LyUnit |
getDefaultFieldUnit()
Get the default unit for the current field |
LyUnit |
getDefaultFieldUnit(LyFieldInfo fieldInfo)
Get the default unit for the given field |
LyEnvironment |
getEnvironment()
Get the environment of the parent form controller |
LyFieldController |
getFieldController(int index)
Get the field controller at the given index. |
LyFieldInfo |
getFieldInfo()
Get the field associated with this controller |
LyValue |
getFieldValue()
Extract current value for the specified fieldInfo in the form. |
LyFormController |
getFormController()
Get the form controller |
LyFormField |
getFormField()
Accessor to the formField (View component) associated to the fieldInfo. |
LyFormField |
getFormField(LyFieldInfo fieldInfo)
Accessor to the formField (View component) associated to the fieldInfo. |
java.lang.String |
getImage(LyObject object)
Get the name of the image (key or path) representing an object instance. |
LyInfoLabel |
getInfoLabel(LyClassInfo classInfo,
LyInfoLabel.Type type)
Gets info label of the given type for specified class info. |
LyInfoLabel |
getInfoLabel(LyFieldInfo fieldInfo,
LyInfoLabel.Type type)
Gets info label of the given type for specified field info. |
java.lang.String |
getLabel(LyObject object,
LyFieldInfo fieldInfo,
java.lang.Object fieldValue)
Gets label of an object, for specified field info and value. |
LyObject |
getObject()
Get the edited object |
short |
getState()
Accessor to the state for a field in the form. |
LyViewController |
getViewController()
Accessor to the view controller (Frame or dialog controller) which is the container of this view. |
boolean |
hasMark(LyFieldInfo fieldInfo,
int mark)
Checks if a mark is set for the given fieldInfo in the context of the form action. |
void |
invokeTransverseAction(LyAction action,
LyClassInfo classInfo)
Internal method to invoke on a relation a transverse action for a given classInfo. |
boolean |
isIdle()
Check idle status of the field controller. |
void |
menuDemand(LyMenuDemand demand)
Invoked when an menu item notification is sent to this listener. |
void |
propagate(java.lang.Object value)
Impact of a value change of a fieldInfo. |
void |
resetFromValue(java.lang.Object value,
boolean freeOldValue,
boolean createNewValue)
Sets the field content from the specified value Any value modified by the user is the form is lost. |
boolean |
restore(LyFieldSave fieldSave)
Restore field input. |
LyFieldSave |
save(boolean full)
Save field input. |
void |
setAreaNoScroll(LyComponent component)
Method used to set no scrolling to the component in type change case if it's a LyArea component or a LyTabs component. |
void |
setFieldValue(LyValue newValue,
boolean propagate)
Sets the value of a fieldInfo This methods extracts the value and calls updateFieldItem. |
void |
setFieldValue(java.lang.Object value,
boolean propagate)
Sets the value of a fieldInfo. |
void |
setFormField(LyFormField formField)
Sets formField. |
void |
setState(short status)
Sets the valid status of a field in the form. |
java.lang.String |
toString()
Get this controller as a string. |
void |
updateFieldItem(java.lang.Object newValue,
java.lang.Object oldValue,
boolean propagate)
Update the value of a fieldInfo shown in the view. |
Methods inherited from class leon.control.LyController |
---|
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getBehaviorInterface, getBuilder, getClassInfo, getId, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getKeyValue, getLastModified, getName, getObjectId, getParent, getSession, getUserData, getView, getViewManager, hasViewController, helpDemand, hideView, hideView, isFreed, selectionDemand, setBuilder, setBuilderClass, setIdle, setLastModified, setName, setUserData, showError, showError, showView, 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 OLD_FORM_FIELD_SEP
Constructor Detail |
---|
public LyFieldController(LyAreaController parent, LyFieldInfo fieldInfo)
parent
- parent controller (or null for 'root' controller).fieldInfo
- the associated field handled by this controllerMethod Detail |
---|
public void free()
free
in class LyController
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 LyController
public LyBehaviorInterface getBehavior()
LyController
getBehavior
in class LyController
LyController.getBehavior()
public LyViewController getViewController()
LyController
getViewController
in class LyController
LyController.getViewController()
public LyFieldInfo getFieldInfo()
public LyClassInfo getClassInfo()
public LyObject getObject()
public LyAction getAction()
public final LyEnvironment getEnvironment()
getEnvironment
in class LyController
LyController.getEnvironment()
public LyFormController getFormController()
public java.lang.String getImage(LyObject object)
getImage
in class LyController
object
- source object for image association.
public LyInfoLabel getInfoLabel(LyClassInfo classInfo, LyInfoLabel.Type type)
classInfo
- the classInfotype
- the type of label
public LyInfoLabel getInfoLabel(LyFieldInfo fieldInfo, LyInfoLabel.Type type)
fieldInfo
- a fieldInfotype
- the type of label
public java.lang.String getLabel(LyObject object, LyFieldInfo fieldInfo, java.lang.Object fieldValue)
object
- Object for which a label is required.fieldInfo
- field info.fieldValue
- value of the field.
public void actionDemand(LyActionDemand demand)
actionDemand
in class LyController
demand
- the action demandLyController.demandPerformed(leon.view.event.LyDemand)
public void menuDemand(LyMenuDemand demand)
menuDemand
in class LyController
demand
- demand parameters sent by the view component.LyController.demandPerformed(leon.view.event.LyDemand)
public void invokeTransverseAction(LyAction action, LyClassInfo classInfo)
action
- Transverse action.classInfo
- Class info on which the action is applied.public void propagate(java.lang.Object value)
value
- new Value of the field.public LyValue getFieldValue()
public void updateFieldItem(java.lang.Object newValue, java.lang.Object oldValue, boolean propagate)
newValue
- the new value of the field.oldValue
- former value of the field,or null if unknown.propagate
- Indicates whether the change is notified (propagated) to other fields or
not.getFieldItem()
public LyFormField getFormField()
public LyFormField getFormField(LyFieldInfo fieldInfo)
fieldInfo
- the fieldInfo which is associated to the view component.
public void setFormField(LyFormField formField)
formField
- the form field to setpublic LyAreaController getAreaController()
public LyComponent getComponent()
LyController
getComponent
in class LyController
LyController.getComponent()
public void setAreaNoScroll(LyComponent component)
component
- The component which we want set no scrollbar.public LyFieldController getFieldController(int index)
index
- an index
public java.lang.String toString()
toString
in class LyController
Object.toString()
public void setState(short status)
status
- current validity statuspublic short getState()
public void resetFromValue(java.lang.Object value, boolean freeOldValue, boolean createNewValue)
value
- new value to set in the field.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 boolean isIdle()
isIdle
in interface LyGuiListener
isIdle
in class LyController
public void setFieldValue(java.lang.Object value, boolean propagate)
value
- the new value of the field. This value may be null, a LyValue instance or
the internal value associated to the fieldInfo. See LyValue.getValue()propagate
- Indicates whether the change is notified (propagated) to other fields or
not. This is useless if you reset all fields for instance.getFieldValue()
,
LyValue.getValue()
public void setFieldValue(LyValue newValue, boolean propagate)
newValue
- the new value of the field. This value may be null to set the value to blank
(empty).propagate
- Indicates whether the change is notified (propagated) to other fields or
not. This is useless if you reset all fields for instance.getFieldValue()
public boolean hasMark(LyFieldInfo fieldInfo, int mark)
fieldInfo
- Field to be checked.mark
- Mark to be checked.
public LyFieldSave save(boolean full)
public boolean restore(LyFieldSave fieldSave)
public LyUnit getDefaultFieldUnit()
public LyUnit getDefaultFieldUnit(LyFieldInfo fieldInfo)
fieldInfo
- a field
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |