org.scijava.ui
Class AbstractUIInputWidget<T,W>

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.plugin.AbstractTypedPlugin<D>
              extended by org.scijava.plugin.AbstractWrapperPlugin<WidgetModel>
                  extended by org.scijava.widget.AbstractInputWidget<T,W>
                      extended by org.scijava.ui.AbstractUIInputWidget<T,W>
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, HasPluginInfo, RichPlugin, SciJavaPlugin, TypedPlugin<WidgetModel>, WrapperPlugin<WidgetModel>, Prioritized, Typed<WidgetModel>, InputWidget<T,W>, UIComponent<W>

public abstract class AbstractUIInputWidget<T,W>
extends AbstractInputWidget<T,W>

Abstract superclass of InputWidget implementations that belong to a specific UI.

refreshWidget() implementation determines if this widget needs to be refreshed on the EDT, and invokes it as needed if so.

Subclasses should implement doRefresh() as they would have refreshWidget(). A common abstract superclass for each UserInterface type should be sufficient for ui(), which can delegate to ui(String) with the appropriate UI name.

Author:
Mark Hiner

Constructor Summary
AbstractUIInputWidget()
           
 
Method Summary
protected abstract  void doRefresh()
          Performs the intended refreshWidget() operation.
 void refreshWidget()
          Refreshes the widget to reflect the latest model value(s).
protected abstract  UserInterface ui()
           
protected  UserInterface ui(String uiName)
           
 
Methods inherited from class org.scijava.widget.AbstractInputWidget
get, getType, isLabeled, isMessage, set, supports, updateModel
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority, toString
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.widget.InputWidget
getValue
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.widget.UIComponent
getComponent, getComponentType
 

Constructor Detail

AbstractUIInputWidget

public AbstractUIInputWidget()
Method Detail

refreshWidget

public void refreshWidget()
Description copied from interface: InputWidget
Refreshes the widget to reflect the latest model value(s).


doRefresh

protected abstract void doRefresh()
Performs the intended refreshWidget() operation.


ui

protected abstract UserInterface ui()
Returns:
The UserInterface instance associated with this InputWidget.

ui

protected UserInterface ui(String uiName)
Returns:
the UserInterface matching the provided String


Copyright © 2009–2014 SciJava. All rights reserved.