|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.control.LyController
leon.control.LyAreaController
leon.control.LyTextController
public class LyTextController
This class implements a dialog window that displays a text chosen by the user or the content of a text file. The generated window can have a titleBar and an image. If a file is used, the user can specify a refresh time ( in seconds ). If the time interval is set to zero, there is no refresh.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
DEMAND_CLEAR
"Clear" demand. |
static java.lang.String |
DEMAND_SAVE_AS
"Save as" demand. |
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 | |
---|---|
LyTextController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects)
Default constructor. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String[] commands,
java.lang.String commandString)
Specific constructor for console mode. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String[] commands,
java.lang.String commandString,
java.lang.String errorMessage)
Specific constructor for console mode. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String file,
int interval)
Specific constructor. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String file,
int interval,
boolean seconds)
Specific constructor. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String command,
java.lang.String commandString)
Specific constructor for console mode. |
|
LyTextController(LySession session,
LyController parent,
LyAction action,
java.lang.String command,
java.lang.String commandString,
java.lang.String errorMessage)
Specific constructor for console mode. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action occurs. |
void |
clear()
Clear text content. |
void |
free(LyController controller)
Invoked when the controller is destroyed. |
java.lang.Class<?> |
getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller. |
int |
getInterval()
Retrieve the refresh time. |
int |
getIntervalInMillis()
Retrieve the refresh time. |
java.lang.Process |
getProcess()
Gets process corresponding to command execution when used as console. |
void |
save(java.lang.String file)
Open file chooser and save current text in chosen file. |
void |
selectFileDemand(LySelectFileController controller,
LyDemand demand)
Invoked when the user validates the input content. |
LyText |
setFile(java.lang.String file)
Set the file to display in the text window. |
LyText |
setFile(java.lang.String file,
java.lang.String fieldLabel,
int nCols,
int nRows)
Set the file to display in the text window. |
void |
setInterval(int interval)
Set the refresh time. |
void |
setIntervalInMillis(int interval)
Set the refresh time. |
LyText |
setText(java.lang.String fieldLabel,
java.lang.String itemLabel,
int nCols,
int nRows,
java.lang.String format)
Set the text to display in the text window. |
void |
updateText(java.lang.String content)
Update the text in the field with the given id. |
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 |
---|
public static final java.lang.String __VERSION
public static final java.lang.String DEMAND_SAVE_AS
public static final java.lang.String DEMAND_CLEAR
Constructor Detail |
---|
public LyTextController(LySession session, LyController parent, LyAction action, java.lang.String file, int interval)
session
- Session for this controllerparent
- Parent controlleraction
- Actionfile
- File to display in the text windowinterval
- refresh intervalpublic LyTextController(LySession session, LyController parent, LyAction action, java.lang.String file, int interval, boolean seconds)
session
- Session for this controllerparent
- Parent controlleraction
- Actionfile
- File to display in the text windowinterval
- refresh intervalseconds
- true to set the unit of the refresh interval in second, false for millisecondpublic LyTextController(LySession session, LyController parent, LyAction action, java.lang.String command, java.lang.String commandString)
session
- Session for this controllerparent
- Parent controlleraction
- Actioncommand
- Command to executecommandString
- Command string to display to the end-userpublic LyTextController(LySession session, LyController parent, LyAction action, java.lang.String[] commands, java.lang.String commandString)
session
- Session for this controllerparent
- Parent controlleraction
- Actioncommands
- Command list to executecommandString
- Command string to display to the end-userpublic LyTextController(LySession session, LyController parent, LyAction action, java.lang.String[] commands, java.lang.String commandString, java.lang.String errorMessage)
session
- Session for this controllerparent
- Parent controlleraction
- Actioncommands
- Command list to executecommandString
- Command string to display to the end-usererrorMessage
- Error message to show to the end-user if neededpublic LyTextController(LySession session, LyController parent, LyAction action, java.lang.String command, java.lang.String commandString, java.lang.String errorMessage)
session
- Session for this controllerparent
- Parent controlleraction
- Actioncommand
- Command to executecommandString
- Command string to display to the end-usererrorMessage
- error message to show to the end-user if neededpublic LyTextController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
session
- Session for this controllerparent
- Parent controlleraction
- ActionclassInfo
- related classinfoobjects
- context of the actionMethod Detail |
---|
public java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public void actionDemand(LyActionDemand demand)
actionDemand
in class LyAreaController
demand
- Paramters of the action to performLyController.demandPerformed(leon.view.event.LyDemand)
public void free(LyController controller)
free
in class LyAreaController
controller
- parent controllerLyAreaController
public int getInterval()
public int getIntervalInMillis()
public void setInterval(int interval)
interval
- Refresh time interval (in seconds). the 0 value disables the refreshpublic void setIntervalInMillis(int interval)
interval
- Refresh time interval (in seconds). the 0 value disables the refreshpublic LyText setFile(java.lang.String file, java.lang.String fieldLabel, int nCols, int nRows)
file
- Path of the file to displayfieldLabel
- Label of the text fieldnCols
- Number of columns of the text fieldnRows
- Number of rows of the text field
public LyText setFile(java.lang.String file)
file
- Path of the file to display
public LyText setText(java.lang.String fieldLabel, java.lang.String itemLabel, int nCols, int nRows, java.lang.String format)
fieldLabel
- Label of the text fielditemLabel
- Text to displaynCols
- Number of columns of the text fieldnRows
- Number of rows of the text fieldformat
- Format of the text (See also tag public void updateText(java.lang.String content)
content
- New text for the fieldpublic void clear()
public void save(java.lang.String file)
file
- path of the file used to save the contentpublic void selectFileDemand(LySelectFileController controller, LyDemand demand)
selectFileDemand
in interface LySelectFileListenerInterface
selectFileDemand
in class LyAreaController
controller
- the current LySelectFileController instancedemand
- demand parameters sent by the view component.public java.lang.Process getProcess()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |