LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyFrameController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyViewController
          extended by leon.control.LyFrameController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyGuiListener, LyEvaluator, LyDemandListener, LyAnswerInterface, LyQuestionAnswerInterface

public class LyFrameController
extends LyViewController

This controller manages a frame window (or view). This Frame is used as the view controller of other views (such as creation/modification/consultation forms). A Frame usually contains a 'major' view such as tables, maps, trees, not an edition form. However, the content is defined in the internal area.

Unlike a Dialog, a frame is a main window which may or may not have a parent window. If the frame has no parent, this is a 'root' level Frame. A Frame has a MenuBar, and usually contains a titlebar and toolbar.

The LyFrameController automatically calculates the window position and size.

The other view controller is LyDialogController.

See Also:
LyViewController, LyDialogController

Field Summary
static java.lang.String __VERSION
          File Version
static java.lang.String DEMAND_LOAD_DATA
          Identifier of a action in the view : Loading data.
static java.lang.String DEMAND_RUN_GC
          Identifier of a action in the view : Run garbage collector.
static java.lang.String DEMAND_SAVE_DATA
          Identifier of a action in the view : Saving data.
static int VIEW_XOFFSET
          Default X value for the offset (relative to parent) to determine view position when this frame is opened.
static int VIEW_YOFFSET
          Default Y value for the offset (relative to parent) to determine view position when this frame is opened.
 
Fields inherited from class leon.control.LyViewController
DEMAND_ABOUT, DEMAND_CLOSE, DEMAND_EXIT, DEMAND_HIDE, DEMAND_LOG, DEMAND_UPDATE, DEMAND_VERSION, LEVEL_PRIMARY, LEVEL_ROOT, LEVEL_SECONDARY, LEVEL_THIRD
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyFrameController(LySession session, LyController parent)
          Constructor.
LyFrameController(LySession session, LyController parent, LyAreaController areaController)
          Constructor.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action occurs.
 void clearViewCache()
          Clears all cached data for this controller (especially the view and the component).
 void demandPerformed(LyDemand demand)
          Invoked when a notification is sent to this listener.
 void exit()
          Exit.
 void showView()
          Make the view visible to the user.
 void updateUndoRedo()
          Update the undo redo stack
 
Methods inherited from class leon.control.LyViewController
close, free, getAreaController, getContext, getControllerStack, getEnvironment, getFreeOnClose, getLastModified, getSon, getSonsCount, getView, getViewArea, getViewController, hasPrintThread, hasSonShowing, hideView, initialize, interruptPrintThread, isInShowProcess, isShown, questionAnswer, setAreaController, setContext, setControllerStack, setFreeOnClose, setIdle, setInShowProcess, setName, setPrintThread, setViewArea
 
Methods inherited from class leon.control.LyController
activateViewDemand, dragDropDemand, getApplication, getBehavior, getBehaviorInterface, getBuilder, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getKeyValue, getName, getObjectId, getParent, getSession, getUserData, getViewManager, hasViewController, helpDemand, hideView, isFreed, isIdle, menuDemand, selectionDemand, setBuilder, setBuilderClass, setLastModified, setUserData, showError, showError, showWarning, toString, 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

VIEW_XOFFSET

public static int VIEW_XOFFSET
Default X value for the offset (relative to parent) to determine view position when this frame is opened.


VIEW_YOFFSET

public static int VIEW_YOFFSET
Default Y value for the offset (relative to parent) to determine view position when this frame is opened.


DEMAND_SAVE_DATA

public static final java.lang.String DEMAND_SAVE_DATA
Identifier of a action in the view : Saving data.


DEMAND_LOAD_DATA

public static final java.lang.String DEMAND_LOAD_DATA
Identifier of a action in the view : Loading data.


DEMAND_RUN_GC

public static final java.lang.String DEMAND_RUN_GC
Identifier of a action in the view : Run garbage collector.

Constructor Detail

LyFrameController

public LyFrameController(LySession session,
                         LyController parent)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller : this parameter may be null for 'root' controller

LyFrameController

public LyFrameController(LySession session,
                         LyController parent,
                         LyAreaController areaController)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller : this parameter may be null for 'root' controller
areaController - the area which is inside the dialog : an area automatically builds a view controller (dialog or frame) when showView is called.
Method Detail

actionDemand

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

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

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 LyViewController

showView

public void showView()
Make the view visible to the user. Automatically calculate location on screen If the display is a fat client (windows (awt) / swing) this methods should open a window and show the view. In the case of thin client (html), this prepares the pages which will be returned and displayed in the client browser.

Overrides:
showView in class LyViewController

demandPerformed

public void demandPerformed(LyDemand demand)
Description copied from class: LyViewController
Invoked when a notification is sent to this listener. Overriden to call behvior of the area controller.

Specified by:
demandPerformed in interface LyDemandListener
Overrides:
demandPerformed in class LyViewController
Parameters:
demand - demand parameters sent by the view component.
See Also:
LyViewController.demandPerformed(leon.view.event.LyDemand)

exit

public void exit()
Description copied from class: LyViewController
Exit.

Overrides:
exit in class LyViewController
See Also:
LyViewController.exit()

updateUndoRedo

public void updateUndoRedo()
Update the undo redo stack


(c) January 2013 - W4 S.A.

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