javax.rad.application.genui
Class WorkScreen

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<C>
          extended by javax.rad.genui.UIContainer<IPanel>
              extended by javax.rad.genui.container.UIPanel
                  extended by javax.rad.application.genui.Content
                      extended by javax.rad.application.genui.WorkScreen
All Implemented Interfaces:
IContent, IMessageConstants, IWorkScreen, ITranslatable, IPanel, IComponent, IContainer, IResource, INamedObject
Direct Known Subclasses:
RemoteWorkScreen

public class WorkScreen
extends Content
implements IWorkScreen

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
components
 
Fields inherited from class javax.rad.genui.UIComponent
lLastTranslationModified, parent
 
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_ICON_ERROR, MESSAGE_ICON_INFO, MESSAGE_ICON_QUESTION, MESSAGE_ICON_WARNING
 
Constructor Summary
WorkScreen(IWorkScreenApplication pApplication)
          Creates a new instance of WorkScreen for a parent application.
 
Method Summary
 IWorkScreenApplication getApplication()
          Gets the main application of this work-screen.
 Object getParameter(String pName)
          Gets the value of an additional parameter from the work-screen.
 boolean isModal()
          Returns the modal state of this workscreen.
 void notifyActivate()
          Notifies the IWorkScreen, that it will be "visible again".
 void reload()
          Reloads the workscreen and discard changes.
 void save()
          Saves the workscreen changes.
 void setModal(boolean pModal)
          Sets whether this workscreen should be modal.
 Object setParameter(String pName, Object pValue)
          Sets additional parameters for the work-screen.
<OP> IContent
showError(OP pOpener, String pMessage)
          Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the IMessageConstants.MESSAGE_BUTTON_OK button.
<OP> IContent
showError(OP pOpener, String pMessage, String pOkAction)
          Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the IMessageConstants.MESSAGE_BUTTON_OK button.
<OP> IContent
showInformation(OP pOpener, String pMessage)
          Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the IMessageConstants.MESSAGE_BUTTON_OK button.
<OP> IContent
showInformation(OP pOpener, String pMessage, String pOkAction)
          Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the IMessageConstants.MESSAGE_BUTTON_OK button.
<OP> IContent
showQuestion(OP pOpener, String pMessage, String pOkAction)
          Shows a message with the IMessageConstants.MESSAGE_ICON_QUESTION icon and the IMessageConstants.MESSAGE_BUTTON_YES_NO buttons.
<OP> IContent
showQuestion(OP pOpener, String pMessage, String pOkAction, 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, 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, addNotify, beforeAddNotify, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeNotify, setLayout, setZOrder, updateTranslation
 
Methods inherited from class javax.rad.genui.UIComponent
capture, createCellFormatter, createNodeFormatter, debug, error, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getResource, getSize, getToolTipText, getTranslation, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, requestFocus, setBackground, setBounds, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTipText, setTranslation, setTranslationEnabled, setVisible, translate
 
Methods inherited from class javax.rad.genui.UIResource
equals, getUIResource, hashCode, 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, notifyDestroy, notifyVisible, setOpener
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 

Field Detail

application

protected IWorkScreenApplication application
the parent application.

Constructor Detail

WorkScreen

public WorkScreen(IWorkScreenApplication pApplication)
Creates a new instance of WorkScreen for a parent application.

Parameters:
pApplication - the parent application
Method Detail

notifyActivate

public void notifyActivate()
Notifies the IWorkScreen, that it will be "visible again".

Specified by:
notifyActivate in interface IWorkScreen

getApplication

public IWorkScreenApplication getApplication()
Gets the main application of this work-screen.

Specified by:
getApplication in interface IWorkScreen
Returns:
the main application base

save

public void save()
          throws Exception
Saves the workscreen changes.

Specified by:
save in interface IWorkScreen
Throws:
Exception

reload

public void reload()
            throws Exception
Reloads the workscreen and discard changes.

Specified by:
reload in interface IWorkScreen
Throws:
Exception

isModal

public boolean isModal()
Returns the modal state of this workscreen.

Specified by:
isModal in interface IWorkScreen
Returns:
true if this workscreen should be modal, otherwise false

setModal

public void setModal(boolean pModal)
Sets whether this workscreen should be modal.

Specified by:
setModal in interface IWorkScreen
Parameters:
pModal - true if this workscreen should be modal, otherwise false

setParameter

public Object setParameter(String pName,
                           Object pValue)
Sets additional parameters for the work-screen. This method should be used for additional configuration steps.

Specified by:
setParameter in interface IWorkScreen
Parameters:
pName - the parameter name
pValue - the parameter
Returns:
the previous value for the parameter name or null if the parameter was not set before

getParameter

public Object getParameter(String pName)
Gets the value of an additional parameter from the work-screen.

Specified by:
getParameter in interface IWorkScreen
Parameters:
pName - the parameter name
Returns:
the parameter

showInformation

public <OP> IContent showInformation(OP pOpener,
                                     String pMessage)
                         throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the IMessageConstants.MESSAGE_BUTTON_OK button.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/information to show
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized

showInformation

public <OP> IContent showInformation(OP pOpener,
                                     String pMessage,
                                     String pOkAction)
                         throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_INFO icon and the IMessageConstants.MESSAGE_BUTTON_OK button.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/information to show
pOkAction - the action to call when OK was pressed
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized

showError

public <OP> IContent showError(OP pOpener,
                               String pMessage)
                   throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the IMessageConstants.MESSAGE_BUTTON_OK button.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/error to show
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized

showError

public <OP> IContent showError(OP pOpener,
                               String pMessage,
                               String pOkAction)
                   throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_ERROR icon and the IMessageConstants.MESSAGE_BUTTON_OK button.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/error to show
pOkAction - the action to call when OK was pressed
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized

showQuestion

public <OP> IContent showQuestion(OP pOpener,
                                  String pMessage,
                                  String pOkAction)
                      throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_QUESTION icon and the IMessageConstants.MESSAGE_BUTTON_YES_NO buttons.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/question to show
pOkAction - the action to call when yex was pressed
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized

showQuestion

public <OP> IContent showQuestion(OP pOpener,
                                  String pMessage,
                                  String pOkAction,
                                  String pCancelAction)
                      throws Throwable
Shows a message with the IMessageConstants.MESSAGE_ICON_QUESTION icon and the IMessageConstants.MESSAGE_BUTTON_YES_NO buttons.

Type Parameters:
OP - the opener type
Parameters:
pOpener - the opener of the information
pMessage - the message/question to show
pOkAction - the action to call when yex was pressed
pCancelAction - the action to call when no/x was pressed
Returns:
the message content or null if the message has no content
Throws:
Throwable - if the message could not be initialized


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.