|
||||||||||
| 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.Application
javax.rad.application.genui.RemoteApplication
com.sibvisions.rad.application.Application
public abstract class Application
The Application is the default RemoteApplication. It shows
a login screen, has an error dialog and handles the menu- and toolbar.
It's the base class for user-defined applications.
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_MENU_EXIT_VISIBLE
the parameter name for showing the exit button. |
| Fields inherited from class javax.rad.application.genui.Application |
|---|
PARAM_SETUP_CLASS |
| 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 | |
|---|---|
Application(UILauncher pLauncher)
Creates a new instance of Main and configures the
user interface. |
|
| Method Summary | ||
|---|---|---|
void |
actionCalled(CallEvent pEvent)
An action was called. |
|
protected void |
afterLogin()
Performs actions after successful login to the application. |
|
protected void |
afterLogout()
Performs actions after successful logout from the application. |
|
void |
callError(CallErrorEvent pEvent)
An error occured during remote communication. |
|
protected void |
configureAbout(About pAbout)
Configures the about dialog. |
|
protected void |
configureApplicationPane(IContainer pApplicationPane)
Configures the default behaviour of the application pane. |
|
protected void |
configureDesktopPane(UIDesktopPanel pDesktop)
Configures the default behaviour of the content pane. |
|
protected void |
configureFrame(AbstractFrame pFrame)
Configures an internal frame for the application. |
|
protected void |
configureLogin(Login pLogin)
Configures the login component. |
|
protected void |
configureMenu(UIMenuBar pMenu)
Configures the menu for the application. |
|
protected void |
configureToolBar(UIToolBar pToolBar)
Configures the application toolbar. |
|
void |
connectionClosed(ConnectionEvent pEvent)
A connection was closed. |
|
void |
connectionOpened(ConnectionEvent pEvent)
A connection was opened. |
|
void |
connectionReOpened(ConnectionEvent pEvent)
A connection was re-opened. |
|
protected About |
createAbout()
Creates the about component. |
|
protected abstract IConnection |
createConnection()
Creates a connection for the application. |
|
protected UIDesktopPanel |
createDesktopPane()
Creates the content pane for the application. |
|
protected Error |
createError()
Creates a new Error frame. |
|
protected Login |
createLogin()
Creates the login component for entering the authentication credentials. |
|
protected UIMenuBar |
createMenu()
Creates the menu for the application. |
|
UIMenuItem |
createMenuItem(java.lang.String pAction,
java.lang.String pActionCommand,
java.lang.String pText,
UIImage pImage)
Creates a new menu item. |
|
protected UIToolBar |
createToolBar()
Creates the toolbar for the application. |
|
UIButton |
createToolBarButton(java.lang.String pAction,
java.lang.String pActionCommand,
java.lang.String pText,
UIImage pImage)
Creates a new toolbar button. |
|
void |
doAbout(UIActionEvent pEvent)
Opens the about dialog. |
|
void |
doChangePassword(UIActionEvent pEvent)
Change the password. |
|
void |
doErrorClosed(UIWindowEvent pEvent)
Unsets the error dialog. |
|
void |
doExit(UIActionEvent pEvent)
Performs the exit of the application. |
|
void |
doHelp(UIActionEvent pEvent)
Opens the help system. |
|
void |
doHideChangePassword(UIActionEvent pEvent)
Shows the change password screen. |
|
void |
doHideLogin(UIActionEvent pEvent)
Hides the login screen. |
|
void |
doLogin(UIActionEvent pEvent)
The event method for the logon button. |
|
void |
doLogout(UIActionEvent pEvent)
Closes the opened connections. |
|
void |
doShowChangePassword(UIActionEvent pEvent)
Shows the change password screen. |
|
void |
doShowLogin(UIActionEvent pEvent)
Shows the login screen. |
|
protected abstract java.lang.String |
getApplicationName()
Gets the name for the application. |
|
UIContainer |
getContentPane()
Gets the content pane for the application. |
|
UIDesktopPanel |
getDesktopPane()
Gets the desktop panel for the application. |
|
Error |
getError()
Gets the error frame. |
|
Login |
getLogin()
Gets the login frame. |
|
UIMenuBar |
getMenuBar()
Gets the application menu bar. |
|
UIToolBar |
getToolBar()
Gets the application tool bar. |
|
void |
handleException(java.lang.Throwable pThrowable)
Notification for the listener to handle an exception occured in another part of the program. |
|
protected boolean |
isExitVisible()
Gets whether the exit options are visible. |
|
void |
notifyDestroy()
Cancels all pending launcher threads. |
|
void |
notifyVisible()
Notifies the content, that it is now positioned and showing. |
|
void |
objectCalled(CallEvent pEvent)
An object was called. |
|
protected void |
preConfigure()
This method will be used from subclasses to configure the UI before the UI will be created. |
|
void |
propertyChanged(PropertyEvent pEvent)
A property was changed. |
|
protected void |
setTitle(java.lang.String pName)
Sets the application title. |
|
void |
showErrorDialog()
Shows the error dialog. |
|
|
showMessage(OP pOpener,
int pIconType,
int pButtonType,
java.lang.String pMessage,
java.lang.String pOkAction,
java.lang.String pCancelAction)
Shows a message. |
|
| Methods inherited from class javax.rad.application.genui.RemoteApplication |
|---|
eventAfterLogin, eventAfterLogout, getConnection, isConnected, setConnection |
| Methods inherited from class javax.rad.application.genui.Application |
|---|
applySetup, getApplicationPane, getControllerProperty, getCursor, getLauncher, getSetup, setCursor, setLauncher, showError, showError, showInformation, showInformation, showQuestion, showQuestion, showWarning, showWarning |
| Methods inherited from class javax.rad.application.genui.Content |
|---|
createComponentName, getOpener, isDestroyed, 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, 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 |
|---|
public static final java.lang.String PARAM_MENU_EXIT_VISIBLE
| Constructor Detail |
|---|
public Application(UILauncher pLauncher)
Main and configures the
user interface.
pLauncher - the launcher| Method Detail |
|---|
protected void preConfigure()
protected abstract java.lang.String getApplicationName()
protected abstract IConnection createConnection()
throws java.lang.Exception
java.lang.Exception - if the "connection" can not be createdpublic void notifyVisible()
notifyVisible in interface IContentnotifyVisible in class Contentpublic void notifyDestroy()
notifyDestroy in interface IContentnotifyDestroy in class Applicationpublic void handleException(java.lang.Throwable pThrowable)
handleException in interface IExceptionListenerpThrowable - the occured exceptionpublic void callError(CallErrorEvent pEvent)
callError in interface IConnectionListenerpEvent - the error informationpublic void connectionOpened(ConnectionEvent pEvent)
connectionOpened in interface IConnectionListenerpEvent - the connection informationpublic void connectionReOpened(ConnectionEvent pEvent)
connectionReOpened in interface IConnectionListenerpEvent - the connection informationpublic void connectionClosed(ConnectionEvent pEvent)
connectionClosed in interface IConnectionListenerpEvent - the connection informationpublic void actionCalled(CallEvent pEvent)
actionCalled in interface IConnectionListenerpEvent - the call informationpublic void objectCalled(CallEvent pEvent)
objectCalled in interface IConnectionListenerpEvent - the call informationpublic void propertyChanged(PropertyEvent pEvent)
propertyChanged in interface IConnectionPropertyChangedListenerpEvent - the property information
public <OP> Message showMessage(OP pOpener,
int pIconType,
int pButtonType,
java.lang.String pMessage,
java.lang.String pOkAction,
java.lang.String pCancelAction)
throws java.lang.Throwable
showMessage in interface IApplicationshowMessage in class ApplicationOP - the opener typepOpener - the opener/parent component which wants to display the messagepIconType - the icon type IMessageConstants.MESSAGE_ICON_INFO, IMessageConstants.MESSAGE_ICON_WARNING, IMessageConstants.MESSAGE_ICON_ERRORpButtonType - the button type IMessageConstants.MESSAGE_BUTTON_OK_CANCEL, IMessageConstants.MESSAGE_BUTTON_YES_NO, IMessageConstants.MESSAGE_BUTTON_OKpMessage - the messagepOkAction - the action name to call when ok or yes was clickedpCancelAction - the action name to call when cancel or close was clicked
null if the message has no content
java.lang.Throwable - if the message could not be initializedpublic UIContainer getContentPane()
getContentPane in interface IApplicationgetContentPane in class Applicationprotected void afterLogout()
afterLogout in class RemoteApplicationprotected void afterLogin()
afterLogin in class RemoteApplicationprotected void configureApplicationPane(IContainer pApplicationPane)
pApplicationPane - the application paneprotected UIDesktopPanel createDesktopPane()
protected void configureDesktopPane(UIDesktopPanel pDesktop)
pDesktop - the content pane (= the desktop)public UIDesktopPanel getDesktopPane()
protected UIMenuBar createMenu()
protected void configureMenu(UIMenuBar pMenu)
pMenu - the menuprotected UIToolBar createToolBar()
protected void configureToolBar(UIToolBar pToolBar)
pToolBar - the application toolbarprotected Login createLogin()
protected About createAbout()
protected void configureLogin(Login pLogin)
pLogin - the login componentprotected void setTitle(java.lang.String pName)
getLauncher().setTitle(...) and
necessary for inherited classes, to avoid title flicker.
pName - the application titlepublic void showErrorDialog()
protected void configureFrame(AbstractFrame pFrame)
pFrame - the internal frame
public UIMenuItem createMenuItem(java.lang.String pAction,
java.lang.String pActionCommand,
java.lang.String pText,
UIImage pImage)
pAction - the action methodpActionCommand - the action command when the menu gets selectedpText - the menu labelpImage - the image for the menu item
public UIButton createToolBarButton(java.lang.String pAction,
java.lang.String pActionCommand,
java.lang.String pText,
UIImage pImage)
pAction - the action methodpActionCommand - the action commandpText - the button text or null if the button has no textpImage - the button image or null if the button has no image
protected void configureAbout(About pAbout)
pAbout - the Aboutpublic UIMenuBar getMenuBar()
public UIToolBar getToolBar()
public Login getLogin()
protected Error createError()
throws java.lang.Throwable
Error frame.
java.lang.Throwable - if the error instance can not be createdpublic Error getError()
null if no error frame is openpublic void doErrorClosed(UIWindowEvent pEvent)
pEvent - the frame close event
public void doLogin(UIActionEvent pEvent)
throws java.lang.Throwable
pEvent - the event information from the button
java.lang.Throwable - if the connection could not be established
public void doChangePassword(UIActionEvent pEvent)
throws java.lang.Throwable
pEvent - the event information from the button
java.lang.Throwable - if the password info message causes an errorpublic void doShowLogin(UIActionEvent pEvent)
pEvent - the event information from the buttonpublic void doHideLogin(UIActionEvent pEvent)
pEvent - the event information from the buttonpublic void doShowChangePassword(UIActionEvent pEvent)
pEvent - the event information from the buttonpublic void doHideChangePassword(UIActionEvent pEvent)
pEvent - the event information from the buttonpublic void doExit(UIActionEvent pEvent)
pEvent - the event information from the buttonpublic void doLogout(UIActionEvent pEvent)
pEvent - the event information from the button
public void doAbout(UIActionEvent pEvent)
throws java.lang.Throwable
pEvent - the triggering event
java.lang.Throwable - if the about content could not be initalized
public void doHelp(UIActionEvent pEvent)
throws java.lang.Throwable
pEvent - the event from the menu
java.lang.Throwable - if the help is not availableprotected boolean isExitVisible()
true if the exit options are visible, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||