|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.AbstractContextual
public abstract class AbstractContextual
Abstract base class for Contextual
objects.
Delegates to Context.inject(Object)
to do the actual work of
setting the context, injecting service parameters, and registering
EventHandler
methods as event subscribers.
Context.inject(Object)
Constructor Summary | |
---|---|
AbstractContextual()
|
Method Summary | |
---|---|
Context |
context()
Gets the application context to which the object belongs. |
Context |
getContext()
Gets the application context to which the object belongs, or null if Contextual.setContext(Context) has not yet been called on this object. |
void |
setContext(Context context)
Sets the application context to which the object belongs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractContextual()
Method Detail |
---|
public Context context()
Contextual
context
in interface Contextual
Contextual.getContext()
public Context getContext()
Contextual
Contextual.setContext(Context)
has not yet been called on this object.
getContext
in interface Contextual
Contextual.context()
public void setContext(Context context)
Contextual
Typically this method simply delegates to Context.inject(Object)
,
and should be called only once to populate the context. Most contextual
objects do not support later alteration of the context, and will throw
IllegalStateException
if this method is invoked again.
setContext
in interface Contextual
Context.inject(Object)
,
for an example of how to implement this interface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |