|
||||||||||
| 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 |
|---|
| 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 |
|---|
logger, 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 | |
|---|---|
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. |
protected abstract IConnection |
createConnection()
Creates a connection for the application. |
protected UIDesktopPanel |
createDesktopPane()
Creates the content pane for the application. |
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. |
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. |
void |
notifyDestroy()
Notifies the IContent, that he will be destroyed. |
void |
notifyVisible()
Notifies the IContent, that he is now positioned and showing. |
protected void |
preConfigure()
This method will be used from subclasses to configure the UI before the UI will be created. |
protected void |
setTitle(String pName)
Sets the application title. |
void |
showErrorDialog()
Shows the error dialog. |
Message |
showMessage(IComponent pOpener,
int pIconType,
int pButtonType,
String pMessage,
String pOkAction,
String pCancelAction)
Shows a message. |
| Methods inherited from class javax.rad.application.genui.RemoteApplication |
|---|
getConnection, isConnected, setConnection |
| Methods inherited from class javax.rad.application.genui.Application |
|---|
getApplicationPane, getCursor, getLauncher, setCursor, 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, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeNotify, setLayout, 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 |
| Constructor Detail |
|---|
public Application(UILauncher pLauncher)
Main and configures the
user interface.
pLauncher - the launcher| Method 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 IApplicationpublic void notifyVisible()
notifyVisible in interface IContentnotifyVisible in class Contentpublic void notifyDestroy()
notifyDestroy in interface IContentnotifyDestroy in class Content
public Message showMessage(IComponent pOpener,
int pIconType,
int pButtonType,
String pMessage,
String pOkAction,
String pCancelAction)
throws Throwable
showMessage in interface IApplicationpOpener - 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_OKpButtonType - the button type IMessageConstants.MESSAGE_ICON_INFO, IMessageConstants.MESSAGE_ICON_WARNING, IMessageConstants.MESSAGE_ICON_ERRORpMessage - 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 IExceptionListenerpThrowable - the occured exceptionpublic void callError(CallErrorEvent pEvent)
callError in interface IConnectionListenerpEvent - the error informationprotected 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 void configureLogin(Login pLogin)
pLogin - the login componentprotected void afterLogout()
protected void afterLogin()
protected 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 frame
public 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 Aboutpublic UIMenuBar getMenuBar()
public UIToolBar getToolBar()
public Login getLogin()
public void doErrorClosed(UIWindowEvent pEvent)
pEvent - the frame close event
public void doLogin(UIActionEvent pEvent)
throws Throwable
pEvent - the event information from the button
Throwable - if the connection could not be established
public 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 button
public void doAbout(UIActionEvent pEvent)
throws Throwable
pEvent - the triggering event
Throwable - if the about content could not be initalized
public void doHelp(UIActionEvent pEvent)
throws Throwable
pEvent - the event from the menu
Throwable - if the help is not available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||