LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyFilterRelationController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyMultiAreaController
              extended by leon.control.LyFormController
                  extended by leon.control.LySimpleFilterController
                      extended by leon.control.LyFilterRelationController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyFilterEndInterface, LyGetActionInterface, LySelectFileListenerInterface, LyAdvancedWorkSpaceListener, LyGuiListener, LyWorkSpaceListener, LyGetClassInfoInterface, LyInfoListener, LyEvaluator, LyDemandListener

public class LyFilterRelationController
extends LySimpleFilterController
implements LyFilterEndInterface

This class implements the relation filter edition area. This form enables the user to type in relation filter (fieldInfo / filter).

This controller is associated to a behavior which implements LyFilterBehaviorInterface. Usually the behavior is an instance of LyClassBehavior.

See Also:
LyFilterEditorController, LyFilterEndInterface

Field Summary
static java.lang.String __VERSION
          File Version
static java.lang.String CREATE_EXTENDED_FILTER
          Identifier of create extended filter button.
static java.lang.String CREATE_SIMPLE_FILTER
          Identifier of create simple filter button.
static java.lang.String EXTEND_SIMPLE_FILTER
          Identifier of extend simple filter button.
static java.lang.String SELECT_CLASS
          Identifier of an input field : user specified value.
static java.lang.String SELECT_FIELDINFO
          Identifier of an input field : selected fieldInfo.
static java.lang.String SELECT_FILTER
          Identifier of an input field : user specified value.
static java.lang.String SET_FILTER
          Identifier of set filter button.
 
Fields inherited from class leon.control.LyFormController
DEMAND_APPLY, DEMAND_NEXT_OBJECT, DEMAND_NEXT_STEP, DEMAND_PREVIOUS_OBJECT, DEMAND_PREVIOUS_STEP, DEMAND_SAVE, DEMAND_SELECTION, DEMAND_VALIDATE, FORM_FIELD_SEP
 
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
 
Constructor Summary
LyFilterRelationController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Constructor.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action notification is sent to this listener.
 void addFilter(LyFilter filter)
          Adds a filter in the list of created filters.
 void endFilter(LyController parent, java.lang.String actionDemand, LyFilter filter)
          The filter edition form is closed : notify registred listener.
 LyInfoList<LyFilter> getCreatedFilters()
          Gets the created filters (may be simple or extended filters).
 LyFilter getFilter()
          Gets initial : indicates to the filter controller the default filter parameters.
 boolean isDisplayFilterRelation()
          Indicates if relation containing the list of possible filters is displayed.
 boolean isViewResizable()
          Indicates if the view for this import controller is resizable.
 void setClassInfo(LyClassInfo classInfo)
          Forces the field that contains the possible classes to the given class.
 void setDisplayFilterRelation(boolean displayFilterRelation)
          Indicates if relation containing the list of possible filters must be displayed.
 void setFormEditable(boolean editable)
          Sets the editable state of the form component.
 boolean setObjects(LyObjectList objects)
          Accessor to the list of objects associated with this form.
 
Methods inherited from class leon.control.LySimpleFilterController
checkIfModified, getBehaviorInterface, getDefaultFilter, getFilterEndInterface, setContextClient, setFilterEndInterface
 
Methods inherited from class leon.control.LyFormController
clearViewCache, contains, fieldControllerFactory, findFormField, free, getAreaController, getClassInfo, getCompositionRelation, getContent, getDefaultFieldUnit, getEnvironment, getFieldController, getFieldMarks, getFields, getFieldValue, getFieldValue, getFormField, getImage, getImage, getKeyValue, getObject, getObjectList, getSelection, getState, getTabs, isChangingObject, isComposition, isDisplayed, menuDemand, objectAdded, objectChanged, objectRemoved, objectStateChanged, objectUserEvent, reset, resetFormContent, resetFromObject, setActiveField, setCompositionRelation, setContext, setFieldMarks, setState, showError, workSpaceEventsGrouped
 
Methods inherited from class leon.control.LyMultiAreaController
addAreaController, addAreaControllerStack, canClose, getAreaController, getAreaController, getAreaControllersCount, getAreaControllerStack, getAreaControllerStackCount, getFinalAreaControllers, getLastModified, openSubAreaController, removeAreaController, removeAreaControllerStack, setAction, setIdle, setViewController, update
 
Methods inherited from class leon.control.LyAreaController
canFree, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, getContext, getContextClient, getContextTitle, getDefaultAction, getFastEditionAction, getHelpFile, getImageTooltip, getInfoLabel, getInfoLabel, getLabel, getMenuItemImage, getName, getParameter, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getRefreshTime, getShortLabel, getTarget, getTitle, getViewController, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, reset, selectFileDemand, setContext, setPreference, showView, showView, testParameter, toString, updateTitleBar
 
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

__VERSION

public static final java.lang.String __VERSION
File Version

See Also:
Constant Field Values

SELECT_FIELDINFO

public static final java.lang.String SELECT_FIELDINFO
Identifier of an input field : selected fieldInfo.

See Also:
Constant Field Values

SELECT_CLASS

public static final java.lang.String SELECT_CLASS
Identifier of an input field : user specified value.

See Also:
Constant Field Values

SELECT_FILTER

public static final java.lang.String SELECT_FILTER
Identifier of an input field : user specified value.

See Also:
Constant Field Values

CREATE_SIMPLE_FILTER

public static final java.lang.String CREATE_SIMPLE_FILTER
Identifier of create simple filter button.

See Also:
Constant Field Values

CREATE_EXTENDED_FILTER

public static final java.lang.String CREATE_EXTENDED_FILTER
Identifier of create extended filter button.

See Also:
Constant Field Values

SET_FILTER

public static final java.lang.String SET_FILTER
Identifier of set filter button.

See Also:
Constant Field Values

EXTEND_SIMPLE_FILTER

public static final java.lang.String EXTEND_SIMPLE_FILTER
Identifier of extend simple filter button.

See Also:
Constant Field Values
Constructor Detail

LyFilterRelationController

public LyFilterRelationController(LySession session,
                                  LyController parent,
                                  LyAction action,
                                  LyClassInfo classInfo,
                                  LyObjectList objects)
Constructor.

Parameters:
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 filter
objects - current context
Method Detail

actionDemand

public void actionDemand(LyActionDemand demand)
Invoked when an action notification is sent to this listener.

method implements VALIDATE, APPLY and CANCEL action events and subsequently invoke endFilter on the client.

Additionally, the controller handles field changes and impact on form content.

Overrides:
actionDemand in class LyFormController
Parameters:
demand - demand parameters sent by the view component.
See Also:
LyController.demandPerformed(leon.view.event.LyDemand)

setClassInfo

public void setClassInfo(LyClassInfo classInfo)
Forces the field that contains the possible classes to the given class.

Parameters:
classInfo - the class info that must be set on the field.

addFilter

public void addFilter(LyFilter filter)
Adds a filter in the list of created filters.

Parameters:
filter - new filter.

setDisplayFilterRelation

public void setDisplayFilterRelation(boolean displayFilterRelation)
Indicates if relation containing the list of possible filters must be displayed.

Parameters:
displayFilterRelation - true if relation must be displayed, false otherwise.

isDisplayFilterRelation

public boolean isDisplayFilterRelation()
Indicates if relation containing the list of possible filters is displayed.

Returns:
true if relation is displayed, false otherwise.

setFormEditable

public void setFormEditable(boolean editable)
Sets the editable state of the form component.

Parameters:
editable - true if form must be editable, false otherwise.

isViewResizable

public boolean isViewResizable()
Indicates if the view for this import controller is resizable.

Overrides:
isViewResizable in class LyFormController
Returns:
true if the view is resizable, false otherwise.

setObjects

public boolean setObjects(LyObjectList objects)
Accessor to the list of objects associated with this form. The user may navigate through this list of objects.

Overrides:
setObjects in class LyFormController
Parameters:
objects - list of objects which could be shown in the form.
Returns:
true if successfull

getCreatedFilters

public LyInfoList<LyFilter> getCreatedFilters()
Gets the created filters (may be simple or extended filters).

Returns:
the list of created filters.

getFilter

public LyFilter getFilter()
Gets initial : indicates to the filter controller the default filter parameters.

Specified by:
getFilter in interface LyFilterEndInterface
Returns:
current filter or null if no filter is selected

endFilter

public void endFilter(LyController parent,
                      java.lang.String actionDemand,
                      LyFilter filter)
The filter edition form is closed : notify registred listener.

Specified by:
endFilter in interface LyFilterEndInterface
Parameters:
parent - 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_CANCEL
filter - the filter that was created in the form

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com