Package org.scijava.widget
Class AbstractInputWidget<T,W>
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.plugin.AbstractTypedPlugin<D>
-
- org.scijava.plugin.AbstractWrapperPlugin<WidgetModel>
-
- org.scijava.widget.AbstractInputWidget<T,W>
-
- Type Parameters:
T- The input type of the widget.W- The type of UI component housing the widget.
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Identifiable,Locatable,Logged,HasPluginInfo,RichPlugin,SciJavaPlugin,TypedPlugin<WidgetModel>,WrapperPlugin<WidgetModel>,Prioritized,Typed<WidgetModel>,Versioned,InputWidget<T,W>,UIComponent<W>
- Direct Known Subclasses:
AbstractUIInputWidget
public abstract class AbstractInputWidget<T,W> extends AbstractWrapperPlugin<WidgetModel> implements InputWidget<T,W>
Base class for input widgets.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description AbstractInputWidget()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WidgetModelget()Gets the data object currently associated with this plugin.voidset(WidgetModel model)Associates the given data object with this plugin.booleansupports(WidgetModel data)Gets whether this object is compatible with the given data object.voidupdateModel()Updates the model to reflect the latest widget state.-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority, toString
-
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 org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.widget.InputWidget
getType, getValue, isLabeled, isMessage, refreshWidget
-
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.widget.UIComponent
getComponent, getComponentType
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
updateModel
public void updateModel()
Description copied from interface:InputWidgetUpdates the model to reflect the latest widget state.- Specified by:
updateModelin interfaceInputWidget<T,W>
-
set
public void set(WidgetModel model)
Description copied from interface:WrapperPluginAssociates the given data object with this plugin. It must be a compatible object (i.e.,Typed.supports(T)must return true).- Specified by:
setin interfaceInputWidget<T,W>- Specified by:
setin interfaceWrapperPlugin<T>- Overrides:
setin classAbstractWrapperPlugin<WidgetModel>- Parameters:
model- The data object to associate with the plugin.
-
get
public WidgetModel get()
Description copied from interface:WrapperPluginGets the data object currently associated with this plugin.- Specified by:
getin interfaceInputWidget<T,W>- Specified by:
getin interfaceWrapperPlugin<T>- Overrides:
getin classAbstractWrapperPlugin<WidgetModel>
-
supports
public boolean supports(WidgetModel data)
Description copied from interface:TypedGets whether this object is compatible with the given data object.By default, this method will return
trueiff the data is assignable to the associated type given byTyped.getType(). But individual implementations may have other requirements beyond class assignability.- Specified by:
supportsin interfaceInputWidget<T,W>- Specified by:
supportsin interfaceTyped<T>- Overrides:
supportsin classAbstractTypedPlugin<WidgetModel>
-
-