|
||||||||||
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.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 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 |
---|
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 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(String pAction,
String pActionCommand,
String pText,
UIImage pImage)
Creates a new menu item. |
|
protected UIToolBar |
createToolBar()
Creates the toolbar for the application. |
|
UIButton |
createToolBarButton(String pAction,
String pActionCommand,
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 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(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()
Notifies the IContent, that it will be destroyed. |
|
void |
notifyVisible()
Notifies the IContent, 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(String pName)
Sets the application title. |
|
void |
showErrorDialog()
Shows the error dialog. |
|
|
showMessage(OP pOpener,
int pIconType,
int pButtonType,
String pMessage,
String pOkAction,
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 |
---|
getApplicationPane, getCursor, getLauncher, getSetup, setCursor, setLauncher, showError, showError, showInformation, showInformation, showQuestion, showQuestion |
Methods inherited from class javax.rad.application.genui.Content |
---|
getOpener, 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.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, setOpener |
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 |
---|
public static final String PARAM_MENU_EXIT_VISIBLE
Constructor Detail |
---|
public Application(UILauncher pLauncher)
Main
and configures the
user interface.
pLauncher
- the launcherMethod Detail |
---|
protected void preConfigure()
protected abstract String getApplicationName()
protected abstract IConnection createConnection() throws Exception
Exception
- if the "connection" can not be createdpublic UIContainer getContentPane()
getContentPane
in interface IApplication
public void notifyVisible()
notifyVisible
in interface IContent
notifyVisible
in class Content
public void notifyDestroy()
notifyDestroy
in interface IContent
notifyDestroy
in class Content
public <OP> Message showMessage(OP pOpener, int pIconType, int pButtonType, String pMessage, String pOkAction, String pCancelAction) throws Throwable
showMessage
in interface IApplication
OP
- the opener typepOpener
- the opener/parent component which wants to display the messagepIconType
- the icon type IMessageConstants.MESSAGE_BUTTON_OK_CANCEL
, IMessageConstants.MESSAGE_BUTTON_YES_NO
, IMessageConstants.MESSAGE_BUTTON_OK
pButtonType
- the button type IMessageConstants.MESSAGE_ICON_INFO
, IMessageConstants.MESSAGE_ICON_WARNING
, IMessageConstants.MESSAGE_ICON_ERROR
pMessage
- 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
Throwable
- if the message could not be initializedpublic void handleException(Throwable pThrowable)
handleException
in interface IExceptionListener
pThrowable
- the occured exceptionpublic void callError(CallErrorEvent pEvent)
callError
in interface IConnectionListener
pEvent
- the error informationpublic void connectionOpened(ConnectionEvent pEvent)
connectionOpened
in interface IConnectionListener
pEvent
- the connection informationpublic void connectionReOpened(ConnectionEvent pEvent)
connectionReOpened
in interface IConnectionListener
pEvent
- the connection informationpublic void connectionClosed(ConnectionEvent pEvent)
connectionClosed
in interface IConnectionListener
pEvent
- the connection informationpublic void actionCalled(CallEvent pEvent)
actionCalled
in interface IConnectionListener
pEvent
- the call informationpublic void objectCalled(CallEvent pEvent)
objectCalled
in interface IConnectionListener
pEvent
- the call informationpublic void propertyChanged(PropertyEvent pEvent)
propertyChanged
in interface IConnectionListener
pEvent
- the property informationprotected void afterLogout()
afterLogout
in class RemoteApplication
protected void afterLogin()
afterLogin
in class RemoteApplication
protected 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(String pName)
getLauncher().setTitle(...)
and
necessary for inherited classes, to avoid title flickr.
pName
- the application titlepublic void showErrorDialog()
protected void configureFrame(AbstractFrame pFrame)
pFrame
- the internal framepublic UIMenuItem createMenuItem(String pAction, String pActionCommand, 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(String pAction, String pActionCommand, 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 About
public UIMenuBar getMenuBar()
public UIToolBar getToolBar()
public Login getLogin()
protected Error createError() throws Throwable
Error
frame.
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 eventpublic void doLogin(UIActionEvent pEvent) throws Throwable
pEvent
- the event information from the button
Throwable
- if the connection could not be establishedpublic void doChangePassword(UIActionEvent pEvent) throws Throwable
pEvent
- the event information from the button
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 buttonpublic void doAbout(UIActionEvent pEvent) throws Throwable
pEvent
- the triggering event
Throwable
- if the about content could not be initalizedpublic void doHelp(UIActionEvent pEvent) throws Throwable
pEvent
- the event from the menu
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 |