01: package net.xoetrope.samples.travel;
02:
03: import net.xoetrope.awt.XImage;
04: import net.xoetrope.awt.XLabel;
05: import net.xoetrope.awt.XScrollableMetaContent;
06: import net.xoetrope.xui.XPage;
07: import net.xoetrope.xui.XProjectManager;
08:
09: /**
10: * <p>Title: Xui</p>
11: * <p>Description: </p>
12: * <p>Copyright: Copyright (c) Xoetrope Ltd., 1998-2003</p>
13: * <p>Company: Xoetrope Ltd.</p>
14: * @author not attributable
15: * @version 1.0
16: */
17:
18: public class MollyMalone extends XPage {
19: XImage imgMolly, imgBack;
20: XLabel lblLyric;
21:
22: public MollyMalone() {
23: imgMolly = (XImage) componentFactory.addComponent(XPage.IMAGE,
24: 0, 0, 108, 155, "molly.jpg");
25: XScrollableMetaContent lblLyric = (XScrollableMetaContent) componentFactory
26: .addComponent(XPage.SCROLLABLEMETACONTENT, 110, 0, 150,
27: 155, "Molly.xml");
28: imgBack = (XImage) componentFactory.addComponent(XPage.IMAGE,
29: 0, 275, 25, 25, "navleft.jpg");
30: // ScrollPane sp = (ScrollPane)componentFactory.addNamedComponent( XSCROLLPANE, 0, 160, 250, 110 );
31: // componentFactory.setParentComponent( sp );
32: XScrollableMetaContent lblMollyHist = (XScrollableMetaContent) componentFactory
33: .addComponent(XPage.SCROLLABLEMETACONTENT, 0, 160, 250,
34: 90, "MollyHist.xml");
35: mapEvents();
36: }
37:
38: public void mapEvents() {
39: addMouseHandler(imgBack, "navBack");
40: }
41:
42: public void navBack() {
43: if (wasMouseClicked())
44: XProjectManager.getPageManager()
45: .showPage("SightSeeingTour");
46: }
47:
48: }
|