public abstract class Application extends Object implements ApplicationMethods
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationMethods |
currentApplication
Reference to the current application
|
CANCEL, CLOSED_WINDOW, NO, YES| Constructor and Description |
|---|
Application()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionExit()
Standard exit application.
|
void |
addWindow(G9DialogController controller)
Add a new window.
|
boolean |
applicationExceptionHandler(Throwable bad)
Application-wide default handler for all Runtime Exceptions.
|
boolean |
checkForeignNodes()
If the checkForeginNodes flag is
true (the default value),
foreign nodes are checked as part of the checkRowSelect when a selected
line changes in a listblock. |
void |
dialogCloser(DialogVisitor visitor,
boolean isExitTask)
A routine to close all open dialogs - part of the standard exit action.
|
G9DialogController |
getActiveInternalWindow() |
static ClientContext |
getClientContext() |
ApplicationMethods |
getCurrentApplication() |
static DispatcherContext |
getDispatcherContext(Component component,
ApplicationMethods application)
Return a JFC dispatcher context with the given component.
|
static ExportService |
getExportService()
Gets the export service
|
RuntimeException |
getLastException()
Gets the last exception that occured.
|
static MessageDispatcher |
getMessageDispatcher(Component owner,
ApplicationMethods application)
Return the message dispatcher.
|
static PrintService |
getPrintService()
Gets the print service for the application.
|
static JGrapeService |
getServiceProxy()
Returns the service proxy
|
static XmlConverter |
getXmlConverter()
Returns the xml converter
|
static boolean |
isPrintStackTrace() |
void |
setCheckForeignNodes(boolean doCheck)
Sets the checkForeignNodes flag.
|
static void |
setClientContext(ClientContext clientContext) |
void |
setCurrentApplication(ApplicationMethods currentApplication) |
static void |
setExportService(ExportService exportService)
Sets the export service for the application.
|
void |
setLastException(RuntimeException e)
Set lastException.
|
static void |
setPrintService(PrintService printService)
Sets the print service for the application.
|
static void |
setPrintStackTrace(boolean printStackTrace)
If set to true, stack trace is printed in applicationExceptionHandler
|
static void |
setServiceProxy(JGrapeService serviceProxy)
Sets the service proxy for the application
|
static void |
setXmlConverter(XmlConverter xmlConverter)
Sets the xml converter service for the application
|
boolean |
visitAll(DialogVisitor pVisitor)
Run a visitor on all open dialogs, and then invokes
done()
on the visitor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddWindow, commonViewStartup, commonViewStartup, createDialog, createDialog, getAddedWindows, getApplicationMenuBar, getApplicationName, getApplicationToolBar, getApplicationWindow, getDialog, getEnums, getG9DesktopPane, getModal, getOldDialogOrCreateNew, getStatusBar, isWindowAdded, multiMessageBox, multiMessageBox, okMessageBox, okMessageBox, sendG9DataEvent, setModal, statusBarMessage, statusBarMessage, statusBarMessage, statusBarMessage, toFront, yesNoCancelMessageBox, yesNoCancelMessageBox, yesNoMessageBox, yesNoMessageBoxprotected ApplicationMethods currentApplication
public Application()
public void setLastException(RuntimeException e)
setLastException in interface ApplicationMethodse - (missing javadoc)public RuntimeException getLastException()
ApplicationMethodsgetLastException in interface ApplicationMethodspublic boolean applicationExceptionHandler(Throwable bad)
applicationExceptionHandler in interface ApplicationMethodsbad - the caught exceptionpublic static JGrapeService getServiceProxy()
public static void setServiceProxy(JGrapeService serviceProxy)
serviceProxy - the service proxy to set.public static ClientContext getClientContext()
public static void setClientContext(ClientContext clientContext)
clientContext - the clientContext to setpublic ApplicationMethods getCurrentApplication()
public void setCurrentApplication(ApplicationMethods currentApplication)
currentApplication - The currentApplication to set.public G9DialogController getActiveInternalWindow()
getActiveInternalWindow in interface ApplicationMethodspublic static XmlConverter getXmlConverter()
public static PrintService getPrintService()
public static ExportService getExportService()
public void dialogCloser(DialogVisitor visitor, boolean isExitTask)
done() method is
invoked.visitor - A visitor that is called for each dialog. If the visitor
returns true, no close operation is attempted. If
it throws an exception, the entire loop is aborted. After all
dialogs have been visited, the vistorsisExitTask - true to actually exit the application at
the end of the the looppublic void actionExit()
actionExit in interface ApplicationMethodspublic boolean visitAll(DialogVisitor pVisitor)
done()
on the visitor.visitAll in interface ApplicationMethodspVisitor - The actual DialogVisitortrue if all visited dialogs return true
, otherwise falsepublic void addWindow(G9DialogController controller)
addWindow in interface ApplicationMethodscontroller - the window to addpublic static boolean isPrintStackTrace()
public static void setPrintStackTrace(boolean printStackTrace)
printStackTrace - the printStackTrace to setpublic boolean checkForeignNodes()
ApplicationMethodstrue (the default value),
foreign nodes are checked as part of the checkRowSelect when a selected
line changes in a listblock. The listblock might override this value.checkForeignNodes in interface ApplicationMethodspublic void setCheckForeignNodes(boolean doCheck)
ApplicationMethodstrue (the
default value) then all nodes that are visible in a listblock are checked
for modifications when a listblock line select change occurs. If this
flag is false the listblock role's node is checked among
with its children (the nodes in the listblock role's object selection
tree).
This value can be overridden by a listblock instance, in which case the overridden value will be used to determine the behaviour of the checkRowSelect method.
setCheckForeignNodes in interface ApplicationMethodsdoCheck - the boolean value of the checkForeingNodesFlagpublic static void setXmlConverter(XmlConverter xmlConverter)
xmlConverter - the xml converter servicepublic static void setPrintService(PrintService printService)
printService - Print service.public static void setExportService(ExportService exportService)
exportService - Export service.public static MessageDispatcher getMessageDispatcher(Component owner, ApplicationMethods application)
owner - the JFC component.application - the JFC applicationpublic static DispatcherContext getDispatcherContext(Component component, ApplicationMethods application)
component - the JFC componentapplication - the JFC applicationCopyright © 2006–2018 Esito AS. All rights reserved.