|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Display<T>
A display is a particular type of plugin intended to collect objects for
visualization. For example, a TextDisplay
displays String
s.
Displays discoverable at runtime must implement this interface and be
annotated with @Plugin
with attribute Plugin.type()
=
Display
.class. While it possible to create a display merely by
implementing this interface, it is encouraged to instead extend
AbstractDisplay
, for convenience.
Plugin
,
DisplayService
Method Summary | |
---|---|
boolean |
canDisplay(Class<?> c)
Tests whether the display is capable of visualizing objects of the given class. |
boolean |
canDisplay(Object o)
Tests whether the display is capable of visualizing the given object. |
void |
close()
Closes the display and disposes its resources. |
void |
display(Object o)
Displays the given object in this display. |
boolean |
isDisplaying(Object o)
Tests whether the display is currently visualizing the given object. |
void |
update()
Updates and redraws the display onscreen. |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
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.Named |
---|
getName, setName |
Method Detail |
---|
boolean canDisplay(Class<?> c)
c
- The class to check for visualization capabilities.
boolean canDisplay(Object o)
void display(Object o)
This method is essentially the same as List.add(E)
except that it accepts
any Object
regardless of type.
IllegalArgumentException
- if the object cannot be displayed (i.e.,
if canDisplay(Object)
returns false).boolean isDisplaying(Object o)
Note that this method may behave differently than List.contains(java.lang.Object)
; in
general, any time List.contains(java.lang.Object)
returns true, this method will also
return true, but not vice versa. For example, in ImageJ, an
ImageDisplay
is a Display<DataView>
but calling
isDisplaying
on a Dataset
(which is not a DataView
)
will return true if the ImageDisplay
currently contains a
DatasetView
that wraps that Dataset
.
void update()
void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |