Package org.scijava.display
Interface DisplayService
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,Disposable,HasPluginInfo,Identifiable,Initializable,Locatable,Logged,Prioritized,RichPlugin,SciJavaPlugin,SciJavaService,Service,Versioned
- All Known Implementing Classes:
DefaultDisplayService
public interface DisplayService extends SciJavaService
Interface for service that tracks availableDisplays.- Author:
- Barry DeZonia, Curtis Rueden, Grant Harris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Display<?>createDisplay(Object o)Creates a display for the given object, publishing aDisplayCreatedEventto notify interested parties.Display<?>createDisplay(String name, Object o)Creates a display for the given object, publishing aDisplayCreatedEventto notify interested parties.Display<?>createDisplayQuietly(Object o)Creates a display for the given object, without publishing aDisplayCreatedEvent.default EventServiceeventService()Display<?>getActiveDisplay()Gets the currently active display (of any Display type).<D extends Display<?>>
DgetActiveDisplay(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<?>>
PluginInfo<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<?>>
List<PluginInfo<DT>>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<?>>
List<DT>getDisplaysOfType(Class<DT> type)Gets a list of all available displays of the given type (e.g.,ImageDisplay.class).default EventServicegetEventService()Deprecated.UseeventService()instead.default ObjectServicegetObjectService()Deprecated.UseobjectService()instead.default PluginServicegetPluginService()Deprecated.UsepluginService()instead.booleanisUniqueName(String name)Checks whether the given name is already taken by an existing display.default ObjectServiceobjectService()default PluginServicepluginService()voidsetActiveDisplay(Display<?> display)Set the active display.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
eventService
default EventService eventService()
-
objectService
default ObjectService objectService()
-
pluginService
default PluginService pluginService()
-
getActiveDisplay
Display<?> getActiveDisplay()
Gets the currently active display (of any Display type).
-
getActiveDisplay
<D extends Display<?>> D getActiveDisplay(Class<D> displayClass)
Gets the most recently active display (of the specified Display type).
-
setActiveDisplay
void setActiveDisplay(Display<?> display)
Set the active display.- Parameters:
display-
-
getDisplayPlugins
List<PluginInfo<Display<?>>> getDisplayPlugins()
Gets the list of known display plugins.
-
getDisplayPlugin
<D extends Display<?>> PluginInfo<Display<?>> getDisplayPlugin(Class<D> pluginClass)
Gets the display plugin of the given class, or null if none.
-
getDisplayPlugin
PluginInfo<Display<?>> getDisplayPlugin(String className)
Gets the display plugin of the given class name, or null if none.- Throws:
ClassCastException- if the plugin found is not a display plugin.
-
getDisplayPluginsOfType
<DT extends Display<?>> List<PluginInfo<DT>> getDisplayPluginsOfType(Class<DT> type)
Gets the list of display plugins of the given type (e.g.,ImageDisplay.class).
-
getDisplaysOfType
<DT extends Display<?>> List<DT> getDisplaysOfType(Class<DT> type)
Gets a list of all available displays of the given type (e.g.,ImageDisplay.class).
-
getDisplays
List<Display<?>> getDisplays(Object o)
Gets a list of displays currently visualizing the given object.
-
isUniqueName
boolean isUniqueName(String name)
Checks whether the given name is already taken by an existing display.- Parameters:
name- The name to check.- Returns:
- true if the name is available, false if already taken.
-
createDisplay
Display<?> createDisplay(Object o)
Creates a display for the given object, publishing aDisplayCreatedEventto notify interested parties. In particular:- Visible UIs will respond to this event by showing the display.
- The
ObjectServicewill add the new display to its index, until a correspondingDisplayDeletedEventis later published.
To create a
Displaywithout publishing an event, seecreateDisplayQuietly(java.lang.Object).- Parameters:
o- The object for which a display should be created. The object is then added to the display.- Returns:
- Newly created
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 aDisplay<DataView>with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.
-
createDisplay
Display<?> createDisplay(String name, Object o)
Creates a display for the given object, publishing aDisplayCreatedEventto notify interested parties. In particular:- Visible UIs will respond to this event by showing the display.
- The
ObjectServicewill add the new display to its index, until a correspondingDisplayDeletedEventis later published.
To create a
Displaywithout publishing an event, seecreateDisplayQuietly(java.lang.Object).- Parameters:
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.- Returns:
- Newly created
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 aDisplay<DataView>with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.
-
createDisplayQuietly
Display<?> createDisplayQuietly(Object o)
Creates a display for the given object, without publishing aDisplayCreatedEvent. Hence, the display will not be automatically shown or tracked.- Parameters:
o- The object for which a display should be created. The object is then added to the display.- Returns:
- Newly created
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 aDisplay<DataView>with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.
-
getEventService
@Deprecated default EventService getEventService()
Deprecated.UseeventService()instead.
-
getObjectService
@Deprecated default ObjectService getObjectService()
Deprecated.UseobjectService()instead.
-
getPluginService
@Deprecated default PluginService getPluginService()
Deprecated.UsepluginService()instead.
-
-