Package org.scijava.widget
Interface InputPanel<P,W>
-
- Type Parameters:
P- The type of UI component housing the input panel itself.W- The type of UI component housing each input widget.
- All Superinterfaces:
UIComponent<P>
- All Known Implementing Classes:
AbstractInputPanel
public interface InputPanel<P,W> extends UIComponent<P>
Flexible panel-building interface, for use with UIs that prompt for input values of various types.- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddWidget(InputWidget<?,W> widget)Adds a widget to the panel.ObjectgetValue(String name)Returns the value of the given widget's input.InputWidget<?,W>getWidget(String name)Gets the widget with the provided name.Class<W>getWidgetComponentType()Gets the type of the UI component housing the panel's widgets.intgetWidgetCount()Gets the number of active widgets in the input panel.booleanhasWidgets()Gets whether the input panel has any active widgets.booleanisMessageOnly()Returns true if the input panel consists of only messages.voidrefresh()Updates the widgets to reflect the most recent parameter value(s).default booleansupports(InputWidget<?,?> widget)Gets whether the given widget would be appropriate for the given panel.-
Methods inherited from interface org.scijava.widget.UIComponent
getComponent, getComponentType
-
-
-
-
Method Detail
-
supports
default boolean supports(InputWidget<?,?> widget)
Gets whether the given widget would be appropriate for the given panel.
-
addWidget
void addWidget(InputWidget<?,W> widget)
Adds a widget to the panel.
-
getValue
Object getValue(String name)
Returns the value of the given widget's input.- Parameters:
name- unique name identifying this field
-
getWidgetCount
int getWidgetCount()
Gets the number of active widgets in the input panel.
-
hasWidgets
boolean hasWidgets()
Gets whether the input panel has any active widgets.
-
isMessageOnly
boolean isMessageOnly()
Returns true if the input panel consists of only messages.
-
refresh
void refresh()
Updates the widgets to reflect the most recent parameter value(s).
-
getWidgetComponentType
Class<W> getWidgetComponentType()
Gets the type of the UI component housing the panel's widgets.
-
getWidget
InputWidget<?,W> getWidget(String name)
Gets the widget with the provided name.
-
-