01: package net.xoetrope.samples.travel;
02:
03: import java.awt.Color;
04:
05: import net.xoetrope.awt.XImage;
06: import net.xoetrope.awt.XLabel;
07: import net.xoetrope.xui.XPage;
08: import net.xoetrope.xui.XProjectManager;
09:
10: /**
11: * <p>Title: Xui</p>
12: * <p>Description: </p>
13: * <p>Copyright: Copyright (c) Xoetrope Ltd., 1998-2003</p>
14: * <p>Company: Xoetrope Ltd.</p>
15: * @author not attributable
16: * @version 1.0
17: */
18:
19: public class TourIndex extends XPage {
20:
21: XLabel lblPrompt, lblGuidedTours, lblCinema, lblTheatre, lblMusic;
22: XImage imgBack;
23:
24: public TourIndex() {
25: this .setBackground(Color.white);
26: imgBack = (XImage) componentFactory.addComponent(XPage.IMAGE,
27: 220, 10, 18, 14, "home.gif");
28: lblPrompt = (XLabel) componentFactory.addComponent(XPage.LABEL,
29: 10, 10, 280, 30,
30: "Please select the service you require!", "prompt");
31: lblGuidedTours = (XLabel) componentFactory.addComponent(
32: XPage.LABEL, 10, 50, 230, 30, "Guided Tours", "link");
33: lblCinema = (XLabel) componentFactory.addComponent(XPage.LABEL,
34: 10, 100, 230, 30, "Cinema Listings", "link");
35: lblTheatre = (XLabel) componentFactory.addComponent(
36: XPage.LABEL, 10, 150, 230, 30, "Theatres", "link");
37: lblMusic = (XLabel) componentFactory.addComponent(XPage.LABEL,
38: 10, 200, 230, 30, "Music Venues", "link");
39: mapEvents();
40: remove(imgBack);
41: add(imgBack, 0);
42: }
43:
44: public void mapEvents() {
45: addMouseHandler(lblGuidedTours, "showGuidedTours");
46: addMouseHandler(lblCinema, "cinemaSearch");
47: addMouseHandler(lblTheatre, "theatreSearch");
48: addMouseHandler(lblMusic, "musicVenues");
49: addMouseHandler(imgBack, "goHome");
50: }
51:
52: public void goHome() {
53: if (wasMouseClicked())
54: XProjectManager.getPageManager().showPage("Services");
55: }
56:
57: public void showGuidedTours() {
58:
59: }
60:
61: public void cinemaSearch() {
62:
63: }
64:
65: public void theatreSearch() {
66:
67: }
68:
69: public void musicVenues() {
70:
71: }
72: }
|