Class JDialogLivewire

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

public class JDialogLivewire extends JDialogBase
Simple dialog to choose which cost function to use for the live wire.
Version:
1.0
Author:
Neva Cherniavsky
See Also:
  • Field Details

    • serialVersionUID

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

      private JRadioButton radioGradient
      Radio button for Gradient magnitude and direction
    • radioIntensity

      private JRadioButton radioIntensity
      Radio button for Intensity
    • radioMedial

      private JRadioButton radioMedial
      Radio button for Laplacian medialness
    • radioGradientMed

      private JRadioButton radioGradientMed
      Radio button for Gradient and Medialness
    • radioGradientInt

      private JRadioButton radioGradientInt
      Radio button for Gradient and Intensity
    • radioGradientAll

      private JRadioButton radioGradientAll
      Radio button for Gradient, Medialness and Intensity
    • selection

      private int selection
      DOCUMENT ME!
  • Constructor Details

    • JDialogLivewire

      public JDialogLivewire(Frame parent)
      Creates dialog for choosing cost function for live wire. Note: When user hits "Enter" keystroke, it is same as if user clicked "OK" This code was already in the super constructor, but was not working I brought it over to this constructor...but what made it work was by moving the setVisible(true) from the end of the init() to the end of the constructor...weird.
      Parameters:
      parent - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Sets the selection based on which radio button is selected. If dialog is cancelled, sets the cancelFlag to true.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      e - Event that triggered function.
    • getSelection

      public int getSelection()
      Accessor that returns the selected cost function.
      Returns:
      Cost function selection.
    • init

      private void init()
      Initialized GUI components and displays dialog.