public interface DisplayService extends SciJavaService
Display
s.Modifier and Type | Method and Description |
---|---|
Display<?> |
createDisplay(Object o)
Creates a display for the given object, publishing a
DisplayCreatedEvent to notify interested parties. |
Display<?> |
createDisplay(String name,
Object o)
Creates a display for the given object, publishing a
DisplayCreatedEvent to notify interested parties. |
Display<?> |
createDisplayQuietly(Object o)
Creates a display for the given object, without publishing a
DisplayCreatedEvent . |
default EventService |
eventService() |
Display<?> |
getActiveDisplay()
Gets the currently active display (of any Display type).
|
<D extends Display<?>> |
getActiveDisplay(Class<D> displayClass)
Gets the most recently active display (of the specified Display type).
|
Display<?> |
getDisplay(String name)
Gets a display by its name.
|
<D extends Display<?>> |
getDisplayPlugin(Class<D> pluginClass)
Gets the display plugin of the given class, or null if none.
|
PluginInfo<Display<?>> |
getDisplayPlugin(String className)
Gets the display plugin of the given class name, or null if none.
|
List<PluginInfo<Display<?>>> |
getDisplayPlugins()
Gets the list of known display plugins.
|
<DT extends Display<?>> |
getDisplayPluginsOfType(Class<DT> type)
Gets the list of display plugins of the given type (e.g.,
ImageDisplay.class ). |
List<Display<?>> |
getDisplays()
Gets a list of all available displays.
|
List<Display<?>> |
getDisplays(Object o)
Gets a list of displays currently visualizing the given object.
|
<DT extends Display<?>> |
getDisplaysOfType(Class<DT> type)
Gets a list of all available displays of the given type (e.g.,
ImageDisplay.class ). |
default EventService |
getEventService()
Deprecated.
Use
eventService() instead. |
default ObjectService |
getObjectService()
Deprecated.
Use
objectService() instead. |
default PluginService |
getPluginService()
Deprecated.
Use
pluginService() instead. |
boolean |
isUniqueName(String name)
Checks whether the given name is already taken by an existing display.
|
default ObjectService |
objectService() |
default PluginService |
pluginService() |
void |
setActiveDisplay(Display<?> display)
Set the active display.
|
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
default EventService eventService()
default ObjectService objectService()
default PluginService pluginService()
Display<?> getActiveDisplay()
<D extends Display<?>> D getActiveDisplay(Class<D> displayClass)
void setActiveDisplay(Display<?> display)
display
- List<PluginInfo<Display<?>>> getDisplayPlugins()
<D extends Display<?>> PluginInfo<Display<?>> getDisplayPlugin(Class<D> pluginClass)
PluginInfo<Display<?>> getDisplayPlugin(String className)
ClassCastException
- if the plugin found is not a display plugin.<DT extends Display<?>> List<PluginInfo<DT>> getDisplayPluginsOfType(Class<DT> type)
ImageDisplay.class
).<DT extends Display<?>> List<DT> getDisplaysOfType(Class<DT> type)
ImageDisplay.class
).List<Display<?>> getDisplays(Object o)
boolean isUniqueName(String name)
name
- The name to check.Display<?> createDisplay(Object o)
DisplayCreatedEvent
to notify interested parties. In particular:
ObjectService
will add the new display to its index, until
a corresponding DisplayDeletedEvent
is later published.
To create a Display
without publishing an event, see
createDisplayQuietly(java.lang.Object)
.
o
- The object for which a display should be created. The object is
then added to the display.Display<?>
containing the given object. The
Display is typed with ? rather than T matching the Object because
it is possible for the Display to be a collection of some other
sort of object than the one being added. For example, ImageDisplay
is a Display<DataView>
with the DataView wrapping a
Dataset, yet the ImageDisplay supports adding Datasets directly,
taking care of wrapping them in a DataView as needed.Display<?> createDisplay(String name, Object o)
DisplayCreatedEvent
to notify interested parties. In particular:
ObjectService
will add the new display to its index, until
a corresponding DisplayDeletedEvent
is later published.
To create a Display
without publishing an event, see
createDisplayQuietly(java.lang.Object)
.
name
- The name to be assigned to the display.o
- The object for which a display should be created. The object is
then added to the display.Display<?>
containing the given object. The
Display is typed with ? rather than T matching the Object because
it is possible for the Display to be a collection of some other
sort of object than the one being added. For example, ImageDisplay
is a Display<DataView>
with the DataView wrapping a
Dataset, yet the ImageDisplay supports adding Datasets directly,
taking care of wrapping them in a DataView as needed.Display<?> createDisplayQuietly(Object o)
DisplayCreatedEvent
. Hence, the display will not be automatically
shown or tracked.o
- The object for which a display should be created. The object is
then added to the display.Display<?>
containing the given object. The
Display is typed with ? rather than T matching the Object because
it is possible for the Display to be a collection of some other
sort of object than the one being added. For example, ImageDisplay
is a Display<DataView>
with the DataView wrapping a
Dataset, yet the ImageDisplay supports adding Datasets directly,
taking care of wrapping them in a DataView as needed.@Deprecated default EventService getEventService()
eventService()
instead.@Deprecated default ObjectService getObjectService()
objectService()
instead.@Deprecated default PluginService getPluginService()
pluginService()
instead.Copyright © 2015–2022 SciJava. All rights reserved.