Package org.apache.pivot.wtk
Class ScriptApplication
- java.lang.Object
-
- org.apache.pivot.wtk.ScriptApplication
-
- All Implemented Interfaces:
Application
public class ScriptApplication extends java.lang.Object implements Application
Script application loader.This application will load a BXML file containing a Pivot component and its content hierarchy and display it. If the outermost component is a
Window
(or subclass of it) then the window will be displayed directly. Otherwise a defaultWindow
will be created and the component made its content.Note: A
Sheet
orPalette
will get owned by the default window.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.Application
Application.AboutHandler, Application.Adapter, Application.UncaughtExceptionHandler, Application.UnprocessedKeyHandler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RESOURCES_KEY
static java.lang.String
SRC_KEY
static java.lang.String
STYLESHEET_KEY
-
Constructor Summary
Constructors Constructor Description ScriptApplication()
No-arg constructor for use withDesktopApplicationContext
.ScriptApplication(java.lang.String srcArgument)
Constructor for subclasses to preset the "SRC" argument for completely automatic application startup (mainly used for tests, demos, etc.).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
boolean
shutdown(boolean optional)
Called when the application is being shut down.void
startup(Display display, Map<java.lang.String,java.lang.String> properties)
Called when the application is starting up.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.Application
resume, suspend
-
-
-
-
Field Detail
-
SRC_KEY
public static final java.lang.String SRC_KEY
- See Also:
- Constant Field Values
-
RESOURCES_KEY
public static final java.lang.String RESOURCES_KEY
- See Also:
- Constant Field Values
-
STYLESHEET_KEY
public static final java.lang.String STYLESHEET_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScriptApplication
public ScriptApplication()
No-arg constructor for use withDesktopApplicationContext
.
-
ScriptApplication
public ScriptApplication(java.lang.String srcArgument)
Constructor for subclasses to preset the "SRC" argument for completely automatic application startup (mainly used for tests, demos, etc.).- Parameters:
srcArgument
- The name of a source file that will be used if the--src=...
argument is missing from the command line.
-
-
Method Detail
-
startup
public void startup(Display display, Map<java.lang.String,java.lang.String> properties) throws java.lang.Exception
Description copied from interface:Application
Called when the application is starting up.- Specified by:
startup
in interfaceApplication
- 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
public boolean shutdown(boolean optional)
Description copied from interface:Application
Called when the application is being shut down.- Specified by:
shutdown
in interfaceApplication
- Parameters:
optional
- Iftrue
, the shutdown may be cancelled by returning a value oftrue
.- Returns:
true
to cancel shutdown,false
to proceed with shutdown (default).
-
main
public static void main(java.lang.String[] args)
-
-