st
Class MovieList

java.lang.Object
  |
  +--javax.microedition.lcdui.Displayable
        |
        +--javax.microedition.lcdui.Screen
              |
              +--javax.microedition.lcdui.List
                    |
                    +--st.MovieList
All Implemented Interfaces:
javax.microedition.lcdui.Choice

public class MovieList
extends javax.microedition.lcdui.List

A list of movies.


Fields inherited from class javax.microedition.lcdui.List
SELECT_COMMAND
 
Fields inherited from interface javax.microedition.lcdui.Choice
EXCLUSIVE, IMPLICIT, MULTIPLE
 
Constructor Summary
MovieList()
           
 
Method Summary
 void addMovie(int id, java.lang.String title, java.lang.String rating, java.lang.String posterURL)
          Add the movie to this list.
 int getMovieID()
          Get the ID of the selected movie.
 java.lang.String getMovieTitle()
          Get the title of the selected movie.
 java.lang.String getPosterUrl()
          Get the URL of the poster for the selected movie.
 void init(int size)
          Initialize this list to contain the given number of items.
 
Methods inherited from class javax.microedition.lcdui.List
append, delete, getImage, getSelectedFlags, getSelectedIndex, getString, insert, isSelected, set, setSelectedFlags, setSelectedIndex, size
 
Methods inherited from class javax.microedition.lcdui.Screen
getTicker, getTitle, setTicker, setTitle
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, isShown, removeCommand, setCommandListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MovieList

public MovieList()
Method Detail

init

public void init(int size)
Initialize this list to contain the given number of items.
Parameters:
the - size of this list.

addMovie

public void addMovie(int id,
                     java.lang.String title,
                     java.lang.String rating,
                     java.lang.String posterURL)
Add the movie to this list.
Parameters:
id - the ID of the movie.
title - the title of the movie.
rating - the movie's rating.
posterURL - the URL of the movie's poster.

getMovieID

public int getMovieID()
Get the ID of the selected movie.

getMovieTitle

public java.lang.String getMovieTitle()
Get the title of the selected movie.

getPosterUrl

public java.lang.String getPosterUrl()
Get the URL of the poster for the selected movie.


Copyright © 2002 Sun Microsystems Inc. All rights reserved.