01: package net.xoetrope.samples.simple;
02:
03: import net.xoetrope.awt.XButton;
04: import net.xoetrope.awt.XEdit;
05: import net.xoetrope.awt.XPanel;
06: import net.xoetrope.xui.XPage;
07:
08: public class StyleSheet extends XPage {
09: XEdit txtFirstname, txtSurname, txtAge, txtCarCost, txtDeposit;
10: XPanel pnlClientInfo, pnlFinancialInfo, pnlButtons;
11: XButton btnOK, btnCancel;
12:
13: public StyleSheet() {
14: pnlClientInfo = (XPanel) componentFactory.addComponent(
15: XPage.PANEL, 10, 10, 210, 80);
16: pnlFinancialInfo = (XPanel) componentFactory.addComponent(
17: XPage.PANEL, 10, 100, 210, 60);
18: pnlButtons = (XPanel) componentFactory.addComponent(
19: XPage.PANEL, 10, 180, 210, 40);
20: pnlClientInfo.setDrawFrame(XPanel.BORDER_BEVEL);
21: pnlFinancialInfo.setDrawFrame(XPanel.BORDER_BEVEL);
22: pnlButtons.setDrawFrame(XPanel.BORDER_BEVEL);
23: componentFactory.setParentComponent(pnlClientInfo);
24: componentFactory.addComponent(XPage.LABEL, 5, 10, 90, 20,
25: "Firstname:", "prompt");
26: txtFirstname = (XEdit) componentFactory.addComponent(
27: XPage.EDIT, 100, 10, 100, 20, "Joe");
28: componentFactory.addComponent(XPage.LABEL, 5, 30, 90, 20,
29: "Surname:", "prompt");
30: txtSurname = (XEdit) componentFactory.addComponent(XPage.EDIT,
31: 100, 30, 100, 20, "Bloggs");
32: componentFactory.addComponent(XPage.LABEL, 5, 50, 90, 20,
33: "Age:", "prompt");
34: txtAge = (XEdit) componentFactory.addComponent(XPage.EDIT, 100,
35: 50, 100, 20, "38");
36:
37: componentFactory.setParentComponent(pnlFinancialInfo);
38: componentFactory.addComponent(XPage.LABEL, 5, 10, 90, 20,
39: "Car cost:", "prompt/red");
40: txtCarCost = (XEdit) componentFactory.addComponent(XPage.EDIT,
41: 100, 10, 100, 20, "10000.00");
42: componentFactory.addComponent(XPage.LABEL, 5, 30, 90, 20,
43: "Deposit:", "prompt/red");
44: txtDeposit = (XEdit) componentFactory.addComponent(XPage.EDIT,
45: 100, 30, 100, 20, "3000.00");
46:
47: componentFactory.setParentComponent(pnlButtons);
48: btnOK = (XButton) componentFactory.addComponent(XPage.BUTTON,
49: 40, 10, 60, 20, "Proceed");
50: btnCancel = (XButton) componentFactory.addComponent(
51: XPage.BUTTON, 110, 10, 60, 20, "Cancel", "btnReverse");
52: }
53: }
|