| java.lang.Object com.sun.midp.chameleon.CLayer com.sun.midp.chameleon.layers.PopupLayer com.sun.midp.chameleon.layers.PTILayer
PTILayer | public class PTILayer extends PopupLayer (Code) | | A "PTILayer" layer is a special kind of layer which can
be visible when the predictive text input mode is active.
This layer is added to a MIDPWindow when more than one match
exists for the predictive input method. This layer lists the
possible words to give user a chance to select word you like.
User can traverse the list of words using up/down navigation
keys. User may press select bhutton to accept highlighted word.
|
Method Summary | |
public synchronized String[] | getList() | public boolean | handlePoint(int x, int y) Utility method to determine if this layer wanna handle
the given point. | protected void | initialize() | public boolean | keyInput(int type, int keyCode) Handle key input from a keypad. | protected void | paintBody(Graphics g) Paint layer body. | public boolean | pointerInput(int type, int x, int y) Allow this window to process pointer input. | public synchronized void | setList(String[] l) | public void | setVisible(boolean visible) The setVisible() method is overridden in PTILayer
so as not to have any effect. | public void | update(CLayer[] layers) |
PTILayer | public PTILayer(TextInputSession inputSession)(Code) | | Create an instance of PTILayer
Parameters: inputSession - current input session |
getList | public synchronized String[] getList()(Code) | | Get list of matches
list of matches |
handlePoint | public boolean handlePoint(int x, int y)(Code) | | Utility method to determine if this layer wanna handle
the given point. PTI layer handles the point if it
lies within the bounds of this layer. The point should be in
the coordinate space of this layer's containing CWindow.
Parameters: x - the "x" coordinate of the point Parameters: y - the "y" coordinate of the point true if the coordinate lies in the bounds of this layer |
initialize | protected void initialize()(Code) | | PTI layer initialization: init selected id, calculate available size
|
keyInput | public boolean keyInput(int type, int keyCode)(Code) | | Handle key input from a keypad. Parameters describe
the type of key event and the platform-specific
code for the key. (Codes are translated using the
lcdui.Canvas) UP/DOWN/SELECT key press are processed if
is visible.
Parameters: type - the type of key event Parameters: keyCode - the numeric code assigned to the key true if key has been handled by PTI layer, false otherwise |
paintBody | protected void paintBody(Graphics g)(Code) | | Paint layer body.
Parameters: g - - Graphics |
pointerInput | public boolean pointerInput(int type, int x, int y)(Code) | | Allow this window to process pointer input. The type of pointer input
will be press, release, drag, etc. The x and y coordinates will
identify the point at which the pointer event occurred in the coordinate
system of this window. This window will translate the coordinates
appropriately for each layer contained in this window. This method will
return true if the event was processed by this window or one of its
layers, false otherwise.
Parameters: type - the type of pointer event (press, release, drag) Parameters: x - the x coordinate of the location of the event Parameters: y - the y coordinate of the location of the event true if this window or one of its layers processed the event |
setList | public synchronized void setList(String[] l)(Code) | | Set list of matches
Parameters: l - list of matches |
setVisible | public void setVisible(boolean visible)(Code) | | The setVisible() method is overridden in PTILayer
so as not to have any effect. PopupLayers are always
visible by their very nature. In order to hide a
PopupLayer, it should be removed from its containing
MIDPWindow.
Parameters: visible - if true the pti layer has to be shown,if false the layer has to be hidden |
update | public void update(CLayer[] layers)(Code) | | Update bounds of layer
Parameters: layers - - current layer can be dependant on this parameter |
Methods inherited from com.sun.midp.chameleon.CLayer | public void addDirtyRegion()(Code)(Java Doc) public boolean addDirtyRegion(int x, int y, int w, int h)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) protected void cleanDirty()(Code)(Java Doc) protected void cleanDirtyRegions()(Code)(Java Doc) public boolean containsPoint(int x, int y)(Code)(Java Doc) public int[] getBounds()(Code)(Java Doc) public boolean handlePoint(int x, int y)(Code)(Java Doc) protected void initialize()(Code)(Java Doc) public boolean isDirty()(Code)(Java Doc) protected boolean isEmptyDirtyRegions()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public boolean keyInput(int type, int code)(Code)(Java Doc) protected String layerID()(Code)(Java Doc) public boolean methodInput(String str)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) protected void paintBackground(Graphics g)(Code)(Java Doc) protected void paintBody(Graphics g)(Code)(Java Doc) public boolean pointerInput(int type, int x, int y)(Code)(Java Doc) public void relocateNotify(int[] oldBounds)(Code)(Java Doc) public void removeNotify(CWindow owner)(Code)(Java Doc) public void requestRepaint()(Code)(Java Doc) public void requestRepaint(int x, int y, int w, int h)(Code)(Java Doc) public void setBackground(Image bgImage, boolean tileBG, int bgColor)(Code)(Java Doc) public void setBackground(Image[] bgImages, int bgColor)(Code)(Java Doc) public void setBounds(int x, int y, int w, int h)(Code)(Java Doc) protected void setDirty()(Code)(Java Doc) protected void setDirtyButNotNotifyOwner()(Code)(Java Doc) public void setOpaque(boolean opaque)(Code)(Java Doc) public void setSupportsInput(boolean support)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public boolean supportsInput()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void update(CLayer[] mainLayers)(Code)(Java Doc)
|
|
|