LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyWaitController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyWaitController
All Implemented Interfaces:
java.lang.Runnable, LyGetSessionInterface, LyContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener

public class LyWaitController
extends LyAreaController
implements java.lang.Runnable

This class implements a wait controller. This controller waits for a given amount of time, before executing a new action. It is associated with a builder (LyWaitBuilder) and a behavior that implements LyWaitBehaviorInterface. Usually, this behavior is an instance of LyWaitBehavior

See Also:
LyWaitBuilder, LyWaitBehaviorInterface, LyWaitBehavior

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
LyWaitController(LySession session, LyController parent, LyAction action, int min, int max, int nCols, int nRows)
          Default constructor.
LyWaitController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList context)
          Constructor.
 
Method Summary
 boolean canClose(boolean showMessage)
          Wait panel is closable only when action has a commands bar.
 void endWait(boolean ok)
          This method is called when the wait is over If the ok parameter is 'true', this method invoke the next action.
 void free(LyController controller)
          Free this controller.
 java.lang.Class<?> getBehaviorInterface()
          Method that gives the interface that must be implemented by the behavior associated to this controller.
 LyGauge getGaugeComponent()
          Accessor to the Gauge component.
 LyIcon getIconComponent()
          Accessor to the Icon component.
 LyLabel getLabelComponent()
          Accessor to the Label component.
 int getNCols()
          Accessor to current number of columns.
 int getNMax()
          Accessor to current maximum value.
 int getNMin()
          Accessor to current minimum value.
 int getNRows()
          Accessor to current number of rows.
 LyController[] invokeNextActions()
          Proceed to next actions after a login (login should be valid at that point).
 boolean isViewResizable()
          Indicates if the view for this wait controller is resizable.
 void reset()
          Reset all.
 void run()
          Implementation of the runnable interface Periodic check of the client : invoke free to stop.
 void setUpdateDelay(long delay)
          Set periodic update delay on client.
 void showView()
          Show the view and start the waiting thread.
 
Methods inherited from class leon.control.LyAreaController
actionDemand, canFree, clearViewCache, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, getClassInfo, 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, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, menuDemand, 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, 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
Constructor Detail

LyWaitController

public LyWaitController(LySession session,
                        LyController parent,
                        LyAction action,
                        LyClassInfo classInfo,
                        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 ...)
classInfo - related classInfo.
context - current context (may be null if the view is not contextual to a list of objects).

LyWaitController

public LyWaitController(LySession session,
                        LyController parent,
                        LyAction action,
                        int min,
                        int max,
                        int nCols,
                        int nRows)
Default constructor.

Parameters:
session - current session
parent - window controller
action - associated to the wait window.
min - minimum value.
max - maximum value.
nCols - preferred number of columns -chars- in notice. -1 (default) is auto-size.
nRows - preferred number of rows -lines- in notice. -1 (default) is auto-size.
Method Detail

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.

reset

public void reset()
Reset all. This method may be called several times.

Overrides:
reset in class LyAreaController
See Also:
LyAreaController.reset(boolean)

showView

public void showView()
Show the view and start the waiting thread.

Overrides:
showView in class LyAreaController

endWait

public void endWait(boolean ok)
This method is called when the wait is over If the ok parameter is 'true', this method invoke the next action.

Parameters:
ok - true if the wait was successull

invokeNextActions

public LyController[] invokeNextActions()
Proceed to next actions after a login (login should be valid at that point).

Returns:
a list of invoked controllers

free

public void free(LyController controller)
Free this controller.

Overrides:
free in class LyAreaController
Parameters:
controller - parent controller
See Also:
LyAreaController.free()

run

public void run()
Implementation of the runnable interface Periodic check of the client : invoke free to stop.

Specified by:
run in interface java.lang.Runnable

isViewResizable

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

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

getGaugeComponent

public LyGauge getGaugeComponent()
Accessor to the Gauge component.

Returns:
the gauge view component

getIconComponent

public LyIcon getIconComponent()
Accessor to the Icon component.

Returns:
the icon view component

getLabelComponent

public LyLabel getLabelComponent()
Accessor to the Label component.

Returns:
the label view component

setUpdateDelay

public void setUpdateDelay(long delay)
Set periodic update delay on client.

Parameters:
delay - refresh interval (in ms)

getNMin

public int getNMin()
Accessor to current minimum value.

Returns:
the minimum value

getNMax

public int getNMax()
Accessor to current maximum value.

Returns:
the maximum value

getNRows

public int getNRows()
Accessor to current number of rows.

Returns:
the number of rows

getNCols

public int getNCols()
Accessor to current number of columns.

Returns:
the number of columns

canClose

public boolean canClose(boolean showMessage)
Wait panel is closable only when action has a commands bar.

Overrides:
canClose in class LyAreaController
Parameters:
showMessage - indicates if a message must be shown
Returns:
true if the controller can be closes

(c) January 2013 - W4 S.A.

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