Interface PluginWithTransientState<T>
- Type Parameters:
T- the type used to record the state, usually a Javarecord
public interface PluginWithTransientState<T>
A
Plugin that can save and restore transient state
Plugins should implements this if they have state that needs to be saved as domain objects get
switched between active and inactive, i.e., when the user tabs to a different domain object and
back. Whatever object is returned by getTransientState() state will be fed back to this
plugin via restoreTransientState(Object) after the tool state is switched back to the
domain object that was active.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an object containing the plugins state.booleanAlready required/provided byPluginvoidrestoreTransientState(T state) Provides the transient state object that was returned in the correspondinggetTransientState()call.
-
Method Details
-
getTransientState
T getTransientState()Returns an object containing the plugins state.- Returns:
- Object to be return in the restoreTransientState() method.
-
restoreTransientState
Provides the transient state object that was returned in the correspondinggetTransientState()call.- Parameters:
state- the state object that was generated by this plugin's getTransientState() method.
-
isDisposed
boolean isDisposed()Already required/provided byPlugin- Returns:
- true if the plugin has been disposed
-