Package hec.gui

Class NameDialog

All Implemented Interfaces:
ActionListener, ComponentListener, FocusListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, Modifiable
Direct Known Subclasses:
NameDialog

public class NameDialog extends RmaJDialog implements ActionListener, FocusListener
See Also:
  • Field Details

  • Constructor Details

    • NameDialog

      public NameDialog(Frame parent, boolean modal)
    • NameDialog

      public NameDialog(Dialog parent, boolean modal)
    • NameDialog

      public NameDialog(Dialog parent, String title, boolean modal)
    • NameDialog

      public NameDialog(Dialog parent, String title, boolean modal, int optionalControls)
    • NameDialog

      public NameDialog(Frame parent, String title, boolean modal)
    • NameDialog

      public NameDialog(Frame parent, String title, boolean modal, int optionalControls)
    • NameDialog

      public NameDialog(Frame parent)
    • NameDialog

      public NameDialog(Dialog parent)
  • Method Details

    • createControls

      protected void createControls()
    • createControls

      protected void createControls(int optionalControls)
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Intercepts all action messages and routes them to the correct handler
      Specified by:
      actionPerformed in interface ActionListener
    • addAuxilaryPanel

      public void addAuxilaryPanel(JPanel panel)
      Inserts a panel below the description text area. This method can be called as many times as necessary to insert as many panels as needed.
    • addAuxilaryPanel

      public void addAuxilaryPanel(JPanel panel, double yweight, int fill)
      Inserts a panel below the description text area. This method can be called as many times as necessary to insert as many panels as needed.
      Parameters:
      panel -
      yweight - GridBagContraints yweight value
      fill - GridBagContraints fill value
    • cmdOk_Action

      protected void cmdOk_Action(ActionEvent event)
      Handles the event generated by the OK button
    • isValidData

      protected boolean isValidData()
    • setNameLabel

      public void setNameLabel(String name)
      Sets the Name Label for the Dialog
    • isCanceled

      public boolean isCanceled()
      Returns true if the dialog was close via the cancel button
    • getLabel

      public String getLabel()
      Returns the value in the label text box
    • getName

      public String getName()
      Returns the value in the Name text box
      Overrides:
      getName in class Component
    • setName

      public void setName(String txt)
      Overrides:
      setName in class Component
    • setShowWarningForEmptyName

      public void setShowWarningForEmptyName(boolean set)
      When set to True a warning dialog will appear if the Name field is left blank
      Parameters:
      set - - if true warning message on empty name field
    • getDescription

      public String getDescription()
      Returns the value in the description text box
    • setDescription

      public void setDescription(String txt)
    • setDescriptionLablel

      public void setDescriptionLablel(String txt)
    • setMode

      public void setMode(String mode)
      Sets the operating mode of the dialog
    • updateDialog

      public void updateDialog()
      Updates the dialog depending on the mode
    • focusGained

      public void focusGained(FocusEvent e)
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      Specified by:
      focusLost in interface FocusListener
    • enterPressed

      public void enterPressed()
    • setAccessoryPanel

      public void setAccessoryPanel(JPanel panel)
    • main

      public static void main(String[] args)
    • setExistingNames

      public void setExistingNames(List existingNames)
    • setExistingNames

      public void setExistingNames(String[] names)
    • setNameFieldDocument

      public void setNameFieldDocument(Document d)
    • setDescriptionVisible

      public void setDescriptionVisible(boolean visible)