1 6 7 package com.memoire.vainstall.xui; 8 9 import java.awt.*; 10 import java.io.*; 11 import javax.swing.*; 12 import com.memoire.vainstall.*; 13 14 19 20 public class VAXtraUI 21 extends VAStepFactory 22 { 23 XuiBlueScreen blueScreen_; 24 25 public void initUI() 26 { 27 if( !VAGlobals.UI_BLUESCREEN ) VAGlobals.printDebug("no blue screen"); 28 else { 29 blueScreen_=new XuiBlueScreen(); 30 blueScreen_.show(); 31 } 32 setWizard(XuiWizard.createWizard()); 33 } 34 35 public void activateUI() 36 { 37 if( VAGlobals.UI_BLUESCREEN ) { 38 ((XuiWizard)getWizard()).setLocationRelativeTo(blueScreen_); 39 ((XuiWizard)getWizard()).toFront(); 40 blueScreen_.toBack(); 41 } 42 super.activateUI(); 43 } 44 45 public void quitUI() 46 { 47 super.quitUI(); 48 uiSleep(2000); 49 if( VAGlobals.UI_BLUESCREEN ) blueScreen_.dispose(); 50 } 51 52 public void showFatalError(Throwable t) 53 { 54 XuiOptionPane.showErrorDialog 55 ((XuiWizard)getWizard(),""+t.getMessage(),VAGlobals.i18n("UI_Error")); 56 57 super.showFatalError(t); 58 } 59 60 public void showError(Throwable t) 61 { 62 XuiOptionPane.showErrorDialog 63 ((XuiWizard)getWizard(),""+t.getMessage(),VAGlobals.i18n("UI_Message")); 64 65 super.showError(t); 66 } 67 68 public void uiSleep(long millis) 69 { 70 try { Thread.currentThread().sleep(millis/3); } 71 catch(InterruptedException ex) { } 72 } 73 74 public VAStep createSetupLanguageStep() 75 { 76 XuiLanguagePanel pn=new XuiLanguagePanel(); 77 pn.setInstaller(getInstaller()); 78 getWizard().setStep(pn); 79 return pn; 80 } 81 82 public VAStep createWelcomeStep() 83 { 84 XuiWelcomePanel pn=new XuiWelcomePanel(); 85 pn.setInstaller(getInstaller()); 86 getWizard().setStep(pn); 87 return pn; 88 } 89 90 public VAStep createLicenseStep() 91 { 92 XuiLicensePanel pn=new XuiLicensePanel(); 93 pn.setInstaller(getInstaller()); 94 getWizard().setStep(pn); 95 return pn; 96 } 97 98 public VAStep createReadmeStep() 99 { 100 XuiReadmePanel pn=new XuiReadmePanel(); 101 pn.setInstaller(getInstaller()); 102 getWizard().setStep(pn); 103 return pn; 104 } 105 106 public VAStep createLicenseKeyStep() 107 { 108 XuiLicenseKeyPanel pn=new XuiLicenseKeyPanel(); 109 pn.setInstaller(getInstaller()); 110 getWizard().setStep(pn); 111 return pn; 112 } 113 114 public VAStep createUpgradeStep() 115 { 116 XuiUpgradePanel pn=new XuiUpgradePanel(); 117 pn.setInstaller(getInstaller()); 118 getWizard().setStep(pn); 119 return pn; 120 } 121 122 public VAStep createDirectoryStep() 123 { 124 XuiDirectoryPanel pn=new XuiDirectoryPanel(); 125 pn.setInstaller(getInstaller()); 126 getWizard().setStep(pn); 127 return pn; 128 } 129 130 public VAStep createInstallStep() 131 { 132 XuiInstallPanel pn=new XuiInstallPanel(); 133 pn.setInstaller(getInstaller()); 134 getWizard().setStep(pn); 135 return pn; 136 } 137 138 public VAStep createShortcutStep() 139 { 140 XuiShortcutPanel pn=new XuiShortcutPanel(); 141 pn.setInstaller(getInstaller()); 142 getWizard().setStep(pn); 143 return pn; 144 } 145 146 public VAStep createEndStep() 147 { 148 XuiEndPanel pn=new XuiEndPanel(); 149 pn.setInstaller(getInstaller()); 150 getWizard().setStep(pn); 151 return pn; 152 } 153 } 154 | Popular Tags |