Class ManagedSettingsPane<T>

java.lang.Object
pamViewFX.fxNodes.pamDialogFX.ManagedSettingsPane<T>
Type Parameters:
T -
Direct Known Subclasses:
ToadManagedSettingsPane

public abstract class ManagedSettingsPane<T> extends Object
Wrapper around a SettingsPane to provide simpler functionality for including panes from one part of PAMGuard in another part. With a SettingsPane, whatever uses that SettingsPane needs to have a way of putting parameters into it and using them when they come back out, which can be hard to implement if the dialog using the pane really knows nothing about it. With a ManagedSettingsPane all of the work is done within this one object, which will have to implement methods to get and store the data.
Author:
Doug Gillespie
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract T
    Get the parameters from whichever object owns them so that they can be put into the SettingsPane.
    Get parameters from the settings pane.
    abstract SettingsPane<T>
    A settings pane to incorporate into dialogs, control panels, etc.
    void
    Set parameters in the settings pane.
    abstract boolean
    useParams(T newParams)
    Called when parameters are returned by the settings pane.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManagedSettingsPane

      public ManagedSettingsPane()
  • Method Details

    • getSettingsPane

      public abstract SettingsPane<T> getSettingsPane()
      A settings pane to incorporate into dialogs, control panels, etc.
      Returns:
      the settingsPane
    • getParams

      public T getParams()
      Get parameters from the settings pane.
      Returns:
      It will return the parameters, or null, but nothing needs to happen to that object.
    • useParams

      public abstract boolean useParams(T newParams)
      Called when parameters are returned by the settings pane. Here the parameters should be put into the right location in whatever class is using them.
      This doesn't get called when the parameters returned are null
      Parameters:
      newParams - Parameters returned by the SettingsPane
      Returns:
      false if the parameters are invalid for some reason.
    • setParams

      public void setParams()
      Set parameters in the settings pane. This calls findParams() which should get the correct parameters from whichever object owns them.
    • findParams

      public abstract T findParams()
      Get the parameters from whichever object owns them so that they can be put into the SettingsPane.
      Returns:
      Parameters to put into the settings pane.