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 defaultWindowwill be created and the component made its content.Note: A
SheetorPalettewill 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.StringRESOURCES_KEYstatic java.lang.StringSRC_KEYstatic java.lang.StringSTYLESHEET_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 voidmain(java.lang.String[] args)booleanshutdown(boolean optional)Called when the application is being shut down.voidstartup(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:ApplicationCalled when the application is starting up.- Specified by:
 startupin 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:ApplicationCalled when the application is being shut down.- Specified by:
 shutdownin interfaceApplication- Parameters:
 optional- Iftrue, the shutdown may be cancelled by returning a value oftrue.- Returns:
 trueto cancel shutdown,falseto proceed with shutdown (default).
 
- 
main
public static void main(java.lang.String[] args)
 
 - 
 
 -