LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LySelectFileController

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

public class LySelectFileController
extends LyUserInputController

This class implements a file/directory selection


Field Summary
static java.lang.String __VERSION
          File Version
static int FILE_WIDTH
          Default file width
static java.lang.String LY_SELECT_FILE_DEFAULT_PATH_KEY
          Default Path key
 
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
LySelectFileController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList context)
          This constructor creates a new controller object.
LySelectFileController(LySession session, LyController parent, LyAction action, LyObjectList context)
          This constructor creates a new controller object.
LySelectFileController(LySession session, LyController parent, LyClassInfo classInfo)
          This constructor creates a new controller object.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action occurs.
 void addListener(LySelectFileListenerInterface listener)
          Add a listener for callback
 void free()
          Free this controller.
 java.lang.String getDefaultPath()
          default opening directory or file.
 java.lang.String getMessage()
          Accessor detailed message in the view
 java.lang.String getSelectedPath()
          Return user path selection in the input dialog
 LyFile.Type getType()
          Accessor file type in selector
 void removeListener(LySelectFileListenerInterface listener)
          remove a listener for callback
 void reset(boolean full)
          Reset all the content of the view.
 void setDefaultPath(java.lang.String path)
          Set the default path
 void setMessage(java.lang.String message)
          Accessor detailed message in the view
 void setSelectedPath(java.lang.String path)
          Accessor user path selection in the input dialog
 void setType(LyFile.Type type)
          Accessor file type in selector
 
Methods inherited from class leon.control.LyUserInputController
addBoolean, addBoolean, addChoice, addChoice, addDate, addDate, addFile, addFile, addLabel, addLabel, addList, addList, addNumber, addNumber, addRelation, addRelation, addText, addText, addText, getBehaviorInterface, getClassInfo, getComponent, getFormComponent, getImage, getInputId, getTitleBar, getViewController, isDialog, isViewResizable, setBehavior, setBuilder, setDialog, setImage, setInputId, setTitleBar
 
Methods inherited from class leon.control.LyAreaController
canClose, canFree, clearViewCache, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, getContent, getContext, getContextClient, getContextTitle, getDefaultAction, getEnvironment, getFastEditionAction, getHelpFile, 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, menuDemand, reset, selectFileDemand, setContext, setContext, setContextClient, setIdle, setPreference, setViewController, showView, showView, testParameter, toString, update, updateTitleBar
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, 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

LY_SELECT_FILE_DEFAULT_PATH_KEY

public static final java.lang.String LY_SELECT_FILE_DEFAULT_PATH_KEY
Default Path key

See Also:
Constant Field Values

FILE_WIDTH

public static int FILE_WIDTH
Default file width

Constructor Detail

LySelectFileController

public LySelectFileController(LySession session,
                              LyController parent,
                              LyClassInfo classInfo)
This constructor creates a new controller object.

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)
classInfo - related classInfo.

LySelectFileController

public LySelectFileController(LySession session,
                              LyController parent,
                              LyAction action,
                              LyObjectList context)
This constructor creates a new controller object.

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).

LySelectFileController

public LySelectFileController(LySession session,
                              LyController parent,
                              LyAction action,
                              LyClassInfo classInfo,
                              LyObjectList context)
This constructor creates a new controller object.

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 - This parameter is not used. Kept from introspection compatibility.
context - current context (may be null if the view is not contextual to a list of objects).
Method Detail

reset

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

Overrides:
reset in class LyUserInputController
Parameters:
full - Boolean indicating if a full reset (including reset of datas) is required or not (only reset graphical area).

free

public void free()
Description copied from class: LyAreaController
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 LyAreaController
See Also:
LyAreaController.free()

actionDemand

public void actionDemand(LyActionDemand demand)
Invoked when an action occurs. (LyDemandListener interface) The current implementation calls the userInputDemand method of the behavior.

Overrides:
actionDemand in class LyUserInputController
Parameters:
demand - the action demand.
See Also:
LyController.demandPerformed(leon.view.event.LyDemand)

getDefaultPath

public java.lang.String getDefaultPath()
default opening directory or file.

Returns:
the path or null

setDefaultPath

public void setDefaultPath(java.lang.String path)
Set the default path

Parameters:
path - the default path

getSelectedPath

public java.lang.String getSelectedPath()
Return user path selection in the input dialog

Returns:
user path

setSelectedPath

public void setSelectedPath(java.lang.String path)
Accessor user path selection in the input dialog

Parameters:
path - user path

getMessage

public java.lang.String getMessage()
Accessor detailed message in the view

Returns:
the requested message

setMessage

public void setMessage(java.lang.String message)
Accessor detailed message in the view

Parameters:
message - the requested message

getType

public LyFile.Type getType()
Accessor file type in selector

Returns:
one of the File.Type values

setType

public void setType(LyFile.Type type)
Accessor file type in selector

Parameters:
type - one of the File.Type values

addListener

public void addListener(LySelectFileListenerInterface listener)
Add a listener for callback

Parameters:
listener -

removeListener

public void removeListener(LySelectFileListenerInterface listener)
remove a listener for callback

Parameters:
listener -

(c) January 2013 - W4 S.A.

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