public final class DefaultPlatformService extends AbstractSingletonService<Platform> implements PlatformService
| Constructor and Description |
|---|
DefaultPlatformService() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Performs any needed cleanup of the object's services, in preparation for
the object being retired (e.g., to make garbage collection possible).
|
int |
exec(String... args)
Executes a native program and waits for it to return.
|
List<? extends Platform> |
filterInstances(List<Platform> list)
Allows subclasses to exclude instances.
|
AppEventService |
getAppEventService() |
CommandService |
getCommandService() |
EventService |
getEventService() |
Class<Platform> |
getPluginType()
Gets the type of plugins managed by this service.
|
List<Platform> |
getTargetPlatforms()
Gets the platform handlers applicable to this platform.
|
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
protected void |
onEvent(AppMenusCreatedEvent event) |
void |
open(URL url)
Opens a URL in a platform-dependent way.
|
boolean |
registerAppMenus(Object menus)
Informs the active platform handlers of a UI's newly created application
menu structure.
|
create, getInstance, getInstancesgetPlugins, getPluginServicegetContext, registerEventHandlers, setContext, toStringcompareTo, getInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInstance, getInstancescreate, getPlugins, getPluginServiceregisterEventHandlerscontext, getContext, setContextgetPriority, setPrioritycompareTogetInfo, setInfopublic EventService getEventService()
getEventService in interface PlatformServicepublic CommandService getCommandService()
getCommandService in interface PlatformServicepublic AppEventService getAppEventService()
getAppEventService in interface PlatformServicepublic List<Platform> getTargetPlatforms()
PlatformServicegetTargetPlatforms in interface PlatformServicepublic void open(URL url) throws IOException
PlatformServiceopen in interface PlatformServiceIOExceptionpublic int exec(String... args) throws IOException
PlatformServiceexec in interface PlatformServiceIOExceptionpublic boolean registerAppMenus(Object menus)
PlatformServiceregisterAppMenus in interface PlatformServicemenus - The UI's newly created menu structurepublic List<? extends Platform> filterInstances(List<Platform> list)
AbstractSingletonServicefilterInstances in class AbstractSingletonService<Platform>list - the initial list of instancespublic Class<Platform> getPluginType()
PTServicegetPluginType in interface PTService<Platform>public void initialize()
Service
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the ServiceHelper)
when initializing the service. It should not be called a second time.
initialize in interface Serviceinitialize in class AbstractSingletonService<Platform>public void dispose()
Disposabledispose in interface Disposabledispose in class AbstractServiceprotected void onEvent(AppMenusCreatedEvent event)
Copyright © 2009–2016 SciJava. All rights reserved.