public interface DisplayViewer<T> extends RichPlugin, Disposable
Display viewers discoverable at runtime must implement this interface and be
annotated with @Plugin
with attribute Plugin.type()
=
DisplayViewer
.class. While it possible to create a display viewer
merely by implementing this interface, it is encouraged to instead extend
AbstractDisplayViewer
, for convenience.
Plugin
Modifier and Type | Method and Description |
---|---|
boolean |
canView(Display<?> d)
Returns true if an instance of this display viewer can view the given
display.
|
Display<T> |
getDisplay()
Gets the display being viewed.
|
DisplayPanel |
getPanel()
Gets the display panel that hosts the gui elements.
|
DisplayWindow |
getWindow()
Gets the window in which the view is displayed.
|
boolean |
isCompatible(UserInterface ui)
Returns true if this display viewer can be used with the given UI.
|
void |
onDisplayActivatedEvent(DisplayActivatedEvent e)
Handles a display activated event directed at this viewer's display.
|
void |
onDisplayDeletedEvent(DisplayDeletedEvent e)
Removes the user interface when the display is deleted.
|
void |
onDisplayUpdatedEvent(DisplayUpdatedEvent e)
Synchronizes the user interface appearance with the display model.
|
void |
setPanel(DisplayPanel panel)
Installs the display panel.
|
void |
view(DisplayWindow w,
Display<?> d)
Begins viewing the given display.
|
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
dispose
boolean isCompatible(UserInterface ui)
boolean canView(Display<?> d)
void view(DisplayWindow w, Display<?> d)
w
- The frame / window that will contain the GUI elementsd
- the model for the display to show.DisplayWindow getWindow()
void setPanel(DisplayPanel panel)
panel
- the panel used to host the guiDisplayPanel getPanel()
void onDisplayUpdatedEvent(DisplayUpdatedEvent e)
void onDisplayDeletedEvent(DisplayDeletedEvent e)
void onDisplayActivatedEvent(DisplayActivatedEvent e)
Copyright © 2009–2015 SciJava. All rights reserved.