LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyDeleteController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyDeleteController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyControllerContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener, LyAnswerInterface, LyMessageAnswerInterface, LyQuestionAnswerInterface

public class LyDeleteController
extends LyAreaController
implements LyMessageAnswerInterface, LyQuestionAnswerInterface, LyControllerContextInterface

This class describes the controller associated to a delete action. This class asks the user for a confirmation and accept single object or multiple objects deletion.

This class is associated to a LyDeleteBehaviorInterface, usually a LyClassBehavior instance.

The delete controller does not have any builder (no view is generated).

See Also:
LyDeleteBehaviorInterface, LyClassBehavior

Field Summary
static java.lang.String __VERSION
          File version
 
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
LyDeleteController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Constructor.
 
Method Summary
 void free()
          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()
          Get class info of deleted object(s).
 LyContext getControllerContext()
          Gets the controller context.
 LyObject getObject()
          Access to current object being deleted.
 LyObjectList getObjects()
          Access to controlled object list.
 LyView getView()
          Accessor to the view that contains the component (getComponent) of the controller.
 LyViewController getViewController()
          Accessor to the view controller (Frame or dialog controller) which is the container of this view.
 boolean isLast()
          Indicates wether this is last object in list.
 void messageAnswer(int result, java.lang.Object clientData)
          Answer to a askQuestion request.
 void questionAnswer(boolean result, java.lang.Object clientData)
          Answer to a askQuestion request.
 void showView()
          Make the view visible to the user.
 
Methods inherited from class leon.control.LyAreaController
actionDemand, canClose, canFree, clearViewCache, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, getContent, getContext, getContextClient, getContextTitle, getDefaultAction, getEnvironment, getFastEditionAction, getHelpFile, getImage, getImageTooltip, getInfoLabel, getInfoLabel, getKeyValue, getLabel, getLastModified, getMenuItemImage, getName, getParameter, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getRefreshTime, getSelection, getShortLabel, getTarget, getTitle, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, isViewResizable, menuDemand, reset, reset, selectFileDemand, setContext, setContext, setContextClient, setIdle, setPreference, setViewController, showView, testParameter, toString, update, updateTitleBar
 
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, 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
Constructor Detail

LyDeleteController

public LyDeleteController(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 (or null for 'root' controller).
action - related action. If an action is specified, the controller uses action parameters (action name, action specific XML view description ...)
classInfo - kept for compatibility (introspection). Not used.
objects - current object list being deleted. Must be not null.
See Also:
getClassInfo()
Method Detail

free

public void free()
Free this controller.

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

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 LyAreaController
Returns:
Class representing the behavior interface of this controller.

showView

public void showView()
Make the view visible to the user. This view raises a confirmation dialog.

Overrides:
showView in class LyAreaController

questionAnswer

public void questionAnswer(boolean result,
                           java.lang.Object clientData)
Answer to a askQuestion request.

Specified by:
questionAnswer in interface LyQuestionAnswerInterface
Parameters:
result - one of the possible return code for LyViewManager : COMMAND_XXX
clientData - data specified in the askQuestion method
See Also:
LyMessageAnswerInterface

messageAnswer

public void messageAnswer(int result,
                          java.lang.Object clientData)
Answer to a askQuestion request. Internal use only.

Specified by:
messageAnswer in interface LyMessageAnswerInterface
Parameters:
result - one of the possible return code for LyViewManager : COMMAND_XXX
clientData - data specified in the askQuestion method
See Also:
LyMessageAnswerInterface

getViewController

public LyViewController getViewController()
Accessor to the view controller (Frame or dialog controller) which is the container of this view. This method returns null since there is no view controller associated to the delete action.

Overrides:
getViewController in class LyAreaController
Returns:
the reference to a view controller, returns null

getView

public LyView getView()
Accessor to the view that contains the component (getComponent) of the controller. Always return null (no view is associated)

Overrides:
getView in class LyController
Returns:
null

getObject

public LyObject getObject()
Access to current object being deleted.

Returns:
current object reference. If multiple deletion, this value is updated before each call to the behavior.

isLast

public boolean isLast()
Indicates wether this is last object in list.

Returns:
true if current object is the last one.

getObjects

public LyObjectList getObjects()
Access to controlled object list. Never return null. If there is only one object being deleted, The list contains a single object.

Returns:
the list of object resquested for deletion.

getClassInfo

public LyClassInfo getClassInfo()
Get class info of deleted object(s). The classInfo is obtained from the classInfo of the first object in the object list.

Overrides:
getClassInfo in class LyAreaController
Returns:
the classInfo associated to this deletion request.

getControllerContext

public LyContext getControllerContext()
Gets the controller context.

Specified by:
getControllerContext in interface LyControllerContextInterface
Returns:
The controller context.
See Also:
LyControllerContextInterface.getControllerContext()

(c) January 2013 - W4 S.A.

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