01: package net.xoetrope.samples.advanced;
02:
03: import net.xoetrope.awt.XButton;
04: import net.xoetrope.xui.XPage;
05: import net.xoetrope.xui.XProjectManager;
06:
07: public class NavPage2 extends XPage {
08: XButton btnPrev;
09:
10: public NavPage2() {
11: componentFactory.addComponent(XPage.LABEL, 10, 10, 200, 100,
12: "This is the second page", "prompt");
13: componentFactory.addComponent(XPage.EDIT, 50, 120, 120, 20,
14: "Original text 2", "prompt");
15: btnPrev = (XButton) componentFactory.addComponent(XPage.BUTTON,
16: 70, 150, 80, 20, "previous", "prompt");
17: addMouseHandler(btnPrev, "previous");
18: }
19:
20: public void previous() {
21: if (wasMouseClicked())
22: XProjectManager.getPageManager().showPrevious();
23: }
24:
25: }
|