Class JDialogLargestCircle

All Implemented Interfaces:
AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogLargestCircle extends JDialogScriptableBase implements AlgorithmInterface
See Also:
  • Field Details

  • Constructor Details

    • JDialogLargestCircle

      public JDialogLargestCircle()
      Empty constructor needed for dynamic instantiation (used during scripting).
    • JDialogLargestCircle

      public JDialogLargestCircle(Frame theParentFrame, ModelImage im)
      Creates new dialog to enter parameters for LargestCircle algorithm.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
    • JDialogLargestCircle

      public JDialogLargestCircle(Frame theParentFrame, ModelImage im, Vector<Double> maxRadius, Vector<Integer> xCen, Vector<Integer> yCen)
      Creates new dialog to enter parameters for LargestCircle algorithm.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
  • Method Details

    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • setVariables

      private boolean setVariables()
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the Largest circle algorithm.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithm when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • setGUIFromParams

      protected void setGUIFromParams()
      Set up the dialog GUI based on the parameters before running the algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Store the parameters from the dialog to record the execution of this algorithm.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating one of the new parameters.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers function.