|
Palm API Beta 2 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.kjava.Spotlet
This class provides callbacks for event handling. Applications extend this class and override the relevant event handling methods. An application may use more than one Spotlet object, but at most one Spotlet can have the focus at any one time. That is, events will only trigger the callbacks of one Spotlet at any given time, the Spotlet with the current focus.
To become the focus, a Spotlet invokes the register
method
which also removes the focus from the previously registered Spotlet (if any).
Field Summary | |
static int |
CALCICON
Constant for the calculator icon. |
static int |
KEY_HARD1
Constants for the other Palm system "hard" keys. |
static int |
KEY_HARD2
|
static int |
KEY_HARD3
|
static int |
KEY_HARD4
|
static int |
KEY_POWER
|
static int |
MENUICON
Constant for the menu icon. |
static int |
NO_EVENT_OPTIONS
Constants for the eventOptions of register(). |
static int |
PAGEDOWN
|
static int |
PAGEUP
Constants for the page up/down "hard" keys. |
static int |
WANT_SYSTEM_KEYS
|
Constructor Summary | |
Spotlet()
|
Method Summary | |
void |
beamReceive(byte[] data)
This method is used for receiving packets of data via infrared from other Palm devices. |
static boolean |
beamSend(byte[] data)
This method is used for beaming data packets via infrared to another Palm device. |
void |
dispatch(int event,
java.io.DataInputStream in)
|
static java.lang.String |
getFlashID()
This method is used to get the flashID of the Palm device. |
void |
keyDown(int keyCode)
This method is invoked if the user presses either of the page up or page down hard keys, taps the calculator or menu icon, or enters a character (e.g. |
void |
penDown(int x,
int y)
This method is invoked if the user places the pen on the display. |
void |
penMove(int x,
int y)
This method is invoked if the user moves the pen over the display. |
void |
penUp(int x,
int y)
This method is invoked if the user removes the pen from the display. |
void |
register(int eventOptions)
Register the event handlers of this object. |
void |
register0(int eventOptions)
|
static void |
setPalmEventOptions(int eventOptions)
|
void |
unknownEvent(int event,
java.io.DataInputStream in)
Catchall routine |
void |
unregister()
Unregister the event handlers of this object. |
void |
unregister0()
|
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int PAGEUP
public static final int PAGEDOWN
public static final int KEY_HARD1
public static final int KEY_HARD2
public static final int KEY_HARD3
public static final int KEY_HARD4
public static final int KEY_POWER
public static final int CALCICON
public static final int MENUICON
public static final int NO_EVENT_OPTIONS
public static final int WANT_SYSTEM_KEYS
Constructor Detail |
public Spotlet()
Method Detail |
public void dispatch(int event, java.io.DataInputStream in) throws java.io.IOException
public void unknownEvent(int event, java.io.DataInputStream in)
public void register(int eventOptions)
eventOptions
- one of NO_EVENT_OPTIONS or WANT_SYSTEM_KEYSpublic static void setPalmEventOptions(int eventOptions)
public void register0(int eventOptions)
public void unregister()
register
. If this
Spotlet does not currently have the focus, this method does nothing.public void unregister0()
public void penDown(int x, int y)
x
- the x coordinate of the point at which the pen was placedy
- the y coordinate of the point at which the pen was placedpublic void penUp(int x, int y)
x
- the x coordinate of the point from which the pen was removedy
- the y coordinate of the point from which the pen was removedpublic void penMove(int x, int y)
x
- the x coordinate of the destination point of the movey
- the y coordinate of the destination point of the movepublic void keyDown(int keyCode)
keyCode
- the code of the key the user enteredpublic void beamReceive(byte[] data)
public static boolean beamSend(byte[] data)
public static java.lang.String getFlashID()
|
Submit a bug or feature The GUI classes provided with this release are NOT part of CLDC, and they will be removed in later releases of this software. Official GUI classes for Java 2 Micro Edition will be defined separately through the Java Community Process and included in J2ME profiles. Java is trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |