LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behavior
Class LyActionBehavior

java.lang.Object
  extended by leon.app.behavior.LyBehavior
      extended by leon.app.behavior.LyActionBehavior
All Implemented Interfaces:
LyActionBehaviorInterface, LyBehaviorInterface, LyGetSessionInterface
Direct Known Subclasses:
LyCanvasBehavior, LyChartBehavior, LyClassBehavior, LyDashboardBehavior, LyExportBehavior, LyHiddenObjectsBehavior, LyImportBehavior, LyLoginBehavior, LyMailBehavior, LyMetricsPanelBehavior, LyPanelBehavior, LyPasswordBehavior, LyPrintBehavior, LyPrintModelBehavior, LyShowUrlBehavior, LySortWizardBehavior, LyTabActionBehavior, LyTextBehavior, LyUserInputBehavior, LyWaitBehavior

public abstract class LyActionBehavior
extends LyBehavior
implements LyActionBehaviorInterface

This class implements the default behavior for actions that are controlled by an area controller.


Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LyActionBehavior()
          Construct a class behavior.
 
Method Summary
 boolean endAction(LyAreaController areaController, LyAction action)
          Ends an action for the given controller.
 LyObjectList getClientContext(LyAreaController areaController, LyObjectList context)
          Gets context to set on the controllers that have the given area controller as context.
 java.lang.String getContextTitle(LyAreaController areaController, LyAction action, LyObjectList context)
          Gets title corresponding to the given action and context.
 java.lang.String getHelpFile(LyAreaController areaController, LyAction action)
          Gets help file for the given action.
 java.lang.String getImage(LyAreaController areaController, LyAction action)
          Gets the image corresponding to the given object for the given controller.
 java.lang.String getImageTooltip(LyAreaController areaController, LyAction action)
          Gets image tooltip corresponding to the given action.
 java.lang.Object getKeyValue(java.lang.String key)
          Retrieves a value from a registered key.
 java.lang.String getMenuItemImage(LyAreaController areaController, LyAction action)
          Gets the menu image corresponding to the given action for the given controller.
 java.lang.String getTitle(LyAreaController areaController, LyAction action)
          Gets title corresponding to the given action.
 boolean reset(LyAreaController areaController, boolean full)
          The controller resets its content.
 boolean startAction(LyAreaController areaController, LyAction action)
          Starts an action for the given controller.
 
Methods inherited from class leon.app.behavior.LyBehavior
free, getSession, handleDemand, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface
free, handleDemand, init
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyActionBehavior

public LyActionBehavior()
Construct a class behavior.

Method Detail

startAction

public boolean startAction(LyAreaController areaController,
                           LyAction action)
Starts an action for the given controller. This method is the right place to allocate specific resources requiered for the given action. The default implementation does nothing and returns true.

Specified by:
startAction in interface LyActionBehaviorInterface
Parameters:
areaController - the current LyAreaController instance
action - the action that will be executed
Returns:
true

reset

public boolean reset(LyAreaController areaController,
                     boolean full)
The controller resets its content. This method is the right place to add extra processing when the view is set.
The default implementation does nothing and returns true.

Specified by:
reset in interface LyActionBehaviorInterface
Parameters:
areaController - the current LyAreaController instance
full - indicates if the controller performed a full reset of its content or a partial reset. The meaning of a full reset depends on controller implementation.
Returns:
true

endAction

public boolean endAction(LyAreaController areaController,
                         LyAction action)
Ends an action for the given controller. This method is the right place to free specific resources allocated for the given action.
The default implementation does nothing and returns true.

Specified by:
endAction in interface LyActionBehaviorInterface
Parameters:
areaController - the current LyAreaController instance
action - the action that was executed
Returns:
true

getImage

public java.lang.String getImage(LyAreaController areaController,
                                 LyAction action)
Gets the image corresponding to the given object for the given controller. This image is mostly used in titlebar.
The default implementation does nothing and returns null.

Specified by:
getImage in interface LyActionBehaviorInterface
Parameters:
areaController - controller for which the image is required.
action - the action that was executed
Returns:
Logical name of the image for the given action. null means action image, the string "_null" means no image.

getImageTooltip

public java.lang.String getImageTooltip(LyAreaController areaController,
                                        LyAction action)
Gets image tooltip corresponding to the given action.
Default implementation only calls getTitle(areaController, action).

Specified by:
getImageTooltip in interface LyActionBehaviorInterface
Parameters:
areaController - the current LyAreaController instance
action - the action that was executed
Returns:
image tooltip for the given action.

getMenuItemImage

public java.lang.String getMenuItemImage(LyAreaController areaController,
                                         LyAction action)
Gets the menu image corresponding to the given action for the given controller.
The default implementation only calls getImage(areaController, action).

Specified by:
getMenuItemImage in interface LyActionBehaviorInterface
Parameters:
areaController - The controller for which the image is required.
action - The action for which the image is required
Returns:
Logical name of the image for the given action. null means action image, the string "_null" means no image.

getTitle

public java.lang.String getTitle(LyAreaController areaController,
                                 LyAction action)
Gets title corresponding to the given action.
The default implementation returns the action name.

Specified by:
getTitle in interface LyActionBehaviorInterface
Parameters:
areaController - the current LyAreaController instance
action - the action that was executed
Returns:
the given action name

getContextTitle

public java.lang.String getContextTitle(LyAreaController areaController,
                                        LyAction action,
                                        LyObjectList context)
Gets title corresponding to the given action and context. Default implementation does nothing and return null.

Specified by:
getContextTitle in interface LyActionBehaviorInterface
Parameters:
areaController - the current controller instance
action - the action that was executed
context - the action context
Returns:
null

getHelpFile

public java.lang.String getHelpFile(LyAreaController areaController,
                                    LyAction action)
Gets help file for the given action. The default implementation does nothing and return null.

Specified by:
getHelpFile in interface LyActionBehaviorInterface
Parameters:
areaController - the current controller instance
action - the action that was executed
Returns:
null

getClientContext

public LyObjectList getClientContext(LyAreaController areaController,
                                     LyObjectList context)
Gets context to set on the controllers that have the given area controller as context.

Specified by:
getClientContext in interface LyActionBehaviorInterface
Parameters:
areaController - the current controller instance.
context - the context that is about to be set.
Returns:
The desired client context.

getKeyValue

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

Specified by:
getKeyValue in interface LyActionBehaviorInterface
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