org.scijava.display
Interface DisplayService

All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, RichPlugin, SciJavaPlugin, SciJavaService, Service
All Known Implementing Classes:
DefaultDisplayService

public interface DisplayService
extends SciJavaService

Interface for service that tracks available Displays.

Author:
Barry DeZonia, Curtis Rueden, Grant Harris

Method Summary
 Display<?> createDisplay(Object o)
          Creates a display for the given object.
 Display<?> createDisplay(String name, Object o)
          Creates a display for the given object.
 Display<?> getActiveDisplay()
          Gets the currently active display (of any Display type).
<D extends Display<?>>
D
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<?>>
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).
 EventService getEventService()
           
 ObjectService getObjectService()
           
 PluginService getPluginService()
           
 boolean isUniqueName(String name)
          Checks whether the given name is already taken by an existing display.
 void setActiveDisplay(Display<?> display)
          Set the active display.
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Method Detail

getEventService

EventService getEventService()

getObjectService

ObjectService getObjectService()

getPluginService

PluginService getPluginService()

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).


getDisplays

List<Display<?>> getDisplays()
Gets a list of all available displays.


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).


getDisplay

Display<?> getDisplay(String name)
Gets a display by its name.


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.

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 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.

createDisplay

Display<?> createDisplay(String name,
                         Object o)
Creates a display for the given 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 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.


Copyright © 2009–2014 SciJava. All rights reserved.