01: package com.xoetrope.medical.forms;
02:
03: import com.xoetrope.swing.wizard.XWizard;
04: import java.util.Hashtable;
05: import java.util.prefs.Preferences;
06: import net.xoetrope.swing.XDialog;
07: import net.xoetrope.swing.toolbar.XToolbar;
08:
09: /**
10: *
11: * @author luano
12: */
13: public class Toolbar extends XToolbar {
14:
15: /** Creates a new instance of Toolbar */
16: public Toolbar() {
17: Preferences bhisPrefs = Preferences
18: .userNodeForPackage(getClass());
19: String defLangCode = bhisPrefs.get("defaultLanguage", "en");
20: project.setStartupParam("Language", defLangCode);
21: pageHelper.componentFactory.setResourceBundle(defLangCode);
22: }
23:
24: public void doNew() {
25: Hashtable attribs = new Hashtable();
26: attribs.put("title", "Appointment / Consultancy");
27: attribs.put("constraint", "Appointment");
28: pageMgr.showPage("Appointment", "content", attribs);
29: }
30:
31: public void doAppointment() {
32: Hashtable attribs = new Hashtable();
33: attribs.put("title", "Appointment");
34: attribs.put("constraint", "Appointment");
35: pageMgr.showPage("physioEvent", "content", attribs);
36: }
37:
38: public void doUpdate() {
39: String[] pages = { "wizard/wizard1", "wizard/wizard2" };
40: // String[] helpTexts = { "<html>Remember one, <br>stop and look for a safe <br>place</html>", "<html>Remember two, <br>don't hurry stop and <br>wait</html>" };
41: XWizard wizard = new XWizard(project, pages);
42: wizard.setCaption("<html><b>Test Wizard</b></html>");
43: wizard.setSize(600, 300);
44: wizard.showDialog(this );
45: }
46:
47: public void showAbout() {
48: pageMgr.showDialog(this , "About",
49: "About Xoetrope Medical Forms", -1, -1);
50: }
51:
52: public void testPojos() {
53: XDialog dlg = (XDialog) pageMgr.loadPage("testPojos");
54: dlg.pack();
55: dlg.showDialog(this , "Test Pojos", null);
56: }
57: }
|