example.chooser
Class FontChooser

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Form
              extended by example.chooser.FontChooser
All Implemented Interfaces:
javax.microedition.lcdui.ItemStateListener

public class FontChooser
extends javax.microedition.lcdui.Form
implements javax.microedition.lcdui.ItemStateListener

A Font chooser. This screen can be used to choose fonts. A form is used to select from the various choices for size, style, and face.


Field Summary
(package private)  int face
           
(package private)  javax.microedition.lcdui.ChoiceGroup faceChoice
           
(package private)  int size
           
(package private)  javax.microedition.lcdui.ChoiceGroup sizeChoice
           
(package private)  int style
           
(package private)  javax.microedition.lcdui.ChoiceGroup styleChoice
           
 
Constructor Summary
FontChooser()
          Create a new font chooser form.
 
Method Summary
 int getFace()
          Get the face of font currently being displayed.
 int getSize()
          Get the size of font currently being displayed.
 int getStyle()
          Get the style of font currently being displayed.
 void itemStateChanged(javax.microedition.lcdui.Item item)
          Reflect changes in the item states into the states.
 void setFace(int face)
          Set the Face of font to display.
 void setSize(int size)
          Set the Size of font to display.
 void setStyle(int style)
          Set the Style of font to display.
 
Methods inherited from class javax.microedition.lcdui.Form
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

face

int face

style

int style

size

int size

faceChoice

javax.microedition.lcdui.ChoiceGroup faceChoice

styleChoice

javax.microedition.lcdui.ChoiceGroup styleChoice

sizeChoice

javax.microedition.lcdui.ChoiceGroup sizeChoice
Constructor Detail

FontChooser

public FontChooser()
Create a new font chooser form. Create each of the form entries

Method Detail

setStyle

public void setStyle(int style)
Set the Style of font to display.

Parameters:
style - the style to select
See Also:
Font.getStyle()

getStyle

public int getStyle()
Get the style of font currently being displayed.

Returns:
the current style being used for text
See Also:
Font.getStyle()

setFace

public void setFace(int face)
Set the Face of font to display.

Parameters:
face - the face to select
See Also:
Font.getFace()

getFace

public int getFace()
Get the face of font currently being displayed.

Returns:
the current face of the font
See Also:
Font.getFace()

setSize

public void setSize(int size)
Set the Size of font to display.

Parameters:
size - of the font to set
See Also:
Font.getSize()

getSize

public int getSize()
Get the size of font currently being displayed.

Returns:
the current size of the font
See Also:
Font.getSize()

itemStateChanged

public void itemStateChanged(javax.microedition.lcdui.Item item)
Reflect changes in the item states into the states.

Specified by:
itemStateChanged in interface javax.microedition.lcdui.ItemStateListener
Parameters:
item - that to which some change occurred