Class AbstractSetupPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Comparable<AbstractSetupPanel>, Accessible
Direct Known Subclasses:
SetupPanel, SimpleSetupPanel

public abstract class AbstractSetupPanel extends JPanel implements Comparable<AbstractSetupPanel>
Ancestor for setup panels for experiments.
Version:
$Revision$
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Constructor Details

    • AbstractSetupPanel

      public AbstractSetupPanel()
  • Method Details

    • getName

      public abstract String getName()
      Returns the name of the panel.
      Overrides:
      getName in class Component
      Returns:
      the name
    • setModePanel

      public abstract void setModePanel(SetupModePanel modePanel)
      Sets the panel used to switch between simple and advanced modes.
      Parameters:
      modePanel - the panel
    • setExperiment

      public abstract boolean setExperiment(Experiment exp)
      Sets the experiment to configure.
      Parameters:
      exp - a value of type 'Experiment'
      Returns:
      true if experiment could be configured, false otherwise
    • getExperiment

      public abstract Experiment getExperiment()
      Gets the currently configured experiment.
      Returns:
      the currently configured experiment.
    • cleanUpAfterSwitch

      public void cleanUpAfterSwitch()
      Hook method for cleaning up the interface after a switch.
      Default implementation does nothing.
    • addPropertyChangeListener

      public abstract void addPropertyChangeListener(PropertyChangeListener l)
      Adds a PropertyChangeListener who will be notified of value changes.
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      l - a value of type 'PropertyChangeListener'
    • removePropertyChangeListener

      public abstract void removePropertyChangeListener(PropertyChangeListener l)
      Removes a PropertyChangeListener.
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      l - a value of type 'PropertyChangeListener'
    • compareTo

      public int compareTo(AbstractSetupPanel o)
      Uses the name for comparison.
      Specified by:
      compareTo in interface Comparable<AbstractSetupPanel>
      Parameters:
      o - the other panel
      Returns:
      <0 , 0, >0 if name is less than, equal or greater than this one
      See Also:
    • toString

      public String toString()
      Just returns the name of the panel.
      Overrides:
      toString in class Component
      Returns:
      the name
    • getPanels

      public static AbstractSetupPanel[] getPanels()
      Returns a list of all available setup panels.
      Returns:
      the available panels
    • terminate

      public abstract void terminate()
      Terminates this panel. To be implemented by actual concrete classes.