org.scijava.platform
Class DefaultAppEventService
java.lang.Object
org.scijava.AbstractContextual
org.scijava.plugin.AbstractRichPlugin
org.scijava.service.AbstractService
org.scijava.platform.DefaultAppEventService
- All Implemented Interfaces:
- Comparable<Prioritized>, Contextual, Disposable, AppEventService, HasPluginInfo, RichPlugin, SciJavaPlugin, Prioritized, SciJavaService, Service
public class DefaultAppEventService
- extends AbstractService
- implements AppEventService
Default service for handling application-level events.
An AppAboutEvent
triggers a callback to about()
. An
AppPreferencesEvent
triggers a callback to prefs()
. Finally,
an AppQuitEvent
triggers a callback to quit()
. Note that
this class's implementations of the former two methods do nothing, and the
latter simply disposes the application context with no user checks.
- Author:
- Curtis Rueden
DefaultAppEventService
public DefaultAppEventService()
about
public void about()
- Description copied from interface:
AppEventService
- Displays an About ImageJ dialog.
- Specified by:
about
in interface AppEventService
prefs
public void prefs()
- Description copied from interface:
AppEventService
- Displays the ImageJ preferences dialog.
- Specified by:
prefs
in interface AppEventService
quit
public void quit()
- Description copied from interface:
AppEventService
- Quits ImageJ, prompting the user about any unsaved work first.
- Specified by:
quit
in interface AppEventService
getCommands
public List<Class<? extends Command>> getCommands()
- Description copied from interface:
AppEventService
- Gets the commands associated with this service.
- Specified by:
getCommands
in interface AppEventService
onEvent
protected void onEvent(AppAboutEvent event)
onEvent
protected void onEvent(AppPreferencesEvent event)
onEvent
protected void onEvent(AppQuitEvent event)
Copyright © 2009–2014 SciJava. All rights reserved.