com.mot.lnf
Interface CheckboxItemLNF


public interface CheckboxItemLNF

Methods needed to customize look and feel of a CheckboxItem


Method Summary
 javax.microedition.lcdui.Font getDefaultFont()
          Get the default font to use for drawing a CheckboxItem
 int getMinimumHeight(int choiceType, TextView txt, javax.microedition.lcdui.Image img)
          Get the minimum height of this component
 int getMinimumWidth(int choiceType, TextView txt, javax.microedition.lcdui.Image img)
          Get the minimum width of this component
 int getPreferredHeight(int choiceType, TextView txt, javax.microedition.lcdui.Image img, int width)
          Get the preferred height of this component
 int getPreferredWidth(int choiceType, TextView txt, javax.microedition.lcdui.Image img, int height)
          Get the preferred width of this component
 int getTextPosition(int choiceType, TextView txt, javax.microedition.lcdui.Image img)
          Get the x position where the text should be located
 void paint(javax.microedition.lcdui.Graphics g, int choiceType, TextView txt, javax.microedition.lcdui.Image img, boolean isSelected, int height, int width, boolean hasFocus)
          Method to be used for drawing a CheckboxItem
 

Method Detail

paint

public void paint(javax.microedition.lcdui.Graphics g,
                  int choiceType,
                  TextView txt,
                  javax.microedition.lcdui.Image img,
                  boolean isSelected,
                  int height,
                  int width,
                  boolean hasFocus)
Method to be used for drawing a CheckboxItem
Parameters:
g - Graphics object to use for drawing
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
isSelected - true if the checkbox is selected
height - the assigned height of this check box
width - the assigned width of this check box
hasFocus - true if this item currently has cursor focus, false otherwise

getMinimumHeight

public int getMinimumHeight(int choiceType,
                            TextView txt,
                            javax.microedition.lcdui.Image img)
Get the minimum height of this component
Parameters:
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
Returns:
minimum height, in pixels

getMinimumWidth

public int getMinimumWidth(int choiceType,
                           TextView txt,
                           javax.microedition.lcdui.Image img)
Get the minimum width of this component
Parameters:
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
Returns:
minimum width, in pixels

getPreferredHeight

public int getPreferredHeight(int choiceType,
                              TextView txt,
                              javax.microedition.lcdui.Image img,
                              int width)
Get the preferred height of this component
Parameters:
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
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(int choiceType,
                             TextView txt,
                             javax.microedition.lcdui.Image img,
                             int height)
Get the preferred width of this component
Parameters:
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
height - the tentative content height in pixels, or -1 if a tentative height has not been computed
Returns:
preferred width, in pixels

getTextPosition

public int getTextPosition(int choiceType,
                           TextView txt,
                           javax.microedition.lcdui.Image img)
Get the x position where the text should be located
Parameters:
choiceType - the choice type, one of IMPLICIT, EXCLUSIVE, MULTIPLE or POPUP
txt - the textview containing the text information for this checkbox item
img - the image to be displayed with this checkbox item
Returns:
x position, in pixels

getDefaultFont

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