Package org.apache.pivot.wtk
Interface Application
-
- All Known Subinterfaces:
ApplicationWithProperties
- All Known Implementing Classes:
Application.Adapter,ApplicationWithProperties.Adapter,ScriptApplication
public interface ApplicationRepresents the entry point into a WTK application.These methods are called by the application context. In general, they should not be invoked directly by the application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceApplication.AboutHandlerOptional interface that allows an application to present information about itself.static classApplication.AdapterDeprecated.Since 2.1 and Java 8 the interface itself has default implementations.static interfaceApplication.UncaughtExceptionHandlerOptional interface that allows an application to handle uncaught exceptions thrown during a user input event.static interfaceApplication.UnprocessedKeyHandlerOptional interface that allows an application to handle unprocessed key events (keystrokes that are processed when no component has the input focus).
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidresume()Called when a suspended application has been resumed.default booleanshutdown(boolean optional)Called when the application is being shut down.default voidstartup(Display display, Map<java.lang.String,java.lang.String> properties)Called when the application is starting up.default voidsuspend()Called to notify the application that it is being suspended.
-
-
-
Method Detail
-
startup
default void startup(Display display, Map<java.lang.String,java.lang.String> properties) throws java.lang.Exception
Called when the application is starting up.- Parameters:
display- The display on which this application was started.properties- Initialization properties passed to the application.- Throws:
java.lang.Exception- if there is any problem during startup.
-
shutdown
default boolean shutdown(boolean optional) throws java.lang.ExceptionCalled when the application is being shut down.- Parameters:
optional- Iftrue, the shutdown may be cancelled by returning a value oftrue.- Returns:
trueto cancel shutdown,falseto proceed with shutdown (default).- Throws:
java.lang.Exception- if there is a problem during shutdown.
-
suspend
default void suspend() throws java.lang.ExceptionCalled to notify the application that it is being suspended.- Throws:
java.lang.Exception- if there is a problem doing the suspend.
-
resume
default void resume() throws java.lang.ExceptionCalled when a suspended application has been resumed.- Throws:
java.lang.Exception- if there is a problem doing the resume.
-
-