|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.UIContainer<IPanel>
javax.rad.genui.container.UIPanel
javax.rad.application.genui.Content
javax.rad.application.genui.ControllerContent
javax.rad.application.genui.WorkScreen
public class WorkScreen
The WorkScreen
is a default implementation of IWorkScreen
.
Field Summary | |
---|---|
protected IWorkScreenApplication |
application
the parent application. |
Fields inherited from class javax.rad.genui.container.UIPanel |
---|
imgBack |
Fields inherited from class javax.rad.genui.UIContainer |
---|
allComponents, components |
Fields inherited from class javax.rad.genui.UIComponent |
---|
bTranslate, lLastTranslationModified, parent, popupMenu |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.application.IMessageConstants |
---|
MESSAGE_BUTTON_OK, MESSAGE_BUTTON_OK_CANCEL, MESSAGE_BUTTON_YES_NO, MESSAGE_BUTTON_YES_NO_CANCEL, MESSAGE_ICON_ERROR, MESSAGE_ICON_INFO, MESSAGE_ICON_QUESTION, MESSAGE_ICON_WARNING |
Fields inherited from interface javax.rad.model.ui.IController |
---|
PROPERTY_SEARCH_VISIBLE |
Fields inherited from interface javax.rad.model.ui.IControllable |
---|
COMMAND_DELETE, COMMAND_DUPLICATE, COMMAND_EDIT, COMMAND_EXPORT, COMMAND_FIRST, COMMAND_INSERT, COMMAND_INSERT_SUB, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS, COMMAND_RESTORE, COMMAND_SEARCH |
Constructor Summary | |
---|---|
WorkScreen()
Creates a new instance of WorkScreen . |
|
WorkScreen(IWorkScreenApplication pApplication)
Creates a new instance of WorkScreen for a parent
application. |
|
WorkScreen(IWorkScreenApplication pApplication,
java.util.Map<java.lang.String,java.lang.Object> pParameter)
Creates a new instance of WorkScreen for a parent
application and specific parameters. |
Method Summary | ||
---|---|---|
protected java.lang.String |
createComponentName()
Creates a name for this UIComponent . |
|
protected static java.lang.String |
createName(java.lang.String pSimpleClassName)
Creates a name from the given simple class name. |
|
WorkScreenHandler<IParameterChangedListener> |
eventParameterChanged()
Gets the event handler for the parameter changed event. |
|
WorkScreenHandler<IParameterChangedListener> |
eventParameterChanged(java.lang.String pName)
Gets the event handler for the changed event of a specific parameter. |
|
protected void |
fireParameterChanged(java.lang.String pName,
java.lang.Object pOld,
java.lang.Object pNew)
Notifies all parameter changed listeners about a change. |
|
IWorkScreenApplication |
getApplication()
Gets the main application of this work-screen. |
|
java.lang.Object |
getParameter(java.lang.String pName)
Gets the value of an additional parameter from the work-screen. |
|
boolean |
isModal()
Returns the modal state of this workscreen. |
|
boolean |
isParameterSet(java.lang.String pName)
Gets whether the given parameter is set. |
|
void |
notifyActivate()
Notifies the IWorkScreen, that it will be "visible again". |
|
void |
reload()
Reloads the workscreen and discard changes. |
|
java.lang.Object |
removeParameter(java.lang.String pName)
Removes the parameter from the parameter list. |
|
void |
save()
Saves the workscreen changes. |
|
void |
setModal(boolean pModal)
Sets whether this workscreen should be modal. |
|
void |
setParameter(Parameter pParameter)
Sets the given parameter. |
|
java.lang.Object |
setParameter(java.lang.String pName,
java.lang.Object pValue)
Sets additional parameters for the work-screen. |
|
|
showError(OP pOpener,
java.lang.String pMessage)
Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the
IMessageConstants.MESSAGE_BUTTON_OK button. |
|
|
showError(OP pOpener,
java.lang.String pMessage,
java.lang.String pOkAction)
Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the
IMessageConstants.MESSAGE_BUTTON_OK button. |
|
|
showInformation(OP pOpener,
java.lang.String pMessage)
Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the
IMessageConstants.MESSAGE_BUTTON_OK button. |
|
|
showInformation(OP pOpener,
java.lang.String pMessage,
java.lang.String pOkAction)
Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the
IMessageConstants.MESSAGE_BUTTON_OK button. |
|
|
showQuestion(OP pOpener,
java.lang.String pMessage,
java.lang.String pOkAction)
Shows a message with the IMessageConstants.MESSAGE_ICON_QUESTION icon and the
IMessageConstants.MESSAGE_BUTTON_YES_NO buttons. |
|
|
showQuestion(OP pOpener,
java.lang.String pMessage,
java.lang.String pOkAction,
java.lang.String pCancelAction)
Shows a message with the IMessageConstants.MESSAGE_ICON_QUESTION icon and the
IMessageConstants.MESSAGE_BUTTON_YES_NO buttons. |
Methods inherited from class javax.rad.application.genui.Content |
---|
getOpener, isDestroyed, notifyDestroy, notifyVisible, setOpener |
Methods inherited from class javax.rad.genui.container.UIPanel |
---|
getBackgroundImage, setBackgroundImage |
Methods inherited from class javax.rad.genui.UIContainer |
---|
add, add, add, add, addInternal, beforeAddNotify, checkAdd, contains, getComponent, getComponentCount, getComponents, getInsets, getLayout, getUIResourceContainer, indexOf, remove, remove, removeAll, removeInternal, setLayout, setUIResourceContainer, setZOrder, updateTranslation |
Methods inherited from class javax.rad.genui.UIResource |
---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.application.IContent |
---|
getOpener, isDestroyed, notifyDestroy, notifyVisible, setOpener |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Methods inherited from interface javax.rad.model.ui.ITranslatable |
---|
getTranslation, isTranslationEnabled, setTranslation, setTranslationEnabled |
Methods inherited from interface javax.rad.util.ITranslator |
---|
translate |
Methods inherited from interface javax.rad.ui.IContainer |
---|
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout |
Field Detail |
---|
protected IWorkScreenApplication application
Constructor Detail |
---|
public WorkScreen()
WorkScreen
.
public WorkScreen(IWorkScreenApplication pApplication)
WorkScreen
for a parent
application.
pApplication
- the parent applicationpublic WorkScreen(IWorkScreenApplication pApplication, java.util.Map<java.lang.String,java.lang.Object> pParameter)
WorkScreen
for a parent
application and specific parameters.
pApplication
- the parent applicationpParameter
- additional screen parametersMethod Detail |
---|
public void notifyActivate()
notifyActivate
in interface IWorkScreen
public IWorkScreenApplication getApplication()
getApplication
in interface IWorkScreen
public void save() throws java.lang.Exception
save
in interface IWorkScreen
java.lang.Exception
public void reload() throws java.lang.Exception
reload
in interface IWorkScreen
java.lang.Exception
public boolean isModal()
isModal
in interface IWorkScreen
true
if this workscreen should be modal, otherwise false
public void setModal(boolean pModal)
setModal
in interface IWorkScreen
pModal
- true
if this workscreen should be modal, otherwise false
public java.lang.Object setParameter(java.lang.String pName, java.lang.Object pValue)
setParameter
in interface IWorkScreen
pName
- the parameter namepValue
- the parameter
null
if the parameter was not set beforepublic java.lang.Object getParameter(java.lang.String pName)
getParameter
in interface IWorkScreen
pName
- the parameter name
public boolean isParameterSet(java.lang.String pName)
isParameterSet
in interface IWorkScreen
pName
- the parameter name
true
if the parameter is set, false
otherwisepublic java.lang.Object removeParameter(java.lang.String pName)
removeParameter
in interface IWorkScreen
pName
- the parameter name
protected java.lang.String createComponentName()
UIComponent
.
The returned name needs to be unique in the current root/workscreen and
is ideally, but not necessarily, prefixed with the UIComponent.sRootName
,
if there is any.
Overriding classes should be aware that this method will be called in
UIComponent.addNotify()
and the returned name will only be assigned to the
UIComponent
if there isn't already a name set. Also
UIComponent.stExistingNames
can be used to find out if a name has already
been assigned, and UIComponent.sRootName
to get the root name.
In rare cases UIComponent.stExistingNames
and/or UIComponent.sRootName
might
be null
when this method is called.
createComponentName
in class Content
UIComponent
.UIComponent.getExistingNames()
,
UIComponent.getRootName()
,
UIComponent.incrementNameIfExists(String, Set, boolean)
public void setParameter(Parameter pParameter)
pParameter
- the parameterprotected static java.lang.String createName(java.lang.String pSimpleClassName)
NewTestingWorkScreen NewTes-XX CreateInputWorkScreen CreInp-XX
pSimpleClassName
- the simple class name.
public <OP> IContent showInformation(OP pOpener, java.lang.String pMessage) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_INFO
icon and the
IMessageConstants.MESSAGE_BUTTON_OK
button.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/information to show
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic <OP> IContent showInformation(OP pOpener, java.lang.String pMessage, java.lang.String pOkAction) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_INFO
icon and the
IMessageConstants.MESSAGE_BUTTON_OK
button.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/information to showpOkAction
- the action to call when OK was pressed
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic <OP> IContent showError(OP pOpener, java.lang.String pMessage) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_ERROR
icon and the
IMessageConstants.MESSAGE_BUTTON_OK
button.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/error to show
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic <OP> IContent showError(OP pOpener, java.lang.String pMessage, java.lang.String pOkAction) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_ERROR
icon and the
IMessageConstants.MESSAGE_BUTTON_OK
button.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/error to showpOkAction
- the action to call when OK was pressed
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic <OP> IContent showQuestion(OP pOpener, java.lang.String pMessage, java.lang.String pOkAction) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_QUESTION
icon and the
IMessageConstants.MESSAGE_BUTTON_YES_NO
buttons.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/question to showpOkAction
- the action to call when yex was pressed
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic <OP> IContent showQuestion(OP pOpener, java.lang.String pMessage, java.lang.String pOkAction, java.lang.String pCancelAction) throws java.lang.Throwable
IMessageConstants.MESSAGE_ICON_QUESTION
icon and the
IMessageConstants.MESSAGE_BUTTON_YES_NO
buttons.
OP
- the opener typepOpener
- the opener of the informationpMessage
- the message/question to showpOkAction
- the action to call when yex was pressedpCancelAction
- the action to call when no/x was pressed
null
if the message has no content
java.lang.Throwable
- if the message could not be initializedpublic WorkScreenHandler<IParameterChangedListener> eventParameterChanged()
public WorkScreenHandler<IParameterChangedListener> eventParameterChanged(java.lang.String pName)
pName
- the connected parameter name
protected void fireParameterChanged(java.lang.String pName, java.lang.Object pOld, java.lang.Object pNew)
pName
- the parameter namepOld
- the old valuepNew
- the new value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |