java.lang.Object | +--com.sun.kjava.Spotlet | +--com.sun.kjava.Dialog
A pop-up modal dialog that displays a title string, text box full of text, and a dismiss button.
Field Summary | |
protected Button |
button
|
protected Graphics |
g
|
protected boolean |
haveScroll
|
protected DialogOwner |
owner
|
protected TextBox |
tb
|
protected java.lang.String |
text
|
protected java.lang.String |
title
|
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 | |
Dialog(DialogOwner o,
java.lang.String t,
java.lang.String str,
java.lang.String buttonText)
Create a new Dialog of a fixed size. |
Method Summary | |
void |
dismissDialog()
Dismiss the Dialog. |
void |
keyDown(int key)
If we have a ScrollTextBox, then allow scrolling. |
void |
paint()
Paint the Dialog. |
void |
penDown(int x,
int y)
If the user pressed the dismiss button, dismiss the Dialog. |
void |
penMove(int x,
int y)
If we have a ScrollTextBox, then allow scrolling. |
void |
showDialog()
Show the Dialog: register it and paint it. |
Methods inherited from class com.sun.kjava.Spotlet |
beamReceive,
beamSend,
dispatch,
getFlashID,
penUp,
register,
setPalmEventOptions,
unknownEvent,
unregister |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Button button
protected TextBox tb
protected java.lang.String text
protected java.lang.String title
protected Graphics g
protected DialogOwner owner
protected boolean haveScroll
Constructor Detail |
public Dialog(DialogOwner o, java.lang.String t, java.lang.String str, java.lang.String buttonText)
o
- the owner of this Dialogt
- the title of this Dialog - used when the Dialog is dismissedstr
- the contents of the TextBoxbuttonText
- the label of the buttonMethod Detail |
public void paint()
public void showDialog()
public void dismissDialog()
public void penDown(int x, int y)
x
- the X coordinate of the user's press.y
- the Y coordinate of the user's press.public void penMove(int x, int y)
x
- the X coordinate of the user's press.y
- the Y coordinate of the user's press.public void keyDown(int key)
key
- the key pressed/entered by the user