com.sun.perseus.demo
Class ContactListScreen

java.lang.Object
  extended by com.sun.perseus.demo.ContactListScreen
All Implemented Interfaces:
javax.microedition.m2g.SVGEventListener

public class ContactListScreen
extends java.lang.Object
implements javax.microedition.m2g.SVGEventListener


Nested Class Summary
(package private) static class ContactListScreen.CommonContactItemBinder
          In the list displayed by this application, we display the contact name in the list item which must be a element.
(package private)  class ContactListScreen.JumpToRunnable
           
(package private) static class ContactListScreen.SelectedContactItemBinder
          In the list displayed by this application, we display the contact name and the contact cell phone in the selected item.
 
Field Summary
protected  SVGHorizontalScrollBar scrollBar
          Horizontal ScrollBar
protected  SVGList svgList
          The list where the contact items are displayed.
 
Constructor Summary
ContactListScreen(javax.microedition.m2g.SVGAnimator contactListAnimator, javax.microedition.m2g.SVGImage contactListImage, ContactListSource contactListSource)
          Creates a new instance of SVGContactListScreen
 
Method Summary
 void hideNotify()
           
 void jumpTo(char c)
          Scrolls to the first item starting with the specified character, if any.
protected  void jumpTo(int listIndex)
          Should be invoked in the update thread.
 void keyPressed(int i)
           
 void keyReleased(int i)
           
 void onTextEvent(char c)
           
 void pointerPressed(int i, int i0)
           
 void pointerReleased(int i, int i0)
           
(package private)  void scrollDown()
           
(package private)  void scrollUp()
           
 void showNotify()
           
 void sizeChanged(int i, int i0)
           
 char toAlphabet(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scrollBar

protected SVGHorizontalScrollBar scrollBar
Horizontal ScrollBar


svgList

protected SVGList svgList
The list where the contact items are displayed.

Constructor Detail

ContactListScreen

public ContactListScreen(javax.microedition.m2g.SVGAnimator contactListAnimator,
                         javax.microedition.m2g.SVGImage contactListImage,
                         ContactListSource contactListSource)
Creates a new instance of SVGContactListScreen

Parameters:
contactListAnimator - - the associated SVGAnimator
contactListImage - - the associated SVGImage
contactListSource - - the contact list data source
Method Detail

scrollDown

void scrollDown()

scrollUp

void scrollUp()

keyPressed

public void keyPressed(int i)
Specified by:
keyPressed in interface javax.microedition.m2g.SVGEventListener

onTextEvent

public void onTextEvent(char c)
Parameters:
c - the new character which was typed.

toAlphabet

public char toAlphabet(char c)
Parameters:
c - the keyboard character to convert to an alphabetical value.

jumpTo

public void jumpTo(char c)
Scrolls to the first item starting with the specified character, if any.

Parameters:
c - alpha

jumpTo

protected void jumpTo(int listIndex)
Should be invoked in the update thread.

Parameters:
listIndex - - the list index to jump to.

keyReleased

public void keyReleased(int i)
Specified by:
keyReleased in interface javax.microedition.m2g.SVGEventListener

pointerPressed

public void pointerPressed(int i,
                           int i0)
Specified by:
pointerPressed in interface javax.microedition.m2g.SVGEventListener

pointerReleased

public void pointerReleased(int i,
                            int i0)
Specified by:
pointerReleased in interface javax.microedition.m2g.SVGEventListener

hideNotify

public void hideNotify()
Specified by:
hideNotify in interface javax.microedition.m2g.SVGEventListener

showNotify

public void showNotify()
Specified by:
showNotify in interface javax.microedition.m2g.SVGEventListener

sizeChanged

public void sizeChanged(int i,
                        int i0)
Specified by:
sizeChanged in interface javax.microedition.m2g.SVGEventListener