| java.lang.Object javax.microedition.lcdui.DisplayableLFImpl javax.microedition.lcdui.FormLFImpl
Field Summary | |
final static int | FULL_LAYOUT Do a full layout. | final static int | LAYOUT_HMASK A bit mask to capture the horizontal layout directive of an item. | final static int | LAYOUT_VMASK A bit mask to capture the vertical layout directive of an item. | final static int | PIXELS_LEFT_ON_PAGE | final static int | UPDATE_LAYOUT Only update layout. | boolean | itemTraverse | boolean | itemsModified A flag that shows that itemLFs[] storage has been modified
(items inserted/deleted) and earlier made copies (extends itemsCopy[])
are outdated. | ItemLFImpl | lastTraverseItem This is a special case variable which tracks the last
traversed item when a new item is traversed to via the
setCurrentItem() call. | final static boolean | ltr Left to right layout is default. | Item | pendingCurrentItem Item that was made visible using display.setCurrentItem() call
while FormLF was in HIDDEN or FROZEN state. | boolean | resetToTop Screens should automatically reset to the top of the when
they are shown, except in cases where it is interrupted by
a system menu or an off-screen editor - in which case it
should be reshown exactly as it was. | int | traverseIndex | int | viewable Overall dimensions of the view. | int[] | visRect When a Form calls an Item's traverse() method, it passes in
an in-out int[] that represents the Item's traversal
bounds. |
Constructor Summary | |
| FormLFImpl(Form form, Item items, int numOfItems) Creates FormLF associated with passed in form. | | FormLFImpl(Screen screen, Item item) Creates FormLF for the passed in screen. |
Method Summary | |
void | createNativeResource() Create native resource for this Form . | ItemLFImpl | getItemInFocus() Service method - returns the ItemLFImpl that has focus. | int | getNextInteractiveItem(ItemLFImpl[] items, int dir, int index) This method will return the index of the next interactive
item which is wholly visible on the screen given the traversal
direction, or -1 if no visible items in that traversal direction
are interactive (or completely visible). | native int | getScrollPosition0() Current Y position in a scrollable form. | boolean | itemCompletelyVisible(ItemLFImpl item) Determine if the given item is at completely visible
in the current viewport. | boolean | itemPartiallyVisible(ItemLFImpl item) Determine if the given item is at least partially visible
in the current viewport. | public void | lDelete(int itemNum, Item deleteditem) Notifies look&feel object of an item deleted in the corresponding
Form . | public void | lDeleteAll() Notifies look&feel object that all items are deleted in
the corresponding Form . | public Item | lGetCurrentItem() Gets item currently in focus. | public int | lGetHeight() Returns the height in pixels of the displayable area available
for items. | public int | lGetWidth() Returns the width in pixels of the displayable area available for
items. | public void | lInsert(int itemNum, Item item) Notifies look&feel object of an item inserted in the corresponding
Form . | void | lRequestPaintItem(Item item, int x, int y, int w, int h) Paint an Item contained in this Screen . | public void | lSet(int itemNum, Item item) Notifies look&feel object of an item set in the corresponding
Form . | boolean | scrollForBounds(int dir, int bounds) Determine if scrolling is needed for a given bounding box,
and perform such scrolling if necessary. | native void | setCurrentItem0(int nativeId, int itemId, int yOffset) Scroll to show an Item and give focus to it if possible. | native void | setScrollPosition0(int pos) Set Y position in a scrollable form. | public void | uCallFreeze() Notify this Form that it is being frozen. | public void | uCallHide() Notify this Form that it is being hidden. | public void | uCallInvalidate() | void | uCallItemHide() | boolean | uCallItemTraverse(ItemLFImpl item, int dir) Perform an internal traversal on the given item in
the given direction. | void | uCallKeyPressed(int keyCode) Handle a key press. | void | uCallKeyReleased(int keyCode) Handle a key release event. | void | uCallKeyRepeated(int keyCode) Handle a key repeat. | public void | uCallPaint(Graphics g, Object target) Paint the contents of this Form . | public void | uCallPeerStateChanged(int modelVersion, int peerId, int hint) Called by Display to notify an ItemLF
in current FormLF of a change in its peer state. | void | uCallPointerDragged(int x, int y) Handle a pointer dragged event. | void | uCallPointerPressed(int x, int y) Handle a pointer pressed event. | void | uCallPointerReleased(int x, int y) Handle a pointer released event. | public void | uCallShow() Notify this Form that it is being shown. | void | uInitItemsInViewport(int dir, ItemLFImpl[] itemsCopy, int traverseIndexCopy) Initialize the current page of items, perform a traverse if possible.
This method is always called when a page is initially "shown".
This occurs when the form gains visibility for the very first
time as well as after every page up/page down occurs.
This method searches for the most appropriate item on the form
to receive the interaction focus.
Parameters: dir - the direction of travel. | public boolean | uIsScrollNative() This method is used in repaint, in order to determine the translation
of the draw coordinates. | public void | uItemMakeVisible(Item i) Set the current traversal location to the given Item .
This call has no effect if the given Item is the
current traversal item, or if the given Item is not
part of this Form . | void | uPaintItem(ItemLFImpl itemLF, Graphics g) Paint an item. | void | uScrollViewport(int dir, ItemLFImpl[] items) Perform a page flip in the given direction. | public boolean | uSetRotatedStatus(boolean newStatus) | void | uTraverse(int dir) Perform a traversal. |
FULL_LAYOUT | final static int FULL_LAYOUT(Code) | | Do a full layout.
|
LAYOUT_HMASK | final static int LAYOUT_HMASK(Code) | | A bit mask to capture the horizontal layout directive of an item.
|
LAYOUT_VMASK | final static int LAYOUT_VMASK(Code) | | A bit mask to capture the vertical layout directive of an item.
|
PIXELS_LEFT_ON_PAGE | final static int PIXELS_LEFT_ON_PAGE(Code) | | This is the number of pixels left from the previous "page"
when a page up or down occurs
|
UPDATE_LAYOUT | final static int UPDATE_LAYOUT(Code) | | Only update layout.
|
itemTraverse | boolean itemTraverse(Code) | | A flag indicating the return value of the currently
selected Item from its traverse() method
|
itemsModified | boolean itemsModified(Code) | | A flag that shows that itemLFs[] storage has been modified
(items inserted/deleted) and earlier made copies (extends itemsCopy[])
are outdated.
flag is set by item insert/delete operations,
cleared when copy operation is performed.
|
lastTraverseItem | ItemLFImpl lastTraverseItem(Code) | | This is a special case variable which tracks the last
traversed item when a new item is traversed to via the
setCurrentItem() call.
|
ltr | final static boolean ltr(Code) | | Left to right layout is default.
Used by isImplicitLineBreak.
|
pendingCurrentItem | Item pendingCurrentItem(Code) | | Item that was made visible using display.setCurrentItem() call
while FormLF was in HIDDEN or FROZEN state.
|
resetToTop | boolean resetToTop(Code) | | Screens should automatically reset to the top of the when
they are shown, except in cases where it is interrupted by
a system menu or an off-screen editor - in which case it
should be reshown exactly as it was.
|
traverseIndex | int traverseIndex(Code) | | The item index which has the traversal focus
|
viewable | int viewable(Code) | | Overall dimensions of the view. It is an array so it could be passed
as a reference to LayoutManager .
|
visRect | int[] visRect(Code) | | When a Form calls an Item's traverse() method, it passes in
an in-out int[] that represents the Item's traversal
bounds. This gets cached in the visRect variable
|
FormLFImpl | FormLFImpl(Form form, Item items, int numOfItems)(Code) | | Creates FormLF associated with passed in form.
FormLFImpl maintains an array of views associated
with its items.
Parameters: form - the Form object associated with thisFormLF Parameters: items - the array of Items using which the passed inForm was created Parameters: numOfItems - current number of elements |
FormLFImpl | FormLFImpl(Screen screen, Item item)(Code) | | Creates FormLF for the passed in screen.
Passed in ItemLF is added as the only itemLF present.
This constructor is used by List and TextBox .
Parameters: screen - the Screen object associated with thisFormLFImpl Parameters: item - the Item to be added to this screen |
createNativeResource | void createNativeResource()(Code) | | Create native resource for this Form .
Item s' resources are not created here.
|
getItemInFocus | ItemLFImpl getItemInFocus()(Code) | | Service method - returns the ItemLFImpl that has focus.
the current ItemLFImpl , or null if there is no current. |
getNextInteractiveItem | int getNextInteractiveItem(ItemLFImpl[] items, int dir, int index)(Code) | | This method will return the index of the next interactive
item which is wholly visible on the screen given the traversal
direction, or -1 if no visible items in that traversal direction
are interactive (or completely visible).
Parameters: items - the set of items to search Parameters: dir - the direction of traversal Parameters: index - the "anchor" of the index to start from the index of the next interactive item, or -1 if one isnot completely visible or available in the given direction |
getScrollPosition0 | native int getScrollPosition0()(Code) | | Current Y position in a scrollable form.
current scroll Y position |
itemCompletelyVisible | boolean itemCompletelyVisible(ItemLFImpl item)(Code) | | Determine if the given item is at completely visible
in the current viewport.
Parameters: item - the item to determine visibility true if at the item is entirely visible |
itemPartiallyVisible | boolean itemPartiallyVisible(ItemLFImpl item)(Code) | | Determine if the given item is at least partially visible
in the current viewport.
Parameters: item - the item to determine visibility true if at least part of the item is visible |
lDelete | public void lDelete(int itemNum, Item deleteditem)(Code) | | Notifies look&feel object of an item deleted in the corresponding
Form .
Parameters: itemNum - the index of the deleted item Parameters: deleteditem - the item deleted in the corresponding form |
lDeleteAll | public void lDeleteAll()(Code) | | Notifies look&feel object that all items are deleted in
the corresponding Form .
|
lGetCurrentItem | public Item lGetCurrentItem()(Code) | | Gets item currently in focus.
the item currently in focus in this form;if there are no items in focus, null is returned |
lGetHeight | public int lGetHeight()(Code) | | Returns the height in pixels of the displayable area available
for items.
This value is the height of the form that can be displayed without
scrolling.
The value may depend on how the device uses the screen and may be
affected by the presence or absence of the ticker, title,
or commands.
the height of the displayable area of theForm in pixels |
lGetWidth | public int lGetWidth()(Code) | | Returns the width in pixels of the displayable area available for
items.
The value may depend on how the device uses the screen and may be
affected by the presence or absence of the ticker, title,
or commands.
The Item s of the Form are
laid out to fit within this width.
the width of the Form in pixels |
lInsert | public void lInsert(int itemNum, Item item)(Code) | | Notifies look&feel object of an item inserted in the corresponding
Form .
Parameters: itemNum - the index of the inserted item Parameters: item - the item inserted in the corresponding Form |
lRequestPaintItem | void lRequestPaintItem(Item item, int x, int y, int w, int h)(Code) | | Paint an Item contained in this Screen .
The Item requests a paint in its own coordinate space.
Screen translates those coordinates into the overall
coordinate space and schedules the repaint
Parameters: item - the Item requesting the repaint Parameters: x - the x-coordinate of the origin of the dirty region Parameters: y - the y-coordinate of the origin of the dirty region Parameters: w - the width of the dirty region Parameters: h - the height of the dirty region |
lSet | public void lSet(int itemNum, Item item)(Code) | | Notifies look&feel object of an item set in the corresponding
Form .
Parameters: itemNum - the index of the item set Parameters: item - the item set in the corresponding Form |
scrollForBounds | boolean scrollForBounds(int dir, int bounds)(Code) | | Determine if scrolling is needed for a given bounding box,
and perform such scrolling if necessary.
Parameters: dir - the direction of travel Parameters: bounds - the bounding box of the traversal location true if it was necessary to scroll the view in order to best accommodate the bounding box |
setCurrentItem0 | native void setCurrentItem0(int nativeId, int itemId, int yOffset)(Code) | | Scroll to show an Item and give focus to it if possible.
Parameters: nativeId - native resource id of the Form Parameters: itemId - native resource id for the focused Item Parameters: yOffset - offset for the y co-ordinate of thefocused Item |
setScrollPosition0 | native void setScrollPosition0(int pos)(Code) | | Set Y position in a scrollable form.
|
uCallFreeze | public void uCallFreeze()(Code) | | Notify this Form that it is being frozen.
|
uCallHide | public void uCallHide()(Code) | | Notify this Form that it is being hidden.
|
uCallInvalidate | public void uCallInvalidate()(Code) | | This method is responsible for:
(1) Re-validate the contents of this Form , possibly due
to an individual item
(2) setup the viewable/scroll position
(3) repaint the currently visible Item s
|
uCallItemHide | void uCallItemHide()(Code) | | Hide items when Form is frozen or hidden
|
uCallItemTraverse | boolean uCallItemTraverse(ItemLFImpl item, int dir)(Code) | | Perform an internal traversal on the given item in
the given direction. The only assertion here is that
the item provided must be interactive (or otherwise
be a CustomItem). When this method returns, visRect[]
will hold the bounding box of the item's internal
traversal (in the Form's coordinate space).
Parameters: item - the item to traverse within Parameters: dir - the direction of traversal true if this item performed an internal traversalin the given direction. |
uCallKeyPressed | void uCallKeyPressed(int keyCode)(Code) | | Handle a key press.
Parameters: keyCode - the key code of the key which was pressed |
uCallKeyReleased | void uCallKeyReleased(int keyCode)(Code) | | Handle a key release event.
Parameters: keyCode - the key which was released |
uCallKeyRepeated | void uCallKeyRepeated(int keyCode)(Code) | | Handle a key repeat.
Parameters: keyCode - the key code of the key which was repeated |
uCallPaint | public void uCallPaint(Graphics g, Object target)(Code) | | Paint the contents of this Form .
Parameters: g - the Graphics object to paint on Parameters: target - the target Object of this repaint |
uCallPeerStateChanged | public void uCallPeerStateChanged(int modelVersion, int peerId, int hint)(Code) | | Called by Display to notify an ItemLF
in current FormLF of a change in its peer state.
If the the peerId matches the nativeId of this FormLF ,
uViewportChanged() will be called to process the scroll
notification.
Otherwise, if there is an ItemLF that matches the peerId,
the ItemLF will be called to process this notification.
Otherwise, this is treated as a special notification to this
FormLF upon focus changed between items, and
parameter 'hint' will contain the index of the new current
ItemLF .
Parameters: modelVersion - the version of the peer's data model Parameters: peerId - one of the following: - the id of this
FormLF if viewporthas changed in the corresponding native resourceof this FormLF (current scroll position is passed as hint) - the id of the
ItemLF whose peer statehas changed -
INVALID_NATIVE_ID if a focuschanged notification. Parameters: hint - some value that is interpreted only between the peers |
uCallPointerDragged | void uCallPointerDragged(int x, int y)(Code) | | Handle a pointer dragged event.
Parameters: x - The x coordinate of the drag Parameters: y - The y coordinate of the drag |
uCallPointerPressed | void uCallPointerPressed(int x, int y)(Code) | | Handle a pointer pressed event.
Parameters: x - The x coordinate of the press Parameters: y - The y coordinate of the press |
uCallPointerReleased | void uCallPointerReleased(int x, int y)(Code) | | Handle a pointer released event.
Parameters: x - The x coordinate of the release Parameters: y - The y coordinate of the release |
uCallShow | public void uCallShow()(Code) | | Notify this Form that it is being shown.
|
uInitItemsInViewport | void uInitItemsInViewport(int dir, ItemLFImpl[] itemsCopy, int traverseIndexCopy)(Code) | | Initialize the current page of items, perform a traverse if possible.
This method is always called when a page is initially "shown".
This occurs when the form gains visibility for the very first
time as well as after every page up/page down occurs.
This method searches for the most appropriate item on the form
to receive the interaction focus.
Parameters: dir - the direction of travel. Can be NONE when a page isfirst shown or as the result of an invalidate. Parameters: itemsCopy - a copy of the set of ItemLFImpls in this form. Parameters: traverseIndexCopy - a copy of taverseIndex to work with itesCopy[] |
uIsScrollNative | public boolean uIsScrollNative()(Code) | | This method is used in repaint, in order to determine the translation
of the draw coordinates.
true , if the scroll responsibility is on thenative platform.false , if the scroll is done at Java level. |
uItemMakeVisible | public void uItemMakeVisible(Item i)(Code) | | Set the current traversal location to the given Item .
This call has no effect if the given Item is the
current traversal item, or if the given Item is not
part of this Form . Note that null can be passed in
clear the previously set current item.
Parameters: item - the Item to make the current traversal item |
uPaintItem | void uPaintItem(ItemLFImpl itemLF, Graphics g)(Code) | | Paint an item.
Parameters: itemLF - the ItemLFImpl to paint Parameters: g - the Graphics object to paint to |
uScrollViewport | void uScrollViewport(int dir, ItemLFImpl[] items)(Code) | | Perform a page flip in the given direction. This method will
attempt to scroll the view to show as much of the next page
as possible. It uses the locations and bounds of the items on
the page to best determine a new location - taking into account
items which may lie on page boundaries as well as items which
may span several pages.
Parameters: dir - the direction of the flip, either DOWN or UP Parameters: items - the set of items on the Form, used to determinethe best suited scroll locations |
uSetRotatedStatus | public boolean uSetRotatedStatus(boolean newStatus)(Code) | | Set status of screen rotation
Parameters: newStatus - |
uTraverse | void uTraverse(int dir)(Code) | | Perform a traversal. This method handles traversal within a
"page" after the initial page has been shown via the
uInitItemsInViewport() routine. At the point this method is
called, the following conditions must be true:
1.) There are no interactive items at all on the current page
or
2.) There is at least one interactive item on the current page
and the traverseIndex is currently set to that item. In this
case, itemTraverse represents the return value of that item's
initial traverse() call.
Based on these conditions, this method will either:
1.) Continue the internal traversal on the current item (scrolling
as necessary to display the item's internal traversal location)
or
2.) Perform a traversal to the next interactive item on the page
or
3.) Perform a page flip (uScrollViewport()) and call the
uInitItemsInViewport() routine to select an appropriate
traversal item
SYNC NOTE: Maybe call into CustomItem.traverse().
So caller must not hold LCDUILock.
Parameters: dir - the direction of traversal |
Methods inherited from javax.microedition.lcdui.DisplayableLFImpl | abstract void createNativeResource()(Code)(Java Doc) void deleteNativeResource()(Code)(Java Doc) public int getVerticalScrollPosition()(Code)(Java Doc) public int getVerticalScrollProportion()(Code)(Java Doc) public void lAddCommand(Command cmd, int i)(Code)(Java Doc) void lCallHide()(Code)(Java Doc) void lCallShow()(Code)(Java Doc) public void lCommitPendingInteraction()(Code)(Java Doc) public Display lGetCurrentDisplay()(Code)(Java Doc) public Displayable lGetDisplayable()(Code)(Java Doc) public int lGetHeight()(Code)(Java Doc) public int lGetWidth()(Code)(Java Doc) public boolean lIsShown()(Code)(Java Doc) public void lRemoveCommand(Command cmd, int i)(Code)(Java Doc) void lRequestInvalidate()(Code)(Java Doc) void lRequestPaint(int x, int y, int width, int height, Object target)(Code)(Java Doc) void lRequestPaint()(Code)(Java Doc) void lRequestPaintContents()(Code)(Java Doc) public void lSetDisplay(Display d)(Code)(Java Doc) public void lSetTicker(Ticker oldTicker, Ticker newTicker)(Code)(Java Doc) public void lSetTitle(String oldTitle, String newTitle)(Code)(Java Doc) void tickerTextChanged(Ticker t)(Code)(Java Doc) public void uCallFreeze()(Code)(Java Doc) public void uCallHide()(Code)(Java Doc) public void uCallInvalidate()(Code)(Java Doc) public void uCallKeyEvent(int type, int keyCode)(Code)(Java Doc) void uCallKeyPressed(int keyCode)(Code)(Java Doc) void uCallKeyReleased(int keyCode)(Code)(Java Doc) void uCallKeyRepeated(int keyCode)(Code)(Java Doc) public void uCallPaint(Graphics g, Object target)(Code)(Java Doc) void uCallPointerDragged(int x, int y)(Code)(Java Doc) public void uCallPointerEvent(int type, int x, int y)(Code)(Java Doc) void uCallPointerPressed(int x, int y)(Code)(Java Doc) void uCallPointerReleased(int x, int y)(Code)(Java Doc) public void uCallScrollContent(int scrollType, int thumbPosition)(Code)(Java Doc) public void uCallShow()(Code)(Java Doc) public void uCallSizeChanged(int w, int h)(Code)(Java Doc) public int uGetKeyMask()(Code)(Java Doc) public boolean uIsScrollNative()(Code)(Java Doc) void uRequestPaint()(Code)(Java Doc) public void uSetFullScreenMode(boolean mode)(Code)(Java Doc) public boolean uSetRotatedStatus(boolean newStatus)(Code)(Java Doc) public void updateCommandSet()(Code)(Java Doc)
|
|
|