Groovy Documentation

griffon.swing
[Java] Interface SwingGriffonApplication

griffon.core.ThreadingHandler
  griffon.swing.SwingGriffonApplication
      griffon.core.MVCHandler
          griffon.core.ResourceHandler
All Superinterfaces:
ThreadingHandler, MVCHandler, ResourceHandler

public interface SwingGriffonApplication
extends GriffonApplication

Defines an additional contract that all Swing based application should follow.

Windows in a Swing application should be handled by a WindowManager, which in turn requires a concrete implementation of the WindowDisplayHandler to be available on the target application.

Authors:
Andres Almiray
See Also:
WindowManager
WindowDisplayHandler
Since:
0.9.1


Method Summary
WindowDisplayHandler getWindowDisplayHandler()

Returns the WindowDisplayHandler defined for this application.

WindowManager getWindowManager()

Returns the WindowManager associated with this application.

WindowDisplayHandler resolveWindowDisplayHandler()

Resolves the WindowDisplayHandler to be used with WindowManager.

void setWindowDisplayHandler(WindowDisplayHandler windowDisplayHandler)

Sets the WindowDisplayHandler to be used in conjuction with WindowManager to handle window showing/hiding.

 
Methods inherited from interface GriffonApplication
shutdown, newInstance, initialize, ready, getServices, setLocale, getConfig, event, event, setConfig, getLocale, getBindings, setBindings, getMetadata, getAppConfigClass, getConfigClass, getBuilderClass, getBuilderConfig, setBuilderConfig, getEventsClass, getEventsConfig, setEventsConfig, getModels, getViews, getControllers, getBuilders, getGroups, getAddonManager, getMvcGroupManager, getServiceManager, createApplicationContainer, startup, canShutdown, addApplicationEventListener, addApplicationEventListener, addApplicationEventListener, removeApplicationEventListener, removeApplicationEventListener, removeApplicationEventListener, isEventPublishingEnabled, setEventPublishingEnabled, eventOutsideUI, eventOutsideUI, eventAsync, eventAsync, addShutdownHandler, removeShutdownHandler, getPhase, getArtifactManager, getStartupArgs, getLog, isUIThread, execInsideUIAsync, execInsideUISync, execOutsideUI, execFuture, execFuture, execFuture, execFuture, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, getResourceAsStream, getResources, getResourceAsURL
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

getWindowDisplayHandler

public WindowDisplayHandler getWindowDisplayHandler()
Returns the WindowDisplayHandler defined for this application.

An application implementation may opt for ignoring this property, in which case a DefaultWindowDisplayHandler should be used.

Returns:
the current WindowDisplayHandler instance, may return null.


getWindowManager

public WindowManager getWindowManager()
Returns the WindowManager associated with this application.

Every GriffonSwingApplication must have a non-null instance.

Returns:
the current WindowManager instance.


resolveWindowDisplayHandler

public WindowDisplayHandler resolveWindowDisplayHandler()
Resolves the WindowDisplayHandler to be used with WindowManager.

Should NEVER return null. If no custom WindowDisplayHandler has been defined for this application then this method should return an instance of DefaulWindowDisplayHandler.

Returns:
a non-null WindowDisplayHandler instance.


setWindowDisplayHandler

public void setWindowDisplayHandler(WindowDisplayHandler windowDisplayHandler)
Sets the WindowDisplayHandler to be used in conjuction with WindowManager to handle window showing/hiding.

If set to null the application should revert to using an instance of DefaultWindowDisplayHandler.

Parameters:
windowDisplayHandler - the instance to use, may be null.


 

Groovy Documentation