Package org.scijava.display
Class AbstractDisplay<T>
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.display.AbstractDisplay<T>
-
- All Implemented Interfaces:
Comparable<Prioritized>,Iterable<T>,Collection<T>,List<T>,Contextual,Display<T>,Identifiable,Locatable,Logged,Named,HasPluginInfo,RichPlugin,SciJavaPlugin,Prioritized,Versioned
- Direct Known Subclasses:
DefaultDisplay,DefaultTextDisplay
public abstract class AbstractDisplay<T> extends AbstractRichPlugin implements Display<T>
Abstract superclass ofDisplayimplementations.- Author:
- Curtis Rueden
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisClosed
-
Constructor Summary
Constructors Constructor Description AbstractDisplay(Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T o)booleanaddAll(int index, Collection<? extends T> c)booleanaddAll(Collection<? extends T> c)booleancanDisplay(Class<?> c)Tests whether the display is capable of visualizing objects of the given class.protected voidcheckObject(Object o)voidclear()voidclose()Closes the display and disposes its resources.booleancontains(Object o)booleancontainsAll(Collection<?> c)voiddisplay(Object o)Displays the given object in this display.Tget(int index)StringgetName()Gets the name of the object.intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)protected voidnoteStructureChange()protected voidrebuild()Tremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Tset(int index, T element)voidsetName(String name)Sets the name of the object.intsize()List<T>subList(int fromIndex, int toIndex)Object[]toArray()<U> U[]toArray(U[] a)StringtoString()voidupdate()Updates and redraws the display onscreen.-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.display.Display
canDisplay, isDisplaying
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
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.Versioned
getVersion
-
-
-
-
Method Detail
-
rebuild
protected void rebuild()
-
toString
public String toString()
- Overrides:
toStringin classAbstractRichPlugin
-
canDisplay
public boolean canDisplay(Class<?> c)
Description copied from interface:DisplayTests whether the display is capable of visualizing objects of the given class.- Specified by:
canDisplayin interfaceDisplay<T>- Parameters:
c- The class to check for visualization capabilities.- Returns:
- True if the display can handle certain objects of the given class; false if it cannot visualize any objects of that class.
-
display
public void display(Object o)
Description copied from interface:DisplayDisplays the given object in this display.This method is essentially the same as
List.add(E)except that it accepts anyObjectregardless of type.
-
update
public void update()
Description copied from interface:DisplayUpdates and redraws the display onscreen.
-
close
public void close()
Description copied from interface:DisplayCloses the display and disposes its resources.
-
getName
public String getName()
Description copied from interface:NamedGets the name of the object.
-
setName
public void setName(String name)
Description copied from interface:NamedSets the name of the object.
-
addAll
public boolean addAll(int index, Collection<? extends T> c)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T>
-
add
public boolean add(T o)
-
addAll
public boolean addAll(Collection<? extends T> c)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
isEmpty
public boolean isEmpty()
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
toArray
public Object[] toArray()
-
toArray
public <U> U[] toArray(U[] a)
-
checkObject
protected void checkObject(Object o)
-
noteStructureChange
protected void noteStructureChange()
-
-