javax.rad.application.genui
Class Application

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.Application
All Implemented Interfaces:
IApplication, IContent, IMessageConstants, ITranslatable, IPanel, IComponent, IContainer, IResource, INamedObject
Direct Known Subclasses:
RemoteApplication

public abstract class Application
extends Content
implements IApplication

The Application is an abstract implementation of IApplication. It only implements the methods for loading and creating classes.


Field Summary
static String PARAM_SETUP_CLASS
          the parameter name for the setup class.
 
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
Application(UILauncher pLauncher)
          Creates a new instance of Application with a desired launcher.
 
Method Summary
 IContainer getApplicationPane()
          Gets the standard application pane where the content will be added.
 ICursor getCursor()
          Gets the cursor from the launcher.
 UILauncher getLauncher()
          Returns the platform independent launcher which is associated with this factory.
protected  IApplicationSetup getSetup()
          Gets the application setup, if used.
 void setCursor(ICursor pCursor)
          Sets the cursor of the launcher.
protected  void setLauncher(UILauncher pLauncher)
          Sets the launcher.
<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, 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, 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.IApplication
getContentPane, showMessage
 
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, 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, 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

PARAM_SETUP_CLASS

public static final String PARAM_SETUP_CLASS
the parameter name for the setup class.

See Also:
Constant Field Values
Constructor Detail

Application

public Application(UILauncher pLauncher)
Creates a new instance of Application with a desired launcher.

Parameters:
pLauncher - the launcher of this application
Method Detail

getLauncher

public UILauncher getLauncher()
Returns the platform independent launcher which is associated with this factory.

Specified by:
getLauncher in interface IApplication
Returns:
the associated launcher

getApplicationPane

public IContainer getApplicationPane()
Gets the standard application pane where the content will be added.

Specified by:
getApplicationPane in interface IApplication
Returns:
the application pane

setCursor

public void setCursor(ICursor pCursor)
Sets the cursor of the launcher.

Specified by:
setCursor in interface IComponent
Overrides:
setCursor in class UIComponent<IPanel>
Parameters:
pCursor - the cursor
See Also:
IComponent.isEnabled(), IComponent.getCursor(), Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String), ICursor

getCursor

public ICursor getCursor()
Gets the cursor from the launcher.

Specified by:
getCursor in interface IComponent
Overrides:
getCursor in class UIComponent<IPanel>
Returns:
the cursor of the launcher
See Also:
IComponent.setCursor(javax.rad.ui.ICursor)

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

setLauncher

protected final void setLauncher(UILauncher pLauncher)
Sets the launcher. Be careful with this method because it changes the behaviour of the application if you use the wrong launcher.

Parameters:
pLauncher - the launcher

getSetup

protected IApplicationSetup getSetup()
Gets the application setup, if used.

Returns:
the application setup or null if no specific setup was used


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.