com.limegroup.gnutella.gui
Class PasswordDialog

java.lang.Object
  extended bycom.limegroup.gnutella.gui.PasswordDialog

public class PasswordDialog
extends java.lang.Object

A class for accepting user's login/password


Field Summary
static int CANCELLED
          The return code for when the user cancelled the action.
static int OK
          The return code for when the user has pressed ok
 
Constructor Summary
PasswordDialog(java.lang.String title)
          Constructs the diaog with a field for username, and for password
 
Method Summary
 java.lang.String getPassword()
          Returns the text contained in the wrapped text field.
 int getReturnCode()
          Returns the return code of the input window.
 java.lang.String getUsername()
          Returns the text contained in the wrapped text field.
static void main(java.lang.String[] args)
           
 int showDialog()
          Displays the modal dialog, returning the appropriate return code to the caller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK
The return code for when the user has pressed ok

See Also:
Constant Field Values

CANCELLED

public static final int CANCELLED
The return code for when the user cancelled the action.

See Also:
Constant Field Values
Constructor Detail

PasswordDialog

public PasswordDialog(java.lang.String title)
Constructs the diaog with a field for username, and for password

Method Detail

showDialog

public int showDialog()
Displays the modal dialog, returning the appropriate return code to the caller. The return code can be one of the following: NO_TEXT_ENTERED CANCELLED TEXT_ENTERED

Returns:
the return code for the window

getUsername

public java.lang.String getUsername()
Returns the text contained in the wrapped text field.

Returns:
the text contained in the text field

getPassword

public java.lang.String getPassword()
Returns the text contained in the wrapped text field.

Returns:
the text contained in the text field

getReturnCode

public int getReturnCode()
Returns the return code of the input window.

Returns:
the return code of the input window. This can be one of:

  • OK
  • CANCELLED

main

public static void main(java.lang.String[] args)