monrovia.client.ui
Class ConnectDialog

java.lang.Object
  |
  +--com.sun.kjava.Spotlet
        |
        +--monrovia.client.ui.ConnectDialog

public class ConnectDialog
extends com.sun.kjava.Spotlet

This class displays a login dialog with text fields for login name, password, IP address and port. The user enters the connect information in the dialog box and chooses either the Connect or Quit button. The information is then fetched from the dialog if the Connect button was pressed.


Fields inherited from class com.sun.kjava.Spotlet
CALCICON, KEY_HARD1, KEY_HARD2, KEY_HARD3, KEY_HARD4, KEY_POWER, MENUICON, NO_EVENT_OPTIONS, PAGEDOWN, PAGEUP, WANT_SYSTEM_KEYS
 
Constructor Summary
ConnectDialog(com.sun.kjava.DialogOwner pDialogOwner, int pX, int pY, int pW, int pH, java.lang.String pTitle, java.lang.String pAddress, java.lang.String pPort)
          Constructor which saves the default values and a handle to the dialog owner.
 
Method Summary
 java.lang.String getAddress()
          Fetch the IP address field value.
 java.lang.String getLogin()
          Fetch the login field value.
 java.lang.String getPassword()
          Fetch the password field value.
 int getPort()
          Fetch the port field value.
 void keyDown(int pKeyCode)
          This method is invoked if the user enters a character (e.g.
 void paint()
          Paint the Dialog and set the input focus to the login field.
 void penDown(int pX, int pY)
          This method is invoked if the user places the pen on the display.
 void showDialog()
          Show the Dialog: register it and paint it.
 boolean wasQuit()
          Has the user pressed the Quit button?
 
Methods inherited from class com.sun.kjava.Spotlet
beamReceive, beamSend, dispatch, getFlashID, penMove, penUp, register, setPalmEventOptions, unknownEvent, unregister
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectDialog

public ConnectDialog(com.sun.kjava.DialogOwner pDialogOwner,
                     int pX,
                     int pY,
                     int pW,
                     int pH,
                     java.lang.String pTitle,
                     java.lang.String pAddress,
                     java.lang.String pPort)
Constructor which saves the default values and a handle to the dialog owner.
Parameters:
pDialogOwner - owner of this the dialog
pX - X coordinate of the upper left corder of the dialog
pY - Y coordinate of the upper left corder of the dialog
pW - width of the dialog
pH - height of the dialog
pTitle - name of the dialog
pAddress - default IP address of the server
pPort - default port of the server
Method Detail

paint

public void paint()
Paint the Dialog and set the input focus to the login field.

getAddress

public java.lang.String getAddress()
Fetch the IP address field value.
Returns:
IP address which the user entered in the dialog

getPort

public int getPort()
Fetch the port field value.
Returns:
port value which the user entered in the dialog

getLogin

public java.lang.String getLogin()
Fetch the login field value.
Returns:
login name which the user entered in the dialog

getPassword

public java.lang.String getPassword()
Fetch the password field value.
Returns:
password string which the user entered in the dialog

wasQuit

public boolean wasQuit()
Has the user pressed the Quit button?
Returns:
true - user pressed the Quit button
false - user pressed some other button

penDown

public void penDown(int pX,
                    int pY)
This method is invoked if the user places the pen on the display. Handle the input focus of the fields and pressing of the buttons.
Overrides:
penDown in class com.sun.kjava.Spotlet
Parameters:
x - the x coordinate of the point at which the pen was placed
y - the y coordinate of the point at which the pen was placed

keyDown

public void keyDown(int pKeyCode)
This method is invoked if the user enters a character (e.g. via Graffiti). Writes the character to the field which has the focus.
Overrides:
keyDown in class com.sun.kjava.Spotlet
Parameters:
keyCode - the code of the key the user entered

showDialog

public void showDialog()
Show the Dialog: register it and paint it.