| com.sun.midp.chameleon.layers.ScrollablePopupLayer javax.microedition.lcdui.DEPopupLayer
DEPopupLayer | class DEPopupLayer extends ScrollablePopupLayer (Code) | | This is a popup layer that handles a sub-popup within the date editor,
which is also a popup layer.
|
Constructor Summary | |
| DEPopupLayer(DateEditor editor, String[] elements, int selectedIndex, boolean circularTraversal) Constructs a date editor sub-popup layer, which behaves like a
popup-choicegroup, given a string array of elements that constitute
the available list of choices to select from. |
Method Summary | |
int | getSelectedIndex() Gets currently selected index. | public void | hide() | protected void | initialize() Initializes the popup layer. | public boolean | keyInput(int type, int code) Handles key event in the open popup. | public void | paintBackground(Graphics g) Paints popup background (including borders) and scrollbar
if it is present. | public void | paintBody(Graphics g) Paints the body of the popup layer. | public boolean | pointerInput(int type, int x, int y) Handles pointer event in the open popup. | public void | scrollContent(int scrollType, int thumbPosition) Scroll content inside of the DEPopup.
Parameters: scrollType - scrollType. | public void | setBounds(int x, int y, int w, int h) Sets the bounds of the popup layer. | protected void | setContent(String[] newElements, int selectedIndex) Populates this sub-popup layer with new elements. | void | setElementSize(int w, int h) Set the choice element size (width and height). | void | setSelectedIndex(int selId) Sets currently selected index. | public void | show(ScreenLFImpl sLF) | boolean | traverseInPopup(int code) Handle traversal in the open popup. | public void | updateScrollIndicator() Updates the scroll indicator. |
PRESS_OUT_OF_BOUNDS | final static int PRESS_OUT_OF_BOUNDS(Code) | | |
open | boolean open(Code) | | Indicates if this popup layer is shown (true) or hidden (false).
|
DEPopupLayer | DEPopupLayer(DateEditor editor, String[] elements, int selectedIndex, boolean circularTraversal)(Code) | | Constructs a date editor sub-popup layer, which behaves like a
popup-choicegroup, given a string array of elements that constitute
the available list of choices to select from.
Parameters: editor - The DateEditor that triggered this popup layer. Parameters: elements - String array holding the list of choices. Parameters: selectedIndex - the index to place the initial highlight on. Parameters: circularTraversal - true if traversal past the last item shouldjump to the beginning |
getSelectedIndex | int getSelectedIndex()(Code) | | Gets currently selected index.
currently selected index |
hide | public void hide()(Code) | | hide current popup
|
initialize | protected void initialize()(Code) | | Initializes the popup layer.
|
keyInput | public boolean keyInput(int type, int code)(Code) | | Handles key event in the open popup.
Parameters: type - - The type of this key event (pressed, released) Parameters: code - - The code of this key event true always, since popupLayers swallow all key events |
paintBackground | public void paintBackground(Graphics g)(Code) | | Paints popup background (including borders) and scrollbar
if it is present.
Parameters: g - - The graphics object to paint background on |
paintBody | public void paintBody(Graphics g)(Code) | | Paints the body of the popup layer.
Parameters: g - The graphics context to paint to |
pointerInput | public boolean pointerInput(int type, int x, int y)(Code) | | Handles pointer event in the open popup.
Parameters: type - - The type of this pointer event (pressed, released, dragged) Parameters: x - x coordinate Parameters: x - y coordinate true always, since popupLayers swallow all pointer events |
setBounds | public void setBounds(int x, int y, int w, int h)(Code) | | Sets the bounds of the popup layer.
Parameters: x - the x-coordinate of the popup layer location Parameters: y - the y-coordinate of the popup layer location Parameters: w - the width of this popup layer in open state Parameters: h - the height of this popup layer in open state |
setContent | protected void setContent(String[] newElements, int selectedIndex)(Code) | | Populates this sub-popup layer with new elements.
The number of elements before and after should be the same
if the popup already existed.
Parameters: newElements - String array holding the list of choices. Parameters: selectedIndex - the index to place the initial highlight on. |
setElementSize | void setElementSize(int w, int h)(Code) | | Set the choice element size (width and height).
Parameters: w - width of the element Parameters: h - height of the element |
setSelectedIndex | void setSelectedIndex(int selId)(Code) | | Sets currently selected index.
Parameters: selId - currently selected index |
show | public void show(ScreenLFImpl sLF)(Code) | | show current popup
Parameters: sLF - popup owner screen |
traverseInPopup | boolean traverseInPopup(int code)(Code) | | Handle traversal in the open popup.
Parameters: code - the code of the key event true always, since popupLayers swallow all key events |
updateScrollIndicator | public void updateScrollIndicator()(Code) | | Updates the scroll indicator.
|
|
|