com.mot.lnf
Interface StringItemLNF


public interface StringItemLNF

Methods needed to customize look and feel of a StringItem


Method Summary
 javax.microedition.lcdui.Font getDefaultFont()
          Get the default font to use for drawing a StringItem
 int getMinimumHeight(java.lang.String label, TextView txt, int appearanceMode, boolean acceptsFocus)
          Get the minimum height of this component
 int getMinimumWidth(java.lang.String label, TextView txt, int appearanceMode, boolean acceptsFocus)
          Get the minimum width of this component
 int getPreferredHeight(java.lang.String label, TextView txt, int appearanceMode, boolean acceptsFocus, int width)
          Get the preferred height of this component
 int getPreferredWidth(java.lang.String label, TextView txt, int appearanceMode, boolean acceptsFocus, int height)
          Get the preferred width of this component
 void paint(javax.microedition.lcdui.Graphics g, java.lang.String label, TextView txt, int appearanceMode, boolean acceptsFocus, int width, int height, boolean hasFocus)
          Method to be used for drawing a StringItem.
 

Method Detail

paint

public void paint(javax.microedition.lcdui.Graphics g,
                  java.lang.String label,
                  TextView txt,
                  int appearanceMode,
                  boolean acceptsFocus,
                  int width,
                  int height,
                  boolean hasFocus)
Method to be used for drawing a StringItem.
Parameters:
g - Graphics object to use for drawing
label - Label of this StringItem
txt - TextView containing contents of this StringItem
appearanceMode - appearance mode of the ImageItem, one of Item.PLAIN, Item.BUTTON or Item.HYPERLINK
acceptsFocus - true if this is an interactive StringItem (has commands attached)
width - assigned width, in pixels, of the StringItem
height - assigned height, in pixels, of the StringItem
hasFocus - true if the StringItem has cursor focus

getMinimumHeight

public int getMinimumHeight(java.lang.String label,
                            TextView txt,
                            int appearanceMode,
                            boolean acceptsFocus)
Get the minimum height of this component
Parameters:
label - Label of this StringItem
txt - TextView containing contents of this StringItem
appearanceMode - appearance mode of the ImageItem, one of Item.PLAIN, Item.BUTTON or Item.HYPERLINK
acceptsFocus - true if this is an interactive StringItem (has commands attached)
Returns:
minimum height, in pixels

getMinimumWidth

public int getMinimumWidth(java.lang.String label,
                           TextView txt,
                           int appearanceMode,
                           boolean acceptsFocus)
Get the minimum width of this component
Parameters:
label - Label of this StringItem
txt - TextView containing contents of this StringItem
appearance - mode of the ImageItem, one of Item.PLAIN, Item.BUTTON or Item.HYPERLINK
acceptsFocus - true if this is an interactive StringItem (has commands attached)
Returns:
minimum width, in pixels

getPreferredHeight

public int getPreferredHeight(java.lang.String label,
                              TextView txt,
                              int appearanceMode,
                              boolean acceptsFocus,
                              int width)
Get the preferred height of this component
Parameters:
label - Label of this StringItem
txt - TextView containing contents of this StringItem
appearance - mode of the ImageItem, one of Item.PLAIN, Item.BUTTON or Item.HYPERLINK
acceptsFocus - true if this is an interactive StringItem (has commands attached)
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 appearanceMode,
                             boolean acceptsFocus,
                             int height)
Get the preferred width of this component
Parameters:
label - Label of this StringItem
txt - TextView containing contents of this StringItem
appearance - mode of the ImageItem, one of Item.PLAIN, Item.BUTTON or Item.HYPERLINK
acceptsFocus - true if this is an interactive StringItem (has commands attached)
height - the tentative content height in pixels, or -1 if a tentative height has not been computed
Returns:
preferred width, in pixels

getDefaultFont

public javax.microedition.lcdui.Font getDefaultFont()
Get the default font to use for drawing a StringItem
Returns:
default string item font