



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




14 November 2002 Web Technology for IE 2
14 November 2002 Web Technology for IE 3
14 November 2002 Web Technology for IE 4
Using Resource Locators
14 November 2002 Web Technology for IE 5
Why Use Resource Locators
moved your program from one
directory to another
standalone applications, but also for
browser applications
14 November 2002 Web Technology for IE 6
The Class class
14 November 2002 Web Technology for IE 10
Using Choice Lists
14 November 2002 Web Technology for IE 11
MovieDataInterface
14 November 2002 Web Technology for IE 12
Modifications to the Model
Blah blah blah… private MovieData movieData; Blah blah blah… public MovieData getMovieData () { if (movieData == null) { setMovieData(new MovieData ()); } return movieData; } Blah blah blah… public void setMovieData (MovieData m) { movieData = m; movieData.addObserver(new MovieDataObserver(this)); movieData.changed(); } Blah blah blah…
Application
14 November 2002 Web Technology for IE 13
Modifications to the View
Blah blah blah… private JList jList; Blah blah blah… public MovieApplication() { getMovie(); getMovieData(); getContentPane().add(“Center”, getMeter()); getContentPane().add(“East”, getJList()); } Blah blah blah… public JList getJList () { if (jList == null) {setJList(new JList());} return jList; } Blah blah blah… public void setJList (JList j) { jList = j; }
Application
14 November 2002 Web Technology for IE 14
Linking Model and View
import java.util.; import javax.swing.; public class MovieDataObserver implements Observer { private MovieApplication applet; public MovieDataObserver (MovieApplication a) { applet = a; } public void update (Observable observable, Object object) { Vector titles = new Vector(); for (Iterator i = applet.getMovieData().getMovieVector().iterator(); i.hasNext();) { Movie movie = (Movie) (i.next()); titles .add(movie.getTitle()); } applet.getJList().setListData( titles ); } }
14 November 2002 Web Technology for IE 15
Linking Model and View