|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.ApplicationContext
org.apache.pivot.wtk.DesktopApplicationContext
public final class DesktopApplicationContext
Application context used to execute applications in a native frame window.
| Nested Class Summary | |
|---|---|
static interface |
DesktopApplicationContext.DisplayListener
Display listener interface. |
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.ApplicationContext |
|---|
ApplicationContext.DisplayHost, ApplicationContext.QueuedCallback, ApplicationContext.ResourceCacheDictionary, ApplicationContext.ScheduledCallback |
| Field Summary | |
|---|---|
static String |
CENTER_ARGUMENT
|
static String |
DEFAULT_HOST_WINDOW_TITLE
|
static String |
FULL_SCREEN_ARGUMENT
|
static String |
HEIGHT_ARGUMENT
|
static String |
MAXIMIZED_ARGUMENT
|
static String |
ORIGIN_ARGUMENT
|
static String |
PRESERVE_SPLASH_SCREEN_ARGUMENT
|
static String |
RESIZABLE_ARGUMENT
|
static String |
UNDECORATED_ARGUMENT
|
static String |
WIDTH_ARGUMENT
|
static String |
X_ARGUMENT
|
static String |
Y_ARGUMENT
|
| Fields inherited from class org.apache.pivot.wtk.ApplicationContext |
|---|
applications, displays, origin |
| Constructor Summary | |
|---|---|
DesktopApplicationContext()
|
|
| Method Summary | |
|---|---|
static Display |
createDisplay(int width,
int height,
int x,
int y,
boolean modal,
boolean resizable,
boolean undecorated,
Window owner,
DesktopApplicationContext.DisplayListener displayCloseListener)
Creates a new secondary display. |
static void |
exit()
Terminates the application context. |
static boolean |
exit(boolean optional)
Terminates the application context. |
static boolean |
isActive()
|
static boolean |
isFullScreen()
Returns the full-screen mode flag. |
static void |
main(Class<? extends Application> applicationClass,
String[] applicationArgs)
Utility method to make it easier to define main() entry-points into applications. |
static void |
main(String[] args)
Primary application entry point. |
static void |
replaceSplashScreen(Display display)
Gets the window hosting the specified Display and makes it visible. |
static void |
setFullScreen(boolean fullScreen)
Sets the full-screen mode flag. |
static void |
sizeHostToFit(Window window)
Sizes the window's native host frame to match its preferred size. |
| Methods inherited from class org.apache.pivot.wtk.ApplicationContext |
|---|
applyStylesheet, createTimer, defaultUncaughtExceptionHandler, destroyTimer, getDisplays, getJavaVersion, getJVMVersion, getOrigin, getPivotVersion, getResourceCache, handleUncaughtException, invalidateDisplays, queueCallback, queueCallback, scheduleCallback, scheduleRecurringCallback, scheduleRecurringCallback |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_HOST_WINDOW_TITLE
public static final String X_ARGUMENT
public static final String Y_ARGUMENT
public static final String WIDTH_ARGUMENT
public static final String HEIGHT_ARGUMENT
public static final String CENTER_ARGUMENT
public static final String RESIZABLE_ARGUMENT
public static final String MAXIMIZED_ARGUMENT
public static final String UNDECORATED_ARGUMENT
public static final String FULL_SCREEN_ARGUMENT
public static final String PRESERVE_SPLASH_SCREEN_ARGUMENT
public static final String ORIGIN_ARGUMENT
| Constructor Detail |
|---|
public DesktopApplicationContext()
| Method Detail |
|---|
public static boolean isActive()
public static void exit()
public static boolean exit(boolean optional)
optional - If true, shutdown is optional and may be cancelled. If
false, shutdown cannot be cancelled.public static void main(String[] args)
args - public static boolean isFullScreen()
public static void setFullScreen(boolean fullScreen)
fullScreen - public static void replaceSplashScreen(Display display)
SplashScreen to be closed.
display - Display to make visibleSplashScreenpublic static void sizeHostToFit(Window window)
window -
public static Display createDisplay(int width,
int height,
int x,
int y,
boolean modal,
boolean resizable,
boolean undecorated,
Window owner,
DesktopApplicationContext.DisplayListener displayCloseListener)
width - height - x - y - modal - owner -
public static final void main(Class<? extends Application> applicationClass,
String[] applicationArgs)
public class MyApp implements Application {
public static void main(String[] args) throws Exception {
DesktopApplicationContext.main(MyApp.class, args);
}
}
applicationClass - applicationArgs -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||