Class JDialogSimpleText

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

public class JDialogSimpleText extends JDialogBase
Simple dialog that requests a name for the view.
Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

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

      JTextField field
      Text field to enter name in.
    • name

      String name
      Name for the view.
  • Constructor Details

    • JDialogSimpleText

      public JDialogSimpleText(JPanelRendererJ3D dialog, RenderViewBase parent)
      Creates the dialog, using the input parameters to place it on the screen.
      Parameters:
      dialog - Parent dialog that created this.
      parent - Parent frame.
    • JDialogSimpleText

      public JDialogSimpleText(JPanelMouse dialog, RenderViewBase parent)
      Creates the dialog, using the input parameters to place it on the screen.
      Parameters:
      dialog - Parent dialog that created this.
      parent - Parent frame.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      On "OK", sets the name variable to the text entered. On "Cancel" disposes of this dialog and sets cancel flag.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggered this method.
    • getName

      public String getName()
      Accessor that returns the name entered in this dialog.
      Overrides:
      getName in class Component
      Returns:
      The name the user entered.