|
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.LyFilterEditorController
public class LyFilterEditorController
This class implements an extended filter edition form. The extended filter is a 'tree'-like view which is used as a GUI to edit extended filters. An extended filter is a set of elementary conditions associated with operators AND / OR.
The extended filter view is based on a LyFilterController (elementary edition area) to create conditions and add them into the tree.
LyFilterController
,
LyFilterEndInterface
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
CURRENT_FILTER_EXPRESSION
String used when modifying a filter expression. |
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 | |
---|---|
LyFilterEditorController(LySession session,
LyController parent,
LyAction action)
Constructor. |
|
LyFilterEditorController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects)
Constructor. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Method called to allows to execute specific action in toolbar and tree. |
LyTreeNode |
addTreeNode(LyTreeNode parent,
java.lang.Object appObject,
int position)
Create a node subtree for the parent node. |
LyTreeNode |
buildTreeNode(java.lang.Object nodeObject)
Build a view object instance from the application object Node status (colors, borders, ...) |
void |
clearTreeContent()
Empty the tree (remove all nodes). |
void |
dragDropDemand(LyDragDropDemand demand)
Invoked when a Drag & Drop occurs. |
boolean |
endAction(LyAreaController form,
LyAction action)
Ends an action for the given controller. |
void |
endFilter(LyController controller,
java.lang.String actionDemand,
LyFilter filter)
The filter edition form is closed : notify registered listener. |
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. |
LyClassInfo |
getClassInfo()
Accessor to the class info for which this filter is created. |
LyDependencies |
getDependencies()
Gets dependencies of the tree controller. |
LyFilter |
getFilter()
Accessor to initial filter for the creation of an elementary filter. |
LyFilterEndInterface |
getFilterEndInterface()
Gets client (listener) for closing notification. |
java.lang.String |
getImage(LyAreaController areaController,
LyAction action)
Gets the image corresponding to the given object for the given controller. |
static java.lang.String |
getNameExpression(LyFilterExpression exp,
LyEnvironment environment)
Builds the displayed label of a LyFilterExpression. |
static java.lang.String |
getNameFilter(LyFilter filter,
LyEnvironment environment,
boolean expand)
Builds the displayed label of a LyFilter. |
static java.lang.String |
getNameFilterCriterion(LyFilterCriterion criterion,
LyEnvironment environment)
Builds the displayed label of a LyFilterCriterion. |
static java.lang.String |
getNameFilterRelation(LyFilterRelation filter,
LyEnvironment environment)
Builds the displayed label of a LyFilterRelation. |
static java.lang.String |
getNameFilterRelation(LyFilterRelation filter,
LyEnvironment environment,
boolean expand)
Builds the displayed label of a LyFilterRelation. |
java.lang.String |
getTitle(LyAreaController areaController,
LyAction action)
Gets title corresponding to the given action. |
LyTree |
getTreeComponent()
Accessor to the Tree component (view). |
java.util.Vector<LyFilterElement> |
getTreeSons(java.lang.Object parentNodeObject)
Fetch the subtree objects for the specified parent node. |
boolean |
handleDemand(LyController controller,
LyDemand demand)
Invoked when a demand is sent to this listener. |
void |
menuDemand(LyMenuDemand demand)
Invoked when an menu item notification is sent to this listener. |
void |
questionAnswer(boolean result,
java.lang.Object clientData)
Answer to a askQuestion request. |
void |
reset(boolean full)
Reset the entire view : everything is rebuilt. |
void |
selectionDemand(LySelectionDemand demand)
Method called when there is a selection in tree. |
void |
setContextClient(LyAreaController controller)
Set accessor to the context client area controller which will receive contextual notification when something occur on this area controller. |
void |
setFilterEndInterface(LyFilterEndInterface endInterface)
Sets client (listener) for closing notification. |
boolean |
startAction(LyAreaController form,
LyAction action)
Starts an action for the given controller. |
java.lang.String |
translate(java.lang.String value)
Translate the values displayed in filter form. |
void |
updateContent()
Update the content of the view (Nodes). |
void |
updateTools()
Reset the tool bar status (depends on current selection). |
void |
updateTreeNode(java.lang.Object nodeObject,
LyTreeNode treeNode)
Update view object status (colors, label, border, style ...) the tree controller invokes this method when nodeObject is modified. |
boolean |
validateAction(LyAction action)
Method that checks if the given action is present or not. |
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 |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String CURRENT_FILTER_EXPRESSION
Constructor Detail |
---|
public LyFilterEditorController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
session
- current session associated to the controller. The controller automatically
registers on the specified session.parent
- parent controller. If the parent implements LyFilterEndInterface, it will be
notified when the filter form is closed.action
- related action. (action based on '_filter' action)classInfo
- the application class associated to the filterobjects
- the current contextpublic LyFilterEditorController(LySession session, LyController parent, LyAction action)
session
- current session associated to the controller. The controller automatically
registers on the specified session.parent
- parent controller. If the parent implements LyFilterEndInterface, it will be
notified when the filter form is closed.action
- related action. (action based on '_filter' action)Method Detail |
---|
public void free(LyController controller)
free
in class LyMultiAreaController
controller
- parent controllerLyAreaController.free()
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 void updateContent()
public void clearTreeContent()
public LyTreeNode addTreeNode(LyTreeNode parent, java.lang.Object appObject, int position)
parent
- of the subtree, or null if create subtree a root levelappObject
- the application object which is the node of the subtree, or null to fetch
root componentposition
- Positon of the new tree node.
public java.util.Vector<LyFilterElement> getTreeSons(java.lang.Object parentNodeObject)
parentNodeObject
- parentNodeObject parent of the requested objects.
LyTreeBehaviorInterface.getTreeSons(java.lang.Object, leon.info.LyInfoList, leon.control.LyTreeController)
public boolean handleDemand(LyController controller, LyDemand demand)
controller
- controller that routed the demand.demand
- demand parameters sent by the view component.
public void actionDemand(LyActionDemand demand)
actionDemand
in class LyMultiAreaController
demand
- action demandLyController.demandPerformed(leon.view.event.LyDemand)
public void dragDropDemand(LyDragDropDemand demand)
dragDropDemand
in class LyController
demand
- drag-drop demandpublic void menuDemand(LyMenuDemand demand)
menuDemand
in class LyAreaController
demand
- the menu demandLyController.demandPerformed(leon.view.event.LyDemand)
public void selectionDemand(LySelectionDemand demand)
selectionDemand
in class LyController
demand
- LySelectionDemand selection demandLyController.selectionDemand(leon.view.event.LySelectionDemand)
public void questionAnswer(boolean result, java.lang.Object clientData)
questionAnswer
in interface LyQuestionAnswerInterface
result
- true if the user has clicked on Yes or OkclientData
- data specified in the askQuestion methodLyQuestionAnswerInterface
public void updateTools()
public boolean validateAction(LyAction action)
action
- the action to validate
public java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public static java.lang.String getNameExpression(LyFilterExpression exp, LyEnvironment environment)
exp
- the LyFilterExpression.environment
- the environment used to translate strings.
public static java.lang.String getNameFilter(LyFilter filter, LyEnvironment environment, boolean expand)
filter
- the filterenvironment
- current environmentexpand
- indicates if tree node associated to the filter is expanded or not
public static java.lang.String getNameFilterRelation(LyFilterRelation filter, LyEnvironment environment)
filter
- the filter.environment
- the environment used to translate strings.
public static java.lang.String getNameFilterRelation(LyFilterRelation filter, LyEnvironment environment, boolean expand)
filter
- the filter.environment
- the environment used to translate strings.expand
- indicates if tree node associated to the filter is expanded or not.
public static java.lang.String getNameFilterCriterion(LyFilterCriterion criterion, LyEnvironment environment)
criterion
- the criterion.environment
- the environment used to translate strings.
public void setContextClient(LyAreaController controller)
setContextClient
in class LyMultiAreaController
controller
- the contextual controller.public LyFilterEndInterface getFilterEndInterface()
public void setFilterEndInterface(LyFilterEndInterface endInterface)
endInterface
- client notified when the dialog closes.public LyClassInfo getClassInfo()
getClassInfo
in class LyAreaController
public LyFilter getFilter()
getFilter
in interface LyFilterEndInterface
public void endFilter(LyController controller, java.lang.String actionDemand, LyFilter filter)
endFilter
in interface LyFilterEndInterface
controller
- reference to the filter controller (filter form which is closing)actionDemand
- actionDemand on filter controller : id of the command such as
LyFormController.DEMAND_VALIDATE, LyFormController.DEMAND_APPLY,
LyFormController.DEMAND_CANCELfilter
- the filter that was created in the formpublic boolean startAction(LyAreaController form, LyAction action)
form
- the current LyAreaController instanceaction
- the action that will be executed
public boolean endAction(LyAreaController form, LyAction action)
form
- the current LyAreaController instanceaction
- the action that was executed
public java.lang.String getImage(LyAreaController areaController, LyAction action)
areaController
- controller for which the image is required.action
- the action that was executed
public java.lang.String getTitle(LyAreaController areaController, LyAction action)
areaController
- the current LyAreaController instanceaction
- the action that was executed
public LyTreeNode buildTreeNode(java.lang.Object nodeObject)
nodeObject
- usually LyObject instance but not mandatory
public void updateTreeNode(java.lang.Object nodeObject, LyTreeNode treeNode)
nodeObject
- application object (reference)treeNode
- view objects (need update)public LyTree getTreeComponent()
public LyDependencies getDependencies()
LyDependencies
public java.lang.String translate(java.lang.String value)
value
- the value that must be translated
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |