facets.facet.app
Class WindowAppHost

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.facet.app.WindowAppHost
All Implemented Interfaces:
AppHost, SHost

public abstract class WindowAppHost
extends Tracer
implements AppHost

AppHost that manages a window for a FacetAppSurface.

WindowAppHost extends its superclass to manage

Concrete subclasses will define an appropriate event loop for their GUI toolkit.


Nested Class Summary
 
Nested classes/interfaces inherited from interface facets.core.app.AppHost
AppHost.LayoutFeatures
 
Nested classes/interfaces inherited from interface facets.core.superficial.app.SHost
SHost.FacetLayout
 
Field Summary
protected  FacetAppSurface app
           
 
Constructor Summary
protected WindowAppHost(FacetAppSurface app)
           
 
Method Summary
protected  void openWindow()
          Open the application window.
protected abstract  void requestAppClose()
          Allow the application to close itself.
protected abstract  java.awt.Dimension screenSize()
          Supply the current screen size.
protected abstract  void setWindowBounds(java.awt.Rectangle bounds)
          Set the window bounds programmatically.
protected abstract  void splashDown()
          Take down any splash screen.
protected abstract  void splashUp(java.lang.String msg)
          Put up a splash screen while the application is loading.
protected  void storeCheckedBounds()
          Store the current bounds (if not maximised and at least minimum size).
protected abstract  java.awt.Rectangle windowBounds()
          Supply the current window bounds.
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface facets.core.app.AppHost
activeServices, newDesktopLayout, newDialogs, runHostedApp
 
Methods inherited from interface facets.core.superficial.app.SHost
setLayout, setTitle, updateLayout, wrapped
 

Field Detail

app

protected final FacetAppSurface app
Constructor Detail

WindowAppHost

protected WindowAppHost(FacetAppSurface app)
Method Detail

storeCheckedBounds

protected final void storeCheckedBounds()
Store the current bounds (if not maximised and at least minimum size).


setWindowBounds

protected abstract void setWindowBounds(java.awt.Rectangle bounds)
Set the window bounds programmatically.

Called from openWindow().


windowBounds

protected abstract java.awt.Rectangle windowBounds()
Supply the current window bounds.

Called from storeCheckedBounds() and by FacetDialogSurface.calculateSmartDialogAt(Dimension, SHost)


screenSize

protected abstract java.awt.Dimension screenSize()
Supply the current screen size.

Called from storeCheckedBounds() and by FacetDialogSurface.calculateSmartDialogAt(Dimension, SHost)


openWindow

protected void openWindow()
Open the application window.

Called from AppSurface.buildRetargeted() once the abstract surface is ready for conversion by the toolkit to a GUI.

Default implementation just sets checked window bounds, concrete classes should override as required to create and open the application window.


requestAppClose

protected abstract void requestAppClose()
Allow the application to close itself.

Should simulate pressing the Close button.


splashUp

protected abstract void splashUp(java.lang.String msg)
Put up a splash screen while the application is loading.

Parameters:
msg - should be displayed on the screen

splashDown

protected abstract void splashDown()
Take down any splash screen.