monrovia.client.ui
Class SayDialog
java.lang.Object
|
+--com.sun.kjava.Spotlet
|
+--monrovia.client.ui.SayDialog
- public class SayDialog
- extends com.sun.kjava.Spotlet
This class handles the modal dialog where the user can write a message
which is "said" to all of the characters in the screen. The class
extends the Spotlet class and creates a new modal dialog. The dialog
includes a text field for the phrase to be said and an "Ok"-button.
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 |
SayDialog(com.sun.kjava.DialogOwner pDialogOwner,
MenuCommand pCommand)
Constructor which save the coordinates and a handle to the dialog owner. |
Method Summary |
void |
close()
Close the window. |
MenuCommand |
getCommand()
Return the MenuCommand object in this dialog. |
java.lang.String |
getText()
Return the text which was written last time to the text field. |
void |
keyDown(int pKeyCode)
User has pressed a button. |
void |
paint()
Paint the Dialog and set the input focus to the text field. |
void |
penDown(int pX,
int pY)
Indicate that the pen has gone down at (pX, pY). |
void |
showDialog()
Show the Dialog: register it and paint it. |
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 |
SayDialog
public SayDialog(com.sun.kjava.DialogOwner pDialogOwner,
MenuCommand pCommand)
- Constructor which save the coordinates and a handle to the dialog owner.
- Parameters:
pDialogOwner
- the DialogOwner object of this dialogpCommand
- MenuCommand object which requires some string
argument to be asked by this dialog
paint
public void paint()
- Paint the Dialog and set the input focus to the text field.
penDown
public void penDown(int pX,
int pY)
- Indicate that the pen has gone down at (pX, pY).
- Overrides:
penDown
in class com.sun.kjava.Spotlet
- Parameters:
pX
- the X coordinate of the user's press.pY
- the Y coordinate of the user's press.
keyDown
public void keyDown(int pKeyCode)
- User has pressed a button. Write text to the text field.
- Overrides:
keyDown
in class com.sun.kjava.Spotlet
- Parameters:
pKeyCode
- a key which was pressed
getText
public java.lang.String getText()
- Return the text which was written last time to the text field.
- Returns:
- text in the text field
showDialog
public void showDialog()
- Show the Dialog: register it and paint it.
getCommand
public MenuCommand getCommand()
- Return the MenuCommand object in this dialog.
- Returns:
- MenuCommand object
close
public void close()
- Close the window. Actually just unfocus it. Repaint the screen
elsewhere.