Class DynamicModel.SpecifierPanel

All Implemented Interfaces:
PreferencesSettable, ImageObserver, MenuContainer, Serializable, Accessible
Enclosing interface:
DynamicModel

public abstract static class DynamicModel.SpecifierPanel extends JPanel implements PreferencesSettable
A JPanel that can be used to specify dynamic model parameters.
See Also:
  • Field Details

    • modelChangedListener

      public final DynamicModel.SpecifierPanel.ModelChangedListener modelChangedListener
      The ActionListener that should be notified when the DynamicModel specified in this SpecifierPanel is changed. This ActionListener should be added to all UI items that specify the DynamicModel.
  • Method Details

    • getModel

      public abstract DynamicModel getModel(int nTimePoints, int nSlices, float dt, ReadableImage image, Logger logger) throws InvalidImageException, InvalidArgumentException
      Returns the DynamicModel that has been specified by this DynamicModel.SpecifierPanel.
      Parameters:
      nTimePoints - the number of time points to which the model will be applied.
      nSlices - the number of physical slice locations in the image to which the model will be applied.
      dt - the time interval between time points.
      image - the ReadableImage that may be needed to construct the model.
      logger - the Logger for verbose reporting and error messages.
      Returns:
      the DynamicModel that has been specified.
      Throws:
      InvalidImageException - if the supplied image cannot be used to construct the model.
      InvalidArgumentException - if the parameters set in the SpecifierPanel are invalid for the supplied image.
    • addActionListener

      public void addActionListener(ActionListener listener)
      Adds an ActionListener that is triggered whenever the model settings are changed.
      Parameters:
      listener - the ActionListener to add.
    • removeActionListener

      public void removeActionListener(ActionListener listener)
      Removes an ActionListener that is triggered whenever the model settings are changed.
      Parameters:
      listener - the ActionListener to remove.
    • setDefaults

      public void setDefaults()
      Description copied from interface: PreferencesSettable
      Set the default values.
      Specified by:
      setDefaults in interface PreferencesSettable
    • savePreferences

      public void savePreferences(Preferences prefs)
      Description copied from interface: PreferencesSettable
      Save the current settings to the user Preferences at the given node name.
      Specified by:
      savePreferences in interface PreferencesSettable
      Parameters:
      prefs - the Preferences to which the current settings will be saved.
    • showError

      public void showError(String errorMessage)
      Description copied from interface: PreferencesSettable
      Show an error message (in case the current settings are invalid).
      Specified by:
      showError in interface PreferencesSettable
      Parameters:
      errorMessage - the message to show.