Package org.scijava.event
Class DefaultEventHistory
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- org.scijava.event.DefaultEventHistory
-
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Disposable,EventHistory,Identifiable,Initializable,Locatable,Logged,HasPluginInfo,RichPlugin,SciJavaPlugin,Prioritized,SciJavaService,Service,Versioned
public class DefaultEventHistory extends AbstractService implements EventHistory
Default service for keeping a history of SciJava events.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description DefaultEventHistory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(EventHistoryListener l)Adds an event history listener.voidclear()Clears the recorded event history.booleanisActive()Gets whether event history tracking is currently active.protected voidonEvent(SciJavaEvent event)voidremoveListener(EventHistoryListener l)Removes an event history listener.voidsetActive(boolean active)Activates or deactivates event history tracking.StringtoHTML(Set<Class<? extends SciJavaEvent>> filtered, Set<Class<? extends SciJavaEvent>> highlighted)Gets the recorded event history as an HTML string.-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
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.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
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.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
setActive
public void setActive(boolean active)
Description copied from interface:EventHistoryActivates or deactivates event history tracking.- Specified by:
setActivein interfaceEventHistory
-
isActive
public boolean isActive()
Description copied from interface:EventHistoryGets whether event history tracking is currently active.- Specified by:
isActivein interfaceEventHistory
-
clear
public void clear()
Description copied from interface:EventHistoryClears the recorded event history.- Specified by:
clearin interfaceEventHistory
-
toHTML
public String toHTML(Set<Class<? extends SciJavaEvent>> filtered, Set<Class<? extends SciJavaEvent>> highlighted)
Description copied from interface:EventHistoryGets the recorded event history as an HTML string.- Specified by:
toHTMLin interfaceEventHistory- Parameters:
filtered- Set of event types to filter out from the history.highlighted- Set of event types to highlight in the history.- Returns:
- An HTML string representing the recorded event history.
-
addListener
public void addListener(EventHistoryListener l)
Description copied from interface:EventHistoryAdds an event history listener. This mechanism exists (rather than using the event bus) to avoid event feedback loops when reporting history changes.- Specified by:
addListenerin interfaceEventHistory
-
removeListener
public void removeListener(EventHistoryListener l)
Description copied from interface:EventHistoryRemoves an event history listener. This mechanism exists (rather than using the event bus) to avoid event feedback loops when reporting history changes.- Specified by:
removeListenerin interfaceEventHistory
-
onEvent
protected void onEvent(SciJavaEvent event)
-
-