|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.ScrollView
net.rim.device.api.ui.Manager
net.rim.device.api.ui.container.AbsoluteFieldManager
net.rim.device.api.ui.extension.container.EyelidFieldManager
public class EyelidFieldManager
A manager that allows fields to be placed in two eyelids that slide onto the
screen on demand. This eye blink displays fields along the top and bottom of
the screen for a short period of time (the default is 1.2 seconds) before
they are pulled out in an un-blinking animation. Any user input
(trackball/keyboard/touch-screen/tilt) will cause the eyelids to close for a
short time period as defined by EyelidFieldManager.setEyelidDisplayTime(int).
There are top and bottom eyelids which both contain a
VerticalFieldManager to which Fields can be added using
the EyelidFieldManager.addTop(Field) and EyelidFieldManager.addBottom(Field) methods.
Fields can also be added to absolute positions using
EyelidFieldManager.add(Field, int, int). Note that the fields placed in absolute
positions will not be pulled from the screen when the eyelids open.
| Field Summary |
|---|
| Fields inherited from class net.rim.device.api.ui.Manager |
|---|
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK |
| Constructor Summary | ||
|---|---|---|
EyelidFieldManager()
Constructs a new EyelidFieldManager. |
||
| Method Summary | ||
|---|---|---|
void |
add(Field field)
Adds a field to the bottom eyelid. |
|
void |
addBottom(Field field)
Adds a field to the bottom eyelid. |
|
void |
addTop(Field field)
Adds a field to the top eyelid. |
|
VerticalFieldManager |
getBottomEyelid()
Gets the bottom eyelid. |
|
VerticalFieldManager |
getTopEyelid()
Gets the top eyelid. |
|
protected boolean |
keyChar(char key,
int status,
int time)
Displays the eyelids before delegating the key event to the focused field. |
|
protected boolean |
navigationClick(int status,
int time)
Displays the eyelids before delegating the click event to the focused field. |
|
protected boolean |
navigationMovement(int dx,
int dy,
int status,
int time)
Displays the eyelids before delegating the move event to the focused field. |
|
protected void |
onVisibilityChange(boolean visible)
This method is called when the field's visibility changes. |
|
protected void |
paint(Graphics graphics)
Invoked by the framework to redraw a portion of this field. |
|
void |
setBottomBackground(Background bg)
Sets the background on the bottom eyelid. |
|
void |
setEyelidDisplayTime(int millis)
Sets the length of time the eyelids will remain visible. |
|
void |
setEyelidsVisible(boolean visible)
Any user input (trackball/keyboard/touch-screen) will "blink" the fields back onto the screen for a short time period as defined by EyelidFieldManager.setEyelidDisplayTime(int) - you do NOT need to explicitly call
this method, the delegation of user events by mangers to their fields is
used to implicitly call this under normal operation. |
|
void |
setTopBackground(Background bg)
Sets the background on the top eyelid. |
|
void |
showOnInput(boolean enabled)
Sets whether or not the eyelids will appear in response to user input. |
|
protected void |
sublayout(int width,
int height)
Implements custom layout features for this manager. |
|
protected boolean |
touchEvent(TouchEvent message)
Displays the eyelids before delegating the touch event to the focused field. |
|
| Methods inherited from class net.rim.device.api.ui.container.AbsoluteFieldManager |
|---|
add, getPreferredHeight, getPreferredWidth, nextFocus, setPosChild |
| Methods inherited from class net.rim.device.api.ui.ScrollView |
|---|
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onUndisplay, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EyelidFieldManager()
| Method Detail |
|---|
public void addTop(Field field)
Manager.add(net.rim.device.api.ui.Field) on this manager's
top eyelid manager, prompting it to add the field.
field - The field to add.
NullPointerException - If field is null.
IllegalStateException - If the field has already been added to a manager.
IllegalArgumentException - If the field is being added to itself.public void addBottom(Field field)
Manager.add(net.rim.device.api.ui.Field) on this manager's
bottom eyelid manager, prompting it to add the field.
field - The field to add.
NullPointerException - If field is null.
IllegalStateException - If the field has already been added to a manager.
IllegalArgumentException - If the field is being added to itself.public void add(Field field)
Manager.add(net.rim.device.api.ui.Field) on this manager's
bottom eyelid manager, prompting it to add the field. This is the
equivalent of calling addBottom(Field).
add in class Managerfield - The field to add.
NullPointerException - If field is null.
IllegalStateException - If the field has already been added to a manager.
IllegalArgumentException - If the field is being added to itself.EyelidFieldManager.addBottom(Field)
protected void sublayout(int width,
int height)
sublayout in class AbsoluteFieldManagerwidth - Width available for this manager.height - Height available for this manager.Manager.sublayout(int, int)public void setEyelidsVisible(boolean visible)
EyelidFieldManager.setEyelidDisplayTime(int) - you do NOT need to explicitly call
this method, the delegation of user events by mangers to their fields is
used to implicitly call this under normal operation. This method is
exposed (public) only to accommodate any special cases that may arise.
You can change this behavior by calling EyelidFieldManager.showOnInput(boolean).
public void setEyelidDisplayTime(int millis)
setEyelidsVisible(false).
millis - the duration in milliseconds
IllegalArgumentException - if millis < 0.EyelidFieldManager.setEyelidsVisible(boolean)protected void paint(Graphics graphics)
paint in class Managergraphics - Graphics context for drawing this field.Field.paint(Graphics)
protected boolean keyChar(char key,
int status,
int time)
keyChar in class Managerkey - Character generated.status - Modifier key status.time - Number of milliseconds since the device was turned on.
Manager.keyChar(char, int, int)
protected boolean navigationClick(int status,
int time)
navigationClick in class Managerstatus - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
Manager.navigationClick(int, int)
protected boolean navigationMovement(int dx,
int dy,
int status,
int time)
navigationMovement in class Managerdx - Magnitude of navigational motion: negative for a move left
and postive for a move right.dy - Magnitude of navigational motion: negative for an upwards
move, and positive for a downwards move.status - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
Manager.navigationMovement(int, int, int, int)protected boolean touchEvent(TouchEvent message)
touchEvent in class Managermessage - TouchEvent object containing various input parameters
including the event type and touch coordinates.
Manager.touchEvent(TouchEvent)protected void onVisibilityChange(boolean visible)
onVisibilityChange in class Fieldvisible - True if the field has just become visible; otherwise, false.Screen.onDisplay(),
Screen.onExposed(),
Screen.onObscured(),
Screen.onUiEngineAttached(boolean)public void setBottomBackground(Background bg)
SolidTransparentBackground with a 150 alpha
value. Setting the background to null will reset it back to the default
background.
bg - the background to use for the bottom eyelid, null to use
default background.public void setTopBackground(Background bg)
SolidTransparentBackground with a 150 alpha
value. Setting the background to null will reset it back to the default
background.
bg - the background to use for the top eyelid, null to use default
background.public void showOnInput(boolean enabled)
show - if true, the eyelids will appear, if false, the eyelids will
not appear.EyelidFieldManager.setEyelidsVisible(boolean)public VerticalFieldManager getBottomEyelid()
public VerticalFieldManager getTopEyelid()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.