Class JDialogPolygonToCircle

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

public class JDialogPolygonToCircle extends JDialogBase implements AlgorithmInterface, ItemListener, WindowListener
Dialog to get user input of 3 or more counterclockwise ordered polygon points for polygon to circle conformal mapping.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • POLYGON_TO_CIRCLE

      private final int POLYGON_TO_CIRCLE
      See Also:
    • CROSSRATIO_POLYGON_TO_CIRCLE

      private final int CROSSRATIO_POLYGON_TO_CIRCLE
      See Also:
    • POLYGON_EXTERIOR_TO_CIRCLE

      private final int POLYGON_EXTERIOR_TO_CIRCLE
      See Also:
    • algorithm

      private int algorithm
    • extents

      int[] extents
      DOCUMENT ME!
    • sAlgo

      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • xSource

      private double[] xSource
      DOCUMENT ME!
    • xText

      private JTextField xText
      DOCUMENT ME!
    • ySource

      private double[] ySource
      DOCUMENT ME!
    • exteriorCheckBox

      private JCheckBox exteriorCheckBox
    • crossRatioCheckBox

      private JCheckBox crossRatioCheckBox
    • setCenterCheckBox

      private JCheckBox setCenterCheckBox
    • setCenter

      private boolean setCenter
    • xCenter

      private double xCenter
    • yCenter

      private double yCenter
    • xCenterLabel

      private JLabel xCenterLabel
    • yCenterLabel

      private JLabel yCenterLabel
    • xCenterText

      private JTextField xCenterText
    • yCenterText

      private JTextField yCenterText
  • Constructor Details

    • JDialogPolygonToCircle

      public JDialogPolygonToCircle(ModelImage image)
      Creates a new JDialogPolygonToCircle object.
      Parameters:
      image - DOCUMENT ME!
    • JDialogPolygonToCircle

      public JDialogPolygonToCircle(Frame theParentFrame, ModelImage im)
      Creates new dialog.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
  • Method Details

    • 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.
    • 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.
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      itemStateChanged.
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • windowClosing

      public void windowClosing(WindowEvent event)
      Disposes of error dialog, then frame. Sets cancelled to true.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • callAlgorithm

      private void callAlgorithm()
      DOCUMENT ME!
    • init

      private void init()
      Initializes GUI components and displays dialog.
    • setVariables

      private boolean setVariables()
      Use the GUI results to set up the variables needed to run the algorithm.
      Returns:
      true if parameters set successfully, false otherwise.