com.ibm.tspaces.ac.adminapp
Class LoginDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--com.ibm.tspaces.ac.adminapp.LoginDialog

public class LoginDialog
extends javax.swing.JDialog

This class implements a a dialog panel that will request a a TSpaces server and the userid and password This was originally a 1.1 AWT dialog and has been converted directly to use JFC. No attempt has been made to take advantage of the JFC facilities.

Author:
John Thomas
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Field Summary
protected  boolean _OK
          This will get set to "true" if the user presses OK otherwise it will remain false.
protected  javax.swing.JPanel outerPanel
          Outer Panel inside dialog box
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
LoginDialog(java.awt.Frame parent)
          Constructor for LoginDialog The parent Frame object must be specified
 
Method Summary
 java.lang.String getHost()
          return the user input after OK is pressed If the user specified host:port than the port has already been striped
 java.lang.String getPassword()
          return the user input after OK is pressed
 int getPort()
          return the user input after OK is pressed the Port number is specifed as part of the Host as in "ibm.com:2800"
 java.lang.String getUser()
          return the user input after OK is pressed
 boolean isOK()
          Dialog ending status.
static void main(java.lang.String[] args)
          A main method that demonstrates how to use this class, and allows testing
 void setHost(java.lang.String value)
          This will set the Default values
 void setLoginDefaults(java.lang.String host, java.lang.String user, java.lang.String password)
          This will set the Default values in one call
 void setPassword(java.lang.String value)
          This will set the Default values
 void setUser(java.lang.String value)
          This will set the Default values
 void setVisible(boolean visible)
          setVisible overrides the setVisible for the parent dialog box so it can format the dialog box and then call the parent setVisible.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_OK

protected boolean _OK
This will get set to "true" if the user presses OK otherwise it will remain false.

outerPanel

protected javax.swing.JPanel outerPanel
Outer Panel inside dialog box
Constructor Detail

LoginDialog

public LoginDialog(java.awt.Frame parent)
Constructor for LoginDialog The parent Frame object must be specified
Method Detail

setVisible

public void setVisible(boolean visible)
setVisible overrides the setVisible for the parent dialog box so it can format the dialog box and then call the parent setVisible.
Overrides:
setVisible in class java.awt.Component
Parameters:
visible - Watch carefully

setLoginDefaults

public void setLoginDefaults(java.lang.String host,
                             java.lang.String user,
                             java.lang.String password)
This will set the Default values in one call

setHost

public void setHost(java.lang.String value)
This will set the Default values

setUser

public void setUser(java.lang.String value)
This will set the Default values

setPassword

public void setPassword(java.lang.String value)
This will set the Default values

isOK

public boolean isOK()
Dialog ending status.
Returns:
true if user clicked OK, false otherwise

getHost

public java.lang.String getHost()
return the user input after OK is pressed If the user specified host:port than the port has already been striped
Returns:
TSpaces Host name

getPort

public int getPort()
return the user input after OK is pressed the Port number is specifed as part of the Host as in "ibm.com:2800"
Returns:
integer Port number for the TSpaces server

getUser

public java.lang.String getUser()
return the user input after OK is pressed

getPassword

public java.lang.String getPassword()
return the user input after OK is pressed

main

public static void main(java.lang.String[] args)
A main method that demonstrates how to use this class, and allows testing