com.mot.lnf
Interface TextFieldLNF


public interface TextFieldLNF

Methods needed to customize look and feel of a TextField


Method Summary
 char getDecimalChar()
          Get the decimal separator character
 javax.microedition.lcdui.Font getDefaultFont()
          Get the default font to use for drawing a TextField
 int getMinimumHeight(java.lang.String label, TextView txt)
          Get the minimum height of this component
 int getMinimumWidth(java.lang.String label, TextView txt)
          Get the minimum width of this component
 int getOffset(java.lang.String label, TextView txt)
          Get the offset needed for spacing
 javax.microedition.lcdui.List getPhoneList()
          Get the phone list screen to display (if possible) when a phone number field is activated
 int getPreferredHeight(java.lang.String label, TextView txt, int width)
          Get the preferred height of this component
 int getPreferredWidth(java.lang.String label, TextView txt, int height)
          Get the preferred width of this component
 java.lang.String getSelectedPhoneString(javax.microedition.lcdui.List phoneList)
          Get the text that should be set in the TextField due to a selection from the phone list
 void paint(javax.microedition.lcdui.Graphics g, java.lang.String label, TextView txt, int width, int height, boolean hasFocus, boolean editable)
          Method to be used for drawing a TextField.
 void updateCursorPosition(int x, int y, java.lang.String label, TextView txt)
          Update the cursor position within the TextView if a pointer action occurs
 

Method Detail

getDecimalChar

public char getDecimalChar()
Get the decimal separator character
Returns:
character to use for separating a decimal number

getDefaultFont

public javax.microedition.lcdui.Font getDefaultFont()
Get the default font to use for drawing a TextField
Returns:
default text field font

getMinimumHeight

public int getMinimumHeight(java.lang.String label,
                            TextView txt)
Get the minimum height of this component
Parameters:
label - Label for this component
txt - TextView that stores the contents of this component
Returns:
minimum height, in pixels

getMinimumWidth

public int getMinimumWidth(java.lang.String label,
                           TextView txt)
Get the minimum width of this component
Parameters:
label - Label for this component
txt - TextView that stores the contents of this component
Returns:
minimum width, in pixels

getPhoneList

public javax.microedition.lcdui.List getPhoneList()
Get the phone list screen to display (if possible) when a phone number field is activated
Returns:
a List containing all the phone numbers

getPreferredHeight

public int getPreferredHeight(java.lang.String label,
                              TextView txt,
                              int width)
Get the preferred height of this component
Parameters:
label - Label for this component
txt - TextView that stores the contents of this component
width - the tentative content width in pixels, or -1 if a tentative width has not been computed
Returns:
preferred height, in pixels

getPreferredWidth

public int getPreferredWidth(java.lang.String label,
                             TextView txt,
                             int height)
Get the preferred width of this component
Parameters:
label - Label for this component
txt - TextView that stores the contents of this component
height - the tentative content height in pixels, or -1 if a tentative height has not been computed
Returns:
preferred width, in pixels

getOffset

public int getOffset(java.lang.String label,
                     TextView txt)
Get the offset needed for spacing
Parameters:
label - Label for this component
txt - TextView that stores the contents of this component
Returns:
offset in pixels

getSelectedPhoneString

public java.lang.String getSelectedPhoneString(javax.microedition.lcdui.List phoneList)
Get the text that should be set in the TextField due to a selection from the phone list
Parameters:
phoneList - List containing phone numbers (same object returned in getPhoneList())
Returns:
a String containing the phone number selected

paint

public void paint(javax.microedition.lcdui.Graphics g,
                  java.lang.String label,
                  TextView txt,
                  int width,
                  int height,
                  boolean hasFocus,
                  boolean editable)
Method to be used for drawing a TextField.
Parameters:
g - Graphics object to use for drawing
label - Label for this component
txt - TextView that stores the contents of this component
width - of the component
height - of the component
hasFocus - true if the component has cursor focus
editable - true if the TextField does not contain UNEDITABLE constraint

updateCursorPosition

public void updateCursorPosition(int x,
                                 int y,
                                 java.lang.String label,
                                 TextView txt)
Update the cursor position within the TextView if a pointer action occurs
Parameters:
x - The x position of the pointer action
y - The y position of the pointer action
label - Label for this component
txt - TextView that stores the contents of this component