LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyAreaController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener
Direct Known Subclasses:
LyCreateStickerController, LyDeleteController, LyExportController, LyGraphicalChartController, LyImportController, LyMultiAreaController, LyPanelController, LyPrintModelController, LyReportingController, LySimplePrintController, LySortWizardController, LyTextController, LyUserInputController, LyWaitController

public abstract class LyAreaController
extends LyController
implements LyGetActionInterface, LyContextInterface, LyInfoListener, LySelectFileListenerInterface

An area controller is an abstract class used for factoring elementary view behavior. This class is specialized into LyFormController, LyTableController, LyMapController for example. An areaController is associated to an action and may have a context for the creation of the view. (contextual views).

The area controller offer primitive to manage the content of of the view : menubar, titleBar, messageBar.

It provides description of current action, context, associated classes. The implementation of all these primitive is usually overriden in subclasses.


Field Summary
static java.lang.String __VERSION
          File version
static int DEFAULT_MENU_ITEM_IMAGE_SIZE
          Default size of image in menu items.
static java.lang.String DEMAND_APPLY
          Interaction code on the command bar button : Apply inputs.
static java.lang.String DEMAND_CANCEL
          Cancel inputs.
static java.lang.String DEMAND_CLOSE
          Closing area.
static java.lang.String DEMAND_CREATE_CHART
          Creation of a new chart.
static java.lang.String DEMAND_DELETE_CHART
          Deletion of charts.
static java.lang.String DEMAND_DELETE_OBJECTINFOS
          Menu id : delete object info.
static java.lang.String DEMAND_DELETE_PREFERENCE
          Menu id : delete preference.
static java.lang.String DEMAND_UPDATE_VIEW
          Update view demand.
static java.lang.String DEMAND_VALIDATE
          Interaction code on the command bar button : Validate inputs.
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyAreaController(LySession session, LyController parent, LyAction action, LyObjectList context)
          Constructor.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action occurs.
 boolean canClose(boolean showMessage)
          Check if the area controller may be closed.
 boolean canFree(boolean showMessage)
          Check if the area controller may be freed.
 void clearViewCache()
          Clears all cached data for this controller (especially the view and the component).
 void completeMenuBar(LyMenuBar menuBar, int level)
          This method is invoked to enable the the area to complete the menuBar of the view and add its own menu items.
 void completeMessages(LyMessages messages, int level)
          This method is invoked to enable the the area(s) to complete the message bar of the view and add its own message items.
 void free()
          Free this controller.
 void free(LyController controller)
          Free this controller on request of the specified controller.
 LyAction getAction()
          Accessor to the action associated to this controller.
 LyMultiAreaController getAreaStackController()
          Accessor to the multi-area controller managing this area controller (for dialog actions only in LY_OPEN_DIALOGS_IN_SAME_VIEW mode).
 LyBehaviorInterface getBehavior()
          Accessor to controller behavior A behavior is associated to a controller to let the developper specify application logic in the behavior.
 java.lang.Class<?> getBehaviorInterface()
          Method that gives the interface that must be implemented by the behavior associated to this controller.
 LyBuilder getBuilder()
          Accessor to the internal builder.
 LyClassInfo getClassInfo()
          Get controller class info if any.
 LyObjectList getContent()
          Return list of objects presented in the area This method is overriden depending on the nature of the controller.
 LyWorkSpace getContext()
          Get current controller context.
 LyAreaController getContextClient()
          Accessor to the context client area controller which will receive contextual notification when something occurs on this area controller.
 java.lang.String getContextTitle()
          Gets context title associated with this controller.
 LyAction getDefaultAction(LyObject object)
          Retrieve the default action for an object.
 LyEnvironment getEnvironment()
          Accessor to the current Environment instance This method returns the environment of the current Action or, if the previous one is null, the session environment.
 LyAction getFastEditionAction(LyObject object, LyFieldInfo fieldInfo)
          Finds the best suited action for fast edition of given field for a given object.
 java.lang.String getHelpFile()
          Gets help file associated with this controller.
 java.lang.String getImage()
          Gets image associated with this controller.
 java.lang.String getImageTooltip()
          Gets image tooltip associated with this controller.
 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.Object getKeyValue(java.lang.String key)
          Retrieves a value from a registered key.
 java.lang.String getLabel(LyObject object, LyFieldInfo fieldInfo, java.lang.Object fieldValue)
          Gets label of an object, for specified field info and value.
 long getLastModified()
          Accessor to the last modification date of this controller.
 java.lang.String getMenuItemImage(LyAction action)
          Gets menu item image associated with this controller.
 java.lang.String getName(LyObject object)
          Gets name of an object in the context of the given area controller.
 java.lang.Object getParameter(java.lang.String name)
          Gets value corresponding to the given parameter name.
 java.lang.Object getParameter(java.lang.String name, boolean unknown_value)
          Gets value corresponding to the given parameter.
 java.util.BitSet getParameterMarks(java.lang.String name, LyBitSet.Type type)
          Gets value corresponding to the given parameter mark.
 LyController getParent()
          Accessor to the reference to the parent controller.
 LyController getParent(boolean buildView)
          Accessor to the reference to the parent controller.
 LyAreaController getParentAreaController()
          Accessor to the first parent area controller of this controller.
 long getRefreshTime()
          Accessor to the refresh time of this controller.
 LyObjectList getSelection()
          Return list of selected objects This method is overriden depending on the nature of the controller.
 java.lang.String getShortLabel(LyObject object, LyFieldInfo fieldInfo, java.lang.Object fieldValue)
          Gets short label of an object, for specified field info and value.
 java.lang.String getTarget()
          Accessor for the action target specified when calling showView.
 java.lang.String getTitle()
          Gets title associated with this controller.
 LyViewController getViewController()
          Accessor to the view controller of the area.
 LyViewController getViewController(boolean isDialog)
          Accessor to the view controller of the area.
 boolean hasMark(LyFieldInfo fieldInfo, int mark)
          Checks if a mark is set for the given fieldInfo in the context of the controlled action.
 boolean hasNotMark(LyFieldInfo fieldInfo, int mark)
          Checks if a mark is unset for the given fieldInfo in the context of the controlled action.
 boolean hasViewController()
          Check if the controller has a viewController.
 void hideView(boolean free)
          Hide the view.
 void infoEvent(java.lang.String prefix)
          Invoked when an action occurs on an info object (deletion or creation).
 void initialize()
          Initializes this area controller.
 boolean isInitialized()
          Checks if this controller was initialized or not.
 boolean isOutlined()
          Indicates if the view for this area acts on the outline view.
 boolean isViewResizable()
          Indicates if the view for this area controller is resizable.
 void menuDemand(LyMenuDemand demand)
          Invoked when an menu item notification is sent to this listener.
 void reset()
          Perform a full reset (reset of datas and reset of graphical area).
 void reset(boolean full)
          Reset all the content of the view.
 void selectFileDemand(LySelectFileController controller, LyDemand demand)
          Invoked when the user validates the input content.
 boolean setContext(LyObjectList context)
          Set the context for the controller.
 boolean setContext(LyWorkSpace context)
          Set the current context for the controller.
 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 setIdle(boolean idle)
          Sets idle status of the table.
 void setPreference(LyPreference preference)
          Sets the preference for this controller.
 void setViewController(LyViewController viewController)
          Accessor to the view controller of the area.
 void showView()
          Make the view visible to the user.
 void showView(java.lang.String target)
          Make the view visible to the user.
 boolean testParameter(java.lang.String name)
          Tests if the given parameter has "true" as value.
 java.lang.String toString()
          Get this controller as a string.
 boolean update()
          This method is called by the view controller when this area is shown to update its content.
 LyTitleBar updateTitleBar(java.lang.String image, java.lang.String title, java.lang.String contextTitle)
          Update the title bar content (if any titlebar is associated with this area).
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, 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

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values

DEMAND_CLOSE

public static final java.lang.String DEMAND_CLOSE
Closing area.


DEMAND_APPLY

public static final java.lang.String DEMAND_APPLY
Interaction code on the command bar button : Apply inputs. Do not close the view.


DEMAND_CANCEL

public static final java.lang.String DEMAND_CANCEL
Cancel inputs.


DEMAND_VALIDATE

public static final java.lang.String DEMAND_VALIDATE
Interaction code on the command bar button : Validate inputs. Apply and close.


DEMAND_DELETE_PREFERENCE

public static final java.lang.String DEMAND_DELETE_PREFERENCE
Menu id : delete preference.


DEMAND_DELETE_OBJECTINFOS

public static final java.lang.String DEMAND_DELETE_OBJECTINFOS
Menu id : delete object info.


DEMAND_CREATE_CHART

public static final java.lang.String DEMAND_CREATE_CHART
Creation of a new chart.


DEMAND_DELETE_CHART

public static final java.lang.String DEMAND_DELETE_CHART
Deletion of charts.


DEMAND_UPDATE_VIEW

public static final java.lang.String DEMAND_UPDATE_VIEW
Update view demand.


DEFAULT_MENU_ITEM_IMAGE_SIZE

public static final int DEFAULT_MENU_ITEM_IMAGE_SIZE
Default size of image in menu items.

See Also:
Constant Field Values
Constructor Detail

LyAreaController

public LyAreaController(LySession session,
                        LyController parent,
                        LyAction action,
                        LyObjectList context)
Constructor.

Parameters:
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 ...)
context - current context (may be null if the view is not contextual to a list of objects).
Method Detail

getBuilder

public LyBuilder getBuilder()
Accessor to the internal builder. If no builder is set, the method returns the reference to a default builder (invokes getDefaultBuilder).

Overrides:
getBuilder in class LyController
Returns:
the builder which creates the XML description of the view. Returned value is not null and several invocation on getBuilder always return the same instance.

initialize

public void initialize()
Initializes this area controller.


isInitialized

public boolean isInitialized()
Checks if this controller was initialized or not.

Returns:
Boolean indicating intialization state or this controller.

clearViewCache

public void clearViewCache()
Clears all cached data for this controller (especially the view and the component).

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.

Overrides:
clearViewCache in class LyController

reset

public void reset()
Perform a full reset (reset of datas and reset of graphical area). This method may be called several times.

See Also:
reset(boolean)

reset

public void reset(boolean full)
Reset all the content of the view. This method may be called several times. This method should be overriden, default implementation makes nothing

Parameters:
full - Boolean indicating if a full reset (including reset of datas) is requiered or not (only reset graphical area).

update

public boolean update()
This method is called by the view controller when this area is shown to update its content.

Returns:
True if updated, false otherwise.

updateTitleBar

public LyTitleBar updateTitleBar(java.lang.String image,
                                 java.lang.String title,
                                 java.lang.String contextTitle)
Update the title bar content (if any titlebar is associated with this area).

Parameters:
image - the image on the left side of the titlebar. If no image is given, try to get the image from the controller.
title - the string displayed on the left label of the titlebar. May be either a text message, or a String key found in the dictionary (StringXXX.properties) files. if to title is given, try to get a title from the behavior (@see LyActionBehavior#getTitle).
contextTitle - the string displayed on the right side of the titlebar. May be either a text message, or a String key found in the dictionary (StringXXX.properties) files. If no string is given, try to construct one from the current context (if any).
Returns:
the titlebar view component

completeMenuBar

public void completeMenuBar(LyMenuBar menuBar,
                            int level)
This method is invoked to enable the the area to complete the menuBar of the view and add its own menu items. Default implementation invokes the method on the builder instance.

Parameters:
menuBar - the menuBar structure
level - : level of current Controller. one of the LEVEL_XXX contants in LyViewController
See Also:
LyViewController

completeMessages

public void completeMessages(LyMessages messages,
                             int level)
This method is invoked to enable the the area(s) to complete the message bar of the view and add its own message items. Default implementation invokes the method on the builder instance.

Parameters:
messages - the message bar structure
level - : level of current Controller. one of the LEVEL_XXX contants. in LyViewController
See Also:
LyViewController

getFastEditionAction

public LyAction getFastEditionAction(LyObject object,
                                     LyFieldInfo fieldInfo)
Finds the best suited action for fast edition of given field for a given object.

Parameters:
object - the object to edit
fieldInfo - field info to be edited
Returns:
Action found for fast edition of specified field, could be null if not found.

getDefaultAction

public LyAction getDefaultAction(LyObject object)
Retrieve the default action for an object.

Parameters:
object - object of the action.
Returns:
the default action for this object or null if there is no default action on this object.

canFree

public boolean canFree(boolean showMessage)
Check if the area controller may be freed. This method may be overriden by subclasses. The current implementation always returns true.

Parameters:
showMessage - indicates if the controller can show an warning message or not
Returns:
true if the free method can be called immediately, false otherwise.

canClose

public boolean canClose(boolean showMessage)
Check if the area controller may be closed. This method may be overriden by subclasses. The current implementation always returns true.

Parameters:
showMessage - indicates if the controller can show an warning message or not
Returns:
true if the close method can be called immediately, false otherwise.

free

public void free()
Free this controller. Overrides method from LyController :
If a parent is set, propagate the free request on parent
If no parent is set, free current controller immediately.

The parent will then invoke free(LyController controller) Method is set final, since propagation in subclasses must use free(LyController controller)

Overrides:
free in class LyController
See Also:
free(LyController)

free

public void free(LyController controller)
Free this controller on request of the specified controller.

Parameters:
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.
See Also:
free()

actionDemand

public void actionDemand(LyActionDemand demand)
Invoked when an action occurs. At this level, the implementation manages

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

menuDemand

public void menuDemand(LyMenuDemand demand)
Invoked when an menu item notification is sent to this listener.

This method is called by demandPerformed and may be overriden in subclasses.

Default implementation manages menud demands on titlebars (XML dumps, snapshots).

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

getAction

public LyAction getAction()
Accessor to the action associated to this controller. Area controllers are usually associated to an action, but this parameter may be null.

Specified by:
getAction in interface LyGetActionInterface
Returns:
The reference to associated action

getTarget

public java.lang.String getTarget()
Accessor for the action target specified when calling showView.

Returns:
Name of the action target.

getContext

public LyWorkSpace getContext()
Get current controller context.

Specified by:
getContext in interface LyContextInterface
Returns:
Current context, or null if no context is set for the view
See Also:
LyContextInterface.getContext()

setContext

public final boolean setContext(LyObjectList context)
Set the context for the controller.

Parameters:
context - Current context, or null if no context is set for the view
Returns:
true if successfull
See Also:
LyContextInterface.setContext(leon.data.LyWorkSpace), setContext(LyWorkSpace)

setContext

public boolean setContext(LyWorkSpace context)
Set the current context for the controller. If the context is unchanged, this method just call reset(). If there is a new context, this method free the current one and set the new one.

Specified by:
setContext in interface LyContextInterface
Parameters:
context - Current context, or null if no context is set for the view
Returns:
true if done
See Also:
LyContextInterface.getContext()

getContextClient

public LyAreaController getContextClient()
Accessor to the context client area controller which will receive contextual notification when something occurs on this area controller.

Used for contextual views and compound actions.

Returns:
the contextual controller, or null if no client is defined

setContextClient

public void setContextClient(LyAreaController controller)
Set accessor to the context client area controller which will receive contextual notification when something occur on this area controller.

Used for contextual views and compound actions.

Parameters:
controller - the contextual controller, or null if no client defined

getParameter

public java.lang.Object getParameter(java.lang.String name)
Gets value corresponding to the given parameter name. Shortcut for the getParameter(String, boolean) method with allowUnknowValue set to false.

Parameters:
name - Parameter name.
Returns:
Value of the parameter if found, an exception if the parameter does not exists
See Also:
LyAction.getParameter(java.lang.String), getParameter(String, boolean)

getParameter

public java.lang.Object getParameter(java.lang.String name,
                                     boolean unknown_value)
Gets value corresponding to the given parameter.

Parameters:
name - Parameter name.
unknown_value - Boolean indicating if an exception is raised if this parameter doesn't exist on the controller action.
Returns:
untyped value of the parameter if found. Returns null if no parameter with the given name is found on this action and allowUnkownValue is set to true otherwise exceptions are thrown.
Throws:
java.lang.IllegalStateException - If no parameters are registered on this action (never thrown if allowUnkownValue is on).
java.lang.IllegalArgumentException - If the action doesn't have a parameter with the given name. (never thrown if allowUnkownValue is on).

testParameter

public boolean testParameter(java.lang.String name)
Tests if the given parameter has "true" as value.

Parameters:
name - Parameter name.
Returns:
true if the parameter has the "true" value
Throws:
java.lang.IllegalArgumentException - If the action doesn't have a parameter with the given name. (never thrown if allowUnkownValue is on).

getParameterMarks

public java.util.BitSet getParameterMarks(java.lang.String name,
                                          LyBitSet.Type type)
Gets value corresponding to the given parameter mark. The result is a BitSet. A type is given to known if marks apply to action, classInfo, fieldInfo or filter.

Parameters:
name - the name of the parameter
type - the type of expected bitset (for validation) Possible values are : LyBitSet.Type.A_MARKS, TYPE_F_MARKS, TYPE_C_MARKS...
Returns:
the marks

getClassInfo

public LyClassInfo getClassInfo()
Get controller class info if any. This method is overriden if it makes sense to return a classInfo for this controller. Default returns null.

Returns:
a classinfo if any or null.

getTitle

public java.lang.String getTitle()
Gets title associated with this controller.

Returns:
the title corresponding to the action.

getContextTitle

public java.lang.String getContextTitle()
Gets context title associated with this controller.

Returns:
the title corresponding to the action.

getImage

public java.lang.String getImage()
Gets image associated with this controller. The image is the one associated to the action.

Returns:
the image corresponding to the action.

getImageTooltip

public java.lang.String getImageTooltip()
Gets image tooltip associated with this controller.

Returns:
the image tooltip corresponding to the action.

getMenuItemImage

public java.lang.String getMenuItemImage(LyAction action)
Gets menu item image associated with this controller. The image is the one associated to the action.

Parameters:
action - The action for which the image is needed.
Returns:
the image corresponding to the action.

getHelpFile

public java.lang.String getHelpFile()
Gets help file associated with this controller.

Returns:
the help file corresponding to the action.

getContent

public LyObjectList getContent()
Return list of objects presented in the area This method is overriden depending on the nature of the controller. Default returns null

Returns:
the list of objects or null if the area is empty.

getSelection

public LyObjectList getSelection()
Return list of selected objects This method is overriden depending on the nature of the controller. Default returns null

Returns:
the list of selected objects or null if the selection is empty.

getParent

public LyController getParent(boolean buildView)
Accessor to the reference to the parent controller. This method is added to allow direct access to the _parent object without building the view.

Parameters:
buildView - true if the view must be build or not
Returns:
the parent controller instance or null for root controllers.

getParent

public LyController getParent()
Accessor to the reference to the parent controller. Warning ! This method may reparent controller on its first call by building the view controller that contains this area controller. To avoid side effects during construction or freeing caused by behaviors that call this method at a wrong moment, use getParent(false) instead.

Overrides:
getParent in class LyController
Returns:
the parent controller instance or null for root controllers.

getParentAreaController

public LyAreaController getParentAreaController()
Accessor to the first parent area controller of this controller.

Returns:
the first parent area controller or null for root controllers.

getAreaStackController

public LyMultiAreaController getAreaStackController()
Accessor to the multi-area controller managing this area controller (for dialog actions only in LY_OPEN_DIALOGS_IN_SAME_VIEW mode).

Returns:
the multi-area controller managing this area controller or null if this area controller is not managed by a multi-area controller.

getViewController

public LyViewController getViewController()
Accessor to the view controller of the area. The view controller is a Frame / dialog which contains this area.

If no container is set, a new Frame controller is created for this area. Method never return null, but several calls on this method will return the same reference.

The default controller is a Frame controller, not a dialog : getViewController(false)

Specified by:
getViewController in class LyController
Returns:
the controller which manages the parent frame / dialog

getViewController

public LyViewController getViewController(boolean isDialog)
Accessor to the view controller of the area. The view controller is a Frame / dialog which contains this area.

If no container is set, a new Frame controller is created for this area. Method never return null, but several calls on this method will return the same reference.

Parameters:
isDialog - indicates wether the window is Dialog or Frame
Returns:
the controller which manages the parent frame / dialog

setViewController

public void setViewController(LyViewController viewController)
Accessor to the view controller of the area. The view controller is a Frame / dialog which contains this area. This method is reserved for internal use and should not be used by the application.

Parameters:
viewController - the controller which manages the parent frame / dialog

getRefreshTime

public long getRefreshTime()
Accessor to the refresh time of this controller. Used by thin clients to know after a selection whether the controller view must be refreshed or not.

Returns:
A negative number if view must be refreshed or the refresh date.

isViewResizable

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

Returns:
true if the view is resizable, false otherwise.

isOutlined

public boolean isOutlined()
Indicates if the view for this area acts on the outline view. By default, always return true.

Returns:
true if this area acts on the outline view, false otherwise.

getBehaviorInterface

public java.lang.Class<?> getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller.

Overrides:
getBehaviorInterface in class LyController
Returns:
Class representing the behavior interface of this controller.

getBehavior

public LyBehaviorInterface getBehavior()
Accessor to controller behavior A behavior is associated to a controller to let the developper specify application logic in the behavior.

Overrides:
getBehavior in class LyController
Returns:
associated behavior

getEnvironment

public LyEnvironment getEnvironment()
Accessor to the current Environment instance This method returns the environment of the current Action or, if the previous one is null, the session environment.

Overrides:
getEnvironment in class LyController
Returns:
current environment instance.

getLastModified

public long getLastModified()
Accessor to the last modification date of this controller. The modification date is updated when anything in the view has changed. This parameter is used by view manager to decide whether the cache could be used or not.

Overrides:
getLastModified in class LyController
Returns:
the last modification date (as described in java.util.Date.getTime())

setPreference

public void setPreference(LyPreference preference)
Sets the preference for this controller.

Parameters:
preference - the preference to applu

infoEvent

public void infoEvent(java.lang.String prefix)
Invoked when an action occurs on an info object (deletion or creation).

Specified by:
infoEvent in interface LyInfoListener
Parameters:
prefix - a file prefix

toString

public java.lang.String toString()
Get this controller as a string.

Overrides:
toString in class LyController
Returns:
this controller as a string
See Also:
LyController.getName()

setIdle

public void setIdle(boolean idle)
Sets idle status of the table.

Overrides:
setIdle in class LyController
Parameters:
idle - a boolean indicating the idle mode

getName

public java.lang.String getName(LyObject object)
Gets name of an object in the context of the given area controller.

Parameters:
object - Object for which its name is required.
Returns:
Name of the object.

getLabel

public java.lang.String getLabel(LyObject object,
                                 LyFieldInfo fieldInfo,
                                 java.lang.Object fieldValue)
Gets label of an object, for specified field info and value.

Parameters:
object - Object for which a label is required.
fieldInfo - field info.
fieldValue - value of the field.
Returns:
Label as a string.

getShortLabel

public java.lang.String getShortLabel(LyObject object,
                                      LyFieldInfo fieldInfo,
                                      java.lang.Object fieldValue)
Gets short label of an object, for specified field info and value.

Parameters:
object - Object for which a short label is required.
fieldInfo - field info.
fieldValue - value of the field.
Returns:
Short label as a string.

getInfoLabel

public LyInfoLabel getInfoLabel(LyFieldInfo fieldInfo,
                                LyInfoLabel.Type type)
Gets info label of the given type for specified field info.

Parameters:
fieldInfo - the fieldinfo
type - the type of label
Returns:
The info label if found, null otherwise.

getInfoLabel

public LyInfoLabel getInfoLabel(LyClassInfo classInfo,
                                LyInfoLabel.Type type)
Gets info label of the given type for specified class info.

Parameters:
classInfo - a classinfo
type - the type of label
Returns:
The info label if found, null otherwise.

showView

public void showView()
Make the view visible to the user.

Overrides:
showView in class LyController

showView

public void showView(java.lang.String target)
Make the view visible to the user.

Parameters:
target - the name of the target where the view must be shown

hideView

public void hideView(boolean free)
Hide the view. The effect of this command depends on the nature of the application. If the display is a fat client for example (windows (awt) / swing) this methods should close the window or hide the view.

This method should consider that the page is closed and should disappear.

Overrides:
hideView in class LyController
Parameters:
free - Indicates if only HIDDEN, not FREED (true).

hasViewController

public boolean hasViewController()
Check if the controller has a viewController.

Overrides:
hasViewController in class LyController
Returns:
boolean if the controller has a viewController

selectFileDemand

public void selectFileDemand(LySelectFileController controller,
                             LyDemand demand)
Invoked when the user validates the input content.

Specified by:
selectFileDemand in interface LySelectFileListenerInterface
Parameters:
controller - the current LySelectFileController instance
demand - demand parameters sent by the view component.

hasMark

public boolean hasMark(LyFieldInfo fieldInfo,
                       int mark)
Checks if a mark is set for the given fieldInfo in the context of the controlled action.

Parameters:
fieldInfo - Field to be checked.
mark - Mark to be checked.
Returns:
True if the given field has the given mark, false otherwise.

hasNotMark

public boolean hasNotMark(LyFieldInfo fieldInfo,
                          int mark)
Checks if a mark is unset for the given fieldInfo in the context of the controlled action.

Parameters:
fieldInfo - Field to be checked.
mark - Mark to be checked.
Returns:
True if the given field has the given mark unset, false otherwise.

getKeyValue

public java.lang.Object getKeyValue(java.lang.String key)
Retrieves a value from a registered key.

Specified by:
getKeyValue in interface LyEvaluator
Overrides:
getKeyValue in class LyController
Parameters:
key - The key that must be used.
Returns:
The value stored with the key or null if the key is not registered.

(c) January 2013 - W4 S.A.

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