|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.AbstractContextual
org.scijava.plugin.AbstractRichPlugin
org.scijava.service.AbstractService
org.scijava.display.DefaultDisplayService
public final class DefaultDisplayService
Default service for working with Display
s.
Constructor Summary | |
---|---|
DefaultDisplayService()
|
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). |
|
|
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. |
|
|
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. |
|
|
getDisplayPluginsOfType(Class<D> 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. |
|
|
getDisplaysOfType(Class<D> 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. |
|
protected void |
onEvent(DisplayDeletedEvent evt)
Removes a display from the display list when it is deleted |
|
protected void |
onEvent(WinActivatedEvent event)
Sets the display to active when its window is activated. |
|
protected void |
onEvent(WinClosedEvent event)
Deletes the display when display window is closed. |
|
void |
setActiveDisplay(Display<?> display)
Set the active display. |
Methods inherited from class org.scijava.service.AbstractService |
---|
dispose, getContext, initialize, registerEventHandlers, setContext, toString |
Methods inherited from class org.scijava.plugin.AbstractRichPlugin |
---|
compareTo, getInfo, getPriority, setInfo, setPriority |
Methods inherited from class org.scijava.AbstractContextual |
---|
context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Constructor Detail |
---|
public DefaultDisplayService()
Method Detail |
---|
public EventService getEventService()
getEventService
in interface DisplayService
public ObjectService getObjectService()
getObjectService
in interface DisplayService
public PluginService getPluginService()
getPluginService
in interface DisplayService
public Display<?> getActiveDisplay()
DisplayService
getActiveDisplay
in interface DisplayService
public <D extends Display<?>> D getActiveDisplay(Class<D> displayClass)
DisplayService
getActiveDisplay
in interface DisplayService
public void setActiveDisplay(Display<?> display)
DisplayService
setActiveDisplay
in interface DisplayService
public List<PluginInfo<Display<?>>> getDisplayPlugins()
DisplayService
getDisplayPlugins
in interface DisplayService
public <D extends Display<?>> PluginInfo<Display<?>> getDisplayPlugin(Class<D> pluginClass)
DisplayService
getDisplayPlugin
in interface DisplayService
public PluginInfo<Display<?>> getDisplayPlugin(String className)
DisplayService
getDisplayPlugin
in interface DisplayService
public <D extends Display<?>> List<PluginInfo<D>> getDisplayPluginsOfType(Class<D> type)
DisplayService
ImageDisplay.class
).
getDisplayPluginsOfType
in interface DisplayService
public List<Display<?>> getDisplays()
DisplayService
getDisplays
in interface DisplayService
public <D extends Display<?>> List<D> getDisplaysOfType(Class<D> type)
DisplayService
ImageDisplay.class
).
getDisplaysOfType
in interface DisplayService
public Display<?> getDisplay(String name)
DisplayService
getDisplay
in interface DisplayService
public List<Display<?>> getDisplays(Object o)
DisplayService
getDisplays
in interface DisplayService
public boolean isUniqueName(String name)
DisplayService
isUniqueName
in interface DisplayService
name
- The name to check.
public Display<?> createDisplay(Object o)
DisplayService
createDisplay
in interface DisplayService
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.public Display<?> createDisplay(String name, Object o)
DisplayService
createDisplay
in interface DisplayService
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.protected void onEvent(WinClosedEvent event)
protected void onEvent(WinActivatedEvent event)
protected void onEvent(DisplayDeletedEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |