Class JDialogServer

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

public class JDialogServer extends JDialogBase
Simple dialog to set certain values for the new or edited server or destination.
Version:
1.0 July 1, 1999
Author:
Neva Cherniavsky
See Also:
  • Field Details

    • serialVersionUID

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

      private String alias
      DOCUMENT ME!
    • aliasField

      private JTextField aliasField
      DOCUMENT ME!
    • aliasLabel

      private JLabel aliasLabel
      DOCUMENT ME!
    • ip

      private String ip
      DOCUMENT ME!
    • ipField

      private JTextField ipField
      DOCUMENT ME!
    • ipLabel

      private JLabel ipLabel
      DOCUMENT ME!
    • port

      private String port
      DOCUMENT ME!
    • portField

      private JTextField portField
      DOCUMENT ME!
    • portLabel

      private JLabel portLabel
      DOCUMENT ME!
    • server

      private boolean server
      DOCUMENT ME!
    • title

      private String title
      DOCUMENT ME!
    • titleField

      private JTextField titleField
      DOCUMENT ME!
    • titleLabel

      private JLabel titleLabel
      DOCUMENT ME!
  • Constructor Details

    • JDialogServer

      public JDialogServer(JFrame theParentFrame, String title, boolean server)
      Creates new dialog for setting server.
      Parameters:
      theParentFrame - parent frame
      title - title of dialog frame
      server - flag indicating if this is server or storage
    • JDialogServer

      public JDialogServer(JFrame theParentFrame, String title, String[] values, boolean server)
      Creates new dialog for setting server.
      Parameters:
      theParentFrame - parent frame
      title - title of dialog frame
      values - values of the text fields
      server - flag indicating if this is server or storage
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      If the user hits the "OK" button, checks to make sure he or she entered valid data. Then sets the values to the ones that the user entered. If the user hits the "Cancel" button, disposes of dialog.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      e - Event that triggered this method.
    • getValues

      public String[] getValues()
      Returns the values entered into the text fields.
      Returns:
      An array of the values.
    • buildContentPane

      private void buildContentPane(boolean server)
      Builds the content pane for the dialog, making the text fields and labels.
      Parameters:
      server - Flag indicating if this is server or storage
    • buildLabel

      private JLabel buildLabel(String s)
      Build the label for the textField, try to standardize the label appearance in the GUI.
      Parameters:
      s - The name of the label
      Returns:
      The constructed label.
    • setValues

      private void setValues(String[] values)
      Sets the current values in the text fields to the values in the array.
      Parameters:
      values - The array of current values