T
- The input type of the widget.W
- The type of UI component housing the widget.public abstract class AbstractInputWidget<T,W> extends AbstractWrapperPlugin<WidgetModel> implements InputWidget<T,W>
Constructor and Description |
---|
AbstractInputWidget() |
Modifier and Type | Method and Description |
---|---|
WidgetModel |
get()
Gets the data object currently associated with this plugin.
|
void |
set(WidgetModel model)
Associates the given data object with this plugin.
|
boolean |
supports(WidgetModel data)
Gets whether this object is compatible with the given data object.
|
void |
updateModel()
Updates the model to reflect the latest widget state.
|
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getType, getValue, isLabeled, isMessage, refreshWidget
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
getComponent, getComponentType
public void updateModel()
InputWidget
updateModel
in interface InputWidget<T,W>
public void set(WidgetModel model)
WrapperPlugin
Typed.supports(T)
must return true).set
in interface WrapperPlugin<WidgetModel>
set
in interface InputWidget<T,W>
set
in class AbstractWrapperPlugin<WidgetModel>
model
- The data object to associate with the plugin.public WidgetModel get()
WrapperPlugin
get
in interface WrapperPlugin<WidgetModel>
get
in interface InputWidget<T,W>
get
in class AbstractWrapperPlugin<WidgetModel>
public boolean supports(WidgetModel data)
Typed
By default, this method will return true
iff the data is assignable
to the associated type given by Typed.getType()
. But individual
implementations may have other requirements beyond class assignability.
supports
in interface Typed<WidgetModel>
supports
in interface InputWidget<T,W>
supports
in class AbstractTypedPlugin<WidgetModel>
Copyright © 2015–2022 SciJava. All rights reserved.