|
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.LyPanelController
leon.control.LyShowUrlController
public class LyShowUrlController
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 |
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 | |
---|---|
LyShowUrlController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList context)
Specific constructor. |
Method Summary | |
---|---|
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. |
LyObjectList |
getContent()
This method is overriden to return null because there is not any content. |
java.lang.String |
getFileContent(java.io.InputStream in,
LyEnvironment environment,
boolean showError)
Get the file content |
java.lang.String |
getFileContent(java.lang.String fileName,
LyEnvironment environment)
Gets the given file content. |
java.lang.String |
getFileContent(java.lang.String fileName,
LyEnvironment environment,
boolean showError)
Gets the given file content. |
java.io.InputStream |
getFileInputStream(java.lang.String urlName,
LyEnvironment environment,
boolean showError)
Gets the Input Stream associated to the given file name. |
java.net.URL |
getFileUrl(java.lang.String fileName,
LyEnvironment environment,
boolean showError)
Gets the URL from the file name. |
LyPanel |
getPanelComponent()
Accessor to the Table component. |
LyObjectList |
getSelection()
This method is overriden to return null because there is not any selection. |
java.lang.String |
getUrl()
Gets the current url. |
void |
initialize(LyAction action)
Initialize the controller for the given action |
LyText |
setText(java.lang.String fieldLabel,
java.lang.String itemLabel,
int nCols,
int nRows,
java.lang.String format)
Sets the text to display in the text window. |
LyText |
setUrl(java.lang.String url)
Sets the file to display in the text window. |
LyText |
setUrl(java.lang.String request,
java.lang.String fieldLabel,
int nCols,
int nRows)
Sets the url to display in the text window. |
void |
showView()
Make the view visible to the user. |
void |
updateText(java.lang.String itemLabel)
Updates the text in the field with the given id. |
void |
updateUrl(java.lang.String url)
Sets the current url and update the view. |
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
Constructor Detail |
---|
public LyShowUrlController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList context)
session
- Session for this controllerparent
- Parent controlleraction
- ActionclassInfo
- corresponding classinfocontext
- current contextMethod Detail |
---|
public void initialize(LyAction action)
action
- an actionpublic java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public void free(LyController controller)
free
in class LyPanelController
controller
- parent controllerLyAreaController
public LyText setUrl(java.lang.String request, java.lang.String fieldLabel, int nCols, int nRows)
request
- Url to displayfieldLabel
- Label of the text fieldnCols
- Number of columns of the text fieldnRows
- Number of rows of the text field
public java.net.URL getFileUrl(java.lang.String fileName, LyEnvironment environment, boolean showError)
If a url is found, encode the URL name thaks to the method
LyString.getXmlString(String, boolean, boolean)
.
fileName
- the file whose URL is requiredenvironment
- the current environmentshowError
- indicates if an error message has to be shown to the user.
public java.io.InputStream getFileInputStream(java.lang.String urlName, LyEnvironment environment, boolean showError)
urlName
- the file to read given as an url stringenvironment
- the current environmentshowError
- if true, show errors thrown to the user
LyShowUrlBehavior.getFileUrl(LyShowUrlController, String, LyEnvironment, boolean)
public java.lang.String getFileContent(java.lang.String fileName, LyEnvironment environment, boolean showError)
fileName
- the file to readenvironment
- the current environmentshowError
- indicates if an error has to be shown to the user. If false, only print
error in log files
public java.lang.String getFileContent(java.io.InputStream in, LyEnvironment environment, boolean showError)
in
- the source input streamenvironment
- the current environmentshowError
- indicates if an error must be shown to the user if needed
public java.lang.String getFileContent(java.lang.String fileName, LyEnvironment environment)
fileName
- the file to readenvironment
- the current environment
getFileContent(String, LyEnvironment, boolean)
public LyText setUrl(java.lang.String url)
url
- Url 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 itemLabel)
itemLabel
- New text for the fieldpublic LyObjectList getSelection()
getSelection
in class LyPanelController
public LyObjectList getContent()
getContent
in class LyPanelController
public LyPanel getPanelComponent()
LyPanelController
getPanelComponent
in class LyPanelController
LyPanelController.getPanelComponent()
public void showView()
For any display, this method should consider that the page is ready to be shown and should be displayed.
showView
in class LyAreaController
public void updateUrl(java.lang.String url)
url
- the new urlpublic java.lang.String getUrl()
LyShowUrlBehavior.getUrl(LyShowUrlController)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |