|
MIDP3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DisplayListener
The DisplayListener
interface defines a series of methods that
are called in response to Display
events. Examples of
Display
events include the addition of new
Displays
and changes to the state of an existing
Display
.
A DisplayListener may be added using the
Display.addDisplayListener
method.
Method Summary | |
---|---|
void |
displayAdded(Display d)
This method is called when a new Display becomes available
for the MIDlet. |
void |
displayStateChanged(Display d,
int newState)
This method is called when the state of a Display changes. |
void |
hardwareStateChanged(Display d,
int newState)
This method is called when the state of a Display's hardware changes. |
void |
orientationChanged(Display d,
int newOrientation)
This method is called when a Display's orientation changes. |
void |
sizeChanged(Display d,
int w,
int h)
The implementation calls this method when the dimensions of a Display have been changed, i.e. |
Method Detail |
---|
void displayAdded(Display d)
Display
becomes available
for the MIDlet. A new Display
is added when the device
establishes a connection with new auxiliary display hardware. The hardwareStateChanged
method can be used to detect subsequent changes to the state of the
Display's
hardware.
d
- the new Display
that was addedvoid displayStateChanged(Display d, int newState)
Display
changes.
d
- the Display
whose state changednewState
- the new state of the Display
(STATE_BACKGROUND
,
STATE_FOREGROUND
,
or
STATE_VISIBLE
)void hardwareStateChanged(Display d, int newState)
d
- the DisplaynewState
- the new hardware state of the Display (
Display.DISPLAY_HARDWARE_ENABLED
,
Display.DISPLAY_HARDWARE_DISABLED
,
or Display.DISPLAY_HARDWARE_ABSENT
)void orientationChanged(Display d, int newOrientation)
d
- the DisplaynewOrientation
- the new orientation of the Display (
Display.ORIENTATION_PORTRAIT
,
Display.ORIENTATION_LANDSCAPE
,
Display.ORIENTATION_PORTRAIT_180
,
or
Display.ORIENTATION_LANDSCAPE_180
)void sizeChanged(Display d, int w, int h)
If the size of a Display changes while its contents are visible, sizeChanged will be called. If the size of a Display changes while its contents are not visible, calls to sizeChanged may be deferred. If the size had changed while the Display contents were not visible, sizeChanged will be called at least once at the time the contents of the Display become visible once again.
d
- the Displayw
- the new width in pixels of the available areah
- the new height in pixels of the available area
|
MIDP3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |