public abstract class AbstractJavaFXGriffonApplication extends javafx.application.Application implements GriffonApplication
GriffonApplication that runs in applet mode.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
EMPTY_ARGS |
protected Injector<?> |
injector |
protected java.util.Locale |
locale |
protected java.lang.Object[] |
lock |
protected org.slf4j.Logger |
log |
protected java.beans.PropertyChangeSupport |
pcs |
protected ApplicationPhase |
phase |
protected java.util.List<ShutdownHandler> |
shutdownHandlers |
protected java.lang.Object |
shutdownLock |
protected java.lang.String[] |
startupArgs |
PROPERTY_LOCALE, PROPERTY_PHASE| Constructor and Description |
|---|
AbstractJavaFXGriffonApplication() |
AbstractJavaFXGriffonApplication(java.lang.String[] args) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the given PropertyChangeListener to the listener list.
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
addShutdownHandler(ShutdownHandler handler)
Registers a ShutdownHandler on this application
|
boolean |
canShutdown()
Queries any available ShutdownHandlers.
|
protected boolean |
doShutdown() |
protected void |
event(ApplicationEvent event,
java.util.List<?> args) |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent event) |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
ActionManager |
getActionManager() |
AddonManager |
getAddonManager() |
ApplicationClassLoader |
getApplicationClassLoader() |
protected ApplicationConfigurer |
getApplicationConfigurer() |
ArtifactManager |
getArtifactManager() |
Configuration |
getConfiguration() |
ConfigurationManager |
getConfigurationManager() |
Context |
getContext() |
EventRouter |
getEventRouter() |
Injector<?> |
getInjector() |
java.util.Locale |
getLocale()
Gets the application locale.
|
org.slf4j.Logger |
getLog()
Returns a Logger instance suitable for this application.
|
MessageSource |
getMessageSource() |
MVCGroupManager |
getMvcGroupManager() |
ApplicationPhase |
getPhase()
Returns the current phase.
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the listeners that were added with addPropertyChangeListener().
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners which have been associated
with the named property.
|
ResourceHandler |
getResourceHandler() |
ResourceInjector |
getResourceInjector() |
ResourceResolver |
getResourceResolver() |
java.lang.String[] |
getStartupArgs()
Returns the arguments set on the command line (if any).
|
UIThreadManager |
getUIThreadManager() |
<W> WindowManager<W> |
getWindowManager() |
void |
initialize()
Executes the 'Initialize' life cycle phase.
|
void |
ready()
Executes the 'Ready' life cycle phase.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener from the listener list.
|
void |
removeShutdownHandler(ShutdownHandler handler)
Removes a ShutdownHandler from this application
|
void |
setInjector(Injector<?> injector) |
void |
setLocale(java.util.Locale locale)
Sets the application locale.
|
void |
setLocaleAsString(java.lang.String locale)
Sets the application locale.
|
protected void |
setPhase(ApplicationPhase phase) |
protected void |
showStartingWindow() |
boolean |
shutdown()
Executes the 'Shutdown' life cycle phase.
|
void |
start(javafx.stage.Stage stage) |
void |
startup()
Executes the 'Startup' life cycle phase.
|
void |
stop() |
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateApplicationContainerpublic static final java.lang.String[] EMPTY_ARGS
protected final java.lang.Object[] lock
protected final java.beans.PropertyChangeSupport pcs
protected final java.util.List<ShutdownHandler> shutdownHandlers
protected final java.lang.Object shutdownLock
protected final org.slf4j.Logger log
protected java.util.Locale locale
protected ApplicationPhase phase
protected java.lang.String[] startupArgs
protected Injector<?> injector
public AbstractJavaFXGriffonApplication()
public AbstractJavaFXGriffonApplication(@Nonnull
java.lang.String[] args)
public void start(javafx.stage.Stage stage)
throws java.lang.Exception
start in class javafx.application.Applicationjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in class javafx.application.Applicationjava.lang.Exceptionpublic void addPropertyChangeListener(@Nullable
java.beans.PropertyChangeListener listener)
ObservableThe listener is registered for all bound properties of this class.
addPropertyChangeListener in interface Observablelistener - the PropertyChangeListener to be addedObservable.removePropertyChangeListener(PropertyChangeListener)public void addPropertyChangeListener(@Nullable
java.lang.String propertyName,
@Nullable
java.beans.PropertyChangeListener listener)
ObservableThe listener is registered an specific property of this class.
addPropertyChangeListener in interface ObservablepropertyName - The name of the property to listen on.listener - the PropertyChangeListener to be addedObservable.removePropertyChangeListener(String, PropertyChangeListener)public void removePropertyChangeListener(@Nullable
java.beans.PropertyChangeListener listener)
ObservableThis method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.
removePropertyChangeListener in interface Observablelistener - the PropertyChangeListener to be removedObservable.addPropertyChangeListener(PropertyChangeListener)public void removePropertyChangeListener(@Nullable
java.lang.String propertyName,
@Nullable
java.beans.PropertyChangeListener listener)
ObservableThis method should be used to remove PropertyChangeListeners that were registered for an specific property of this class.
removePropertyChangeListener in interface ObservablepropertyName - The name of the property that was listened on.listener - the PropertyChangeListener to be removedObservable.addPropertyChangeListener(String, PropertyChangeListener)@Nonnull public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
ObservablegetPropertyChangeListeners in interface ObservablePropertyChangeListeners added or an empty array if no
listeners have been added.@Nonnull
public java.beans.PropertyChangeListener[] getPropertyChangeListeners(@Nullable
java.lang.String propertyName)
ObservablegetPropertyChangeListeners in interface ObservablepropertyName - The name of the property being listened toPropertyChangeListeners associated with
the named property. If no such listeners have been added,
or if propertyName is null, an empty array is
returned.protected void firePropertyChange(@Nonnull
java.beans.PropertyChangeEvent event)
protected void firePropertyChange(@Nonnull
java.lang.String propertyName,
@Nullable
java.lang.Object oldValue,
@Nullable
java.lang.Object newValue)
@Nonnull public java.util.Locale getLocale()
GriffonApplicationgetLocale in interface GriffonApplicationpublic void setLocale(@Nonnull
java.util.Locale locale)
GriffonApplicationThis is a bound property.
setLocale in interface GriffonApplicationlocale - the Locale value to use@Nonnull public java.lang.String[] getStartupArgs()
GriffonApplicationgetStartupArgs in interface GriffonApplication@Nonnull public org.slf4j.Logger getLog()
GriffonApplicationgetLog in interface GriffonApplicationpublic void setLocaleAsString(@Nullable
java.lang.String locale)
GriffonApplicationThis is a bound property.
setLocaleAsString in interface GriffonApplicationlocale - a literal representation of a Localepublic void addShutdownHandler(@Nonnull
ShutdownHandler handler)
GriffonApplicationaddShutdownHandler in interface GriffonApplicationhandler - the shutdown handler to be registered; null and/or
duplicated values should be ignoredpublic void removeShutdownHandler(@Nonnull
ShutdownHandler handler)
GriffonApplicationremoveShutdownHandler in interface GriffonApplicationhandler - the shutdown handler to be removed; null and/or
duplicated values should be ignored@Nonnull public ApplicationPhase getPhase()
GriffonApplicationgetPhase in interface GriffonApplicationprotected void setPhase(@Nonnull
ApplicationPhase phase)
@Nonnull public ApplicationClassLoader getApplicationClassLoader()
getApplicationClassLoader in interface GriffonApplication@Nonnull public Context getContext()
getContext in interface GriffonApplication@Nonnull public Configuration getConfiguration()
getConfiguration in interface GriffonApplication@Nonnull public ConfigurationManager getConfigurationManager()
getConfigurationManager in interface GriffonApplication@Nonnull public UIThreadManager getUIThreadManager()
getUIThreadManager in interface GriffonApplication@Nonnull public EventRouter getEventRouter()
getEventRouter in interface GriffonApplication@Nonnull public ArtifactManager getArtifactManager()
getArtifactManager in interface GriffonApplication@Nonnull public ActionManager getActionManager()
getActionManager in interface GriffonApplication@Nonnull public AddonManager getAddonManager()
getAddonManager in interface GriffonApplication@Nonnull public MVCGroupManager getMvcGroupManager()
getMvcGroupManager in interface GriffonApplication@Nonnull public MessageSource getMessageSource()
getMessageSource in interface GriffonApplication@Nonnull public ResourceResolver getResourceResolver()
getResourceResolver in interface GriffonApplication@Nonnull public ResourceHandler getResourceHandler()
getResourceHandler in interface GriffonApplication@Nonnull public ResourceInjector getResourceInjector()
getResourceInjector in interface GriffonApplication@Nonnull public Injector<?> getInjector()
getInjector in interface GriffonApplicationpublic void setInjector(@Nonnull
Injector<?> injector)
@Nonnull public <W> WindowManager<W> getWindowManager()
getWindowManager in interface GriffonApplicationprotected ApplicationConfigurer getApplicationConfigurer()
public void initialize()
GriffonApplicationinitialize in interface GriffonApplicationpublic void ready()
GriffonApplicationready in interface GriffonApplicationprotected void showStartingWindow()
public boolean canShutdown()
GriffonApplicationcanShutdown in interface GriffonApplicationpublic boolean shutdown()
GriffonApplicationshutdown in interface GriffonApplicationprotected boolean doShutdown()
public void startup()
GriffonApplicationstartup in interface GriffonApplicationprotected void event(@Nonnull
ApplicationEvent event,
@Nullable
java.util.List<?> args)