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 GuidedTourIndex extends XPage {
20: XLabel lblPrompt, lblSightSeeing, lbl1916, lblViking, lblMedieval,
21: lblJoyce, lblPub;
22: XImage imgBack;
23:
24: public GuidedTourIndex() {
25: 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, 300, 30,
30: "Please select the service you require!", "prompt");
31: lblSightSeeing = (XLabel) componentFactory.addComponent(
32: XPage.LABEL, 10, 50, 220, 30, "Historical tour",
33: "link/on");
34: lbl1916 = (XLabel) componentFactory.addComponent(XPage.LABEL,
35: 10, 90, 220, 30, "1916 tour", "link");
36: lblViking = (XLabel) componentFactory.addComponent(XPage.LABEL,
37: 10, 130, 220, 30, "Viking tour", "link");
38: lblMedieval = (XLabel) componentFactory.addComponent(
39: XPage.LABEL, 10, 170, 220, 30, "Medieval tour", "link");
40: lblJoyce = (XLabel) componentFactory.addComponent(XPage.LABEL,
41: 10, 210, 220, 30, "James Joyce tour", "link");
42: lblPub = (XLabel) componentFactory.addComponent(XPage.LABEL,
43: 10, 250, 220, 30, "Famous Pubs tour", "link");
44: mapEvents();
45: }
46:
47: public void mapEvents() {
48: addMouseHandler(lblSightSeeing, "showSightSeeing");
49: addMouseHandler(imgBack, "goHome");
50: }
51:
52: public void goHome() {
53: if (wasMouseClicked())
54: XProjectManager.getPageManager().showPage("Services");
55: }
56:
57: public void showSightSeeing() {
58: if (wasMouseClicked())
59: XProjectManager.getPageManager().showPage(
60: "SightSeeingTourIntro");
61: }
62: }
|