public final class DefaultObjectService extends AbstractService implements ObjectService
ObjectCreatedEvents, and removes objects
from ObjectDeletedEvents.
This is useful to retrieve available objects of a particular type. For
example, the InputHarvester infrastructure uses it
to provide a pool of available objects for widgets such as the
ObjectWidget, which provide the user with a
multiple-choice selection.
| Constructor and Description |
|---|
DefaultObjectService() |
| Modifier and Type | Method and Description |
|---|---|
EventService |
eventService() |
NamedObjectIndex<Object> |
getIndex()
Gets the index of available objects.
|
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
protected void |
onEvent(ObjectCreatedEvent event) |
protected void |
onEvent(ObjectDeletedEvent event) |
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddObject, addObject, getEventService, getName, getObjects, removeObjectregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic EventService eventService()
eventService in interface ObjectServicepublic NamedObjectIndex<Object> getIndex()
ObjectServicegetIndex in interface ObjectServicepublic 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 Initializableinitialize in interface Serviceprotected void onEvent(ObjectCreatedEvent event)
protected void onEvent(ObjectDeletedEvent event)
Copyright © 2015–2022 SciJava. All rights reserved.