Public Member Functions | |
RequestManagerTab (WizardTabs tabs) | |
void | distributionChanged () |
void | itemStateChanged (ItemEvent e) |
Public Attributes | |
JCheckBox | caseSensitiveParsing |
JSlider | beginTimeout |
JSlider | commitTimeout |
JSlider | rollbackTimeout |
JComboBox | scheduler |
JPanel | shedulerPanel |
GridBagConstraints | shedulerPanelconstraints |
JComboBox | schedulerLevel |
JComboBox | loadbalancer |
GridBagConstraints | loadbalancerPanelconstraints |
JPanel | loadbalancerPanel |
JCheckBox | usecaching |
JCheckBox | userecoverylog |
JComboBox | wait4completion |
CachingTab
and RecoveryTab
WizardTab
Definition at line 55 of file RequestManagerTab.java.
|
Creates a new
Definition at line 78 of file RequestManagerTab.java. 00079 { 00080 super(tabs, WizardConstants.TAB_REQUEST_MANAGER); 00081 00082 /////////////////////////////////////////////////////////////////////////// 00083 // general panel 00084 /////////////////////////////////////////////////////////////////////////// 00085 00086 JPanel general = new JPanel(); 00087 general.setBorder(BorderFactory.createTitledBorder(WizardTranslate 00088 .get("label.scheduler"))); 00089 general.setLayout(new GridBagLayout()); 00090 GridBagConstraints generalconstraints = new GridBagConstraints(); 00091 generalconstraints.fill = GridBagConstraints.HORIZONTAL; 00092 generalconstraints.weightx = 1.0; 00093 00094 // caseSensitiveParsing 00095 generalconstraints.gridy = ++generalconstraints.gridy; 00096 generalconstraints.gridx = 0; 00097 general.add(new JLabel(WizardTranslate.get("label.caseSensitiveParsing")), 00098 generalconstraints); 00099 generalconstraints.gridx = 1; 00100 caseSensitiveParsing = new JCheckBox(); 00101 caseSensitiveParsing.setName("label.caseSensitiveParsing"); 00102 general.add(caseSensitiveParsing, generalconstraints); 00103 00104 // beginTimeout 00105 generalconstraints.gridy = ++generalconstraints.gridy; 00106 beginTimeout = new JSlider(JSlider.HORIZONTAL, 0, 2000, 60); 00107 beginTimeout.setPaintTicks(true); 00108 beginTimeout.setPaintLabels(true); 00109 beginTimeout.setMajorTickSpacing(500); 00110 generalconstraints.gridx = 0; 00111 general.add(new JLabel(WizardTranslate.get("label.beginTimeout")), 00112 generalconstraints); 00113 generalconstraints.gridx = 1; 00114 general.add(beginTimeout, generalconstraints); 00115 00116 // commitTimeout 00117 generalconstraints.gridy = ++generalconstraints.gridy; 00118 commitTimeout = new JSlider(JSlider.HORIZONTAL, 0, 2000, 60); 00119 commitTimeout.setPaintTicks(true); 00120 commitTimeout.setPaintLabels(true); 00121 commitTimeout.setMajorTickSpacing(500); 00122 generalconstraints.gridx = 0; 00123 general.add(new JLabel(WizardTranslate.get("label.commitTimeout")), 00124 generalconstraints); 00125 generalconstraints.gridx = 1; 00126 general.add(commitTimeout, generalconstraints); 00127 00128 // beginTimeout 00129 generalconstraints.gridy = ++generalconstraints.gridy; 00130 rollbackTimeout = new JSlider(JSlider.HORIZONTAL, 0, 2000, 60); 00131 rollbackTimeout.setPaintTicks(true); 00132 rollbackTimeout.setPaintLabels(true); 00133 rollbackTimeout.setMajorTickSpacing(500); 00134 generalconstraints.gridx = 0; 00135 general.add(new JLabel(WizardTranslate.get("label.rollbackTimeout")), 00136 generalconstraints); 00137 generalconstraints.gridx = 1; 00138 general.add(rollbackTimeout, generalconstraints); 00139 00140 // use caching 00141 generalconstraints.gridy = ++generalconstraints.gridy; 00142 generalconstraints.gridx = 0; 00143 general.add(new JLabel(WizardTranslate.get("label.usecaching")), 00144 generalconstraints); 00145 generalconstraints.gridx = 1; 00146 usecaching = new JCheckBox(); 00147 usecaching.setName("label.usecaching"); 00148 usecaching.addItemListener(this); 00149 general.add(usecaching, generalconstraints); 00150 00151 // use recovery log 00152 generalconstraints.gridy = ++generalconstraints.gridy; 00153 generalconstraints.gridx = 0; 00154 general.add(new JLabel(WizardTranslate.get("label.userecoverylog")), 00155 generalconstraints); 00156 generalconstraints.gridx = 1; 00157 userecoverylog = new JCheckBox(); 00158 userecoverylog.addItemListener(this); 00159 userecoverylog.setName("label.userecoverylog"); 00160 general.add(userecoverylog, generalconstraints); 00161 00162 this.add(general, constraints); 00163 constraints.gridy = ++constraints.gridy; 00164 00165 /////////////////////////////////////////////////////////////////////////// 00166 // scheduler panel 00167 /////////////////////////////////////////////////////////////////////////// 00168 00169 shedulerPanel = new JPanel(); 00170 shedulerPanel.setBorder(BorderFactory.createTitledBorder(WizardTranslate 00171 .get("label.scheduler"))); 00172 shedulerPanel.setLayout(new GridBagLayout()); 00173 shedulerPanelconstraints = new GridBagConstraints(); 00174 shedulerPanelconstraints.fill = GridBagConstraints.HORIZONTAL; 00175 shedulerPanelconstraints.weightx = 1.0; 00176 00177 // scheduler list 00178 scheduler = new JComboBox(WizardConstants.SCHEDULERS_STANDARD); 00179 scheduler.setSelectedIndex(0); 00180 scheduler.addItemListener(this); 00181 shedulerPanelconstraints.gridx = 0; 00182 shedulerPanel.add(new JLabel(WizardTranslate.get("label.scheduler.type")), 00183 shedulerPanelconstraints); 00184 shedulerPanelconstraints.gridx = 1; 00185 shedulerPanel.add(scheduler, shedulerPanelconstraints); 00186 00187 shedulerPanelconstraints.gridy = 1; 00188 schedulerLevel = new JComboBox(WizardConstants.SCHEDULER_SINGLEDB_LEVELS); 00189 schedulerLevel.setSelectedIndex(0); 00190 schedulerLevel.addItemListener(this); 00191 shedulerPanelconstraints.gridx = 0; 00192 shedulerPanel.add(new JLabel(WizardTranslate.get("label.scheduler.level")), 00193 shedulerPanelconstraints); 00194 shedulerPanelconstraints.gridx = 1; 00195 shedulerPanel.add(schedulerLevel, shedulerPanelconstraints); 00196 00197 this.add(shedulerPanel, constraints); 00198 constraints.gridy = ++constraints.gridy; 00199 00200 /////////////////////////////////////////////////////////////////////////// 00201 // loadbalancer panel 00202 /////////////////////////////////////////////////////////////////////////// 00203 00204 loadbalancerPanel = new JPanel(); 00205 loadbalancerPanel.setBorder(BorderFactory 00206 .createTitledBorder(WizardTranslate.get("label.loadbalancer"))); 00207 loadbalancerPanel.setLayout(new GridBagLayout()); 00208 loadbalancerPanelconstraints = new GridBagConstraints(); 00209 loadbalancerPanelconstraints.fill = GridBagConstraints.HORIZONTAL; 00210 loadbalancerPanelconstraints.weightx = 1.0; 00211 00212 loadbalancer = new JComboBox(WizardConstants.LOAD_BALANCER_SINGLEDB); 00213 loadbalancer.setSelectedIndex(0); 00214 loadbalancer.addItemListener(this); 00215 loadbalancerPanelconstraints.gridx = 0; 00216 loadbalancerPanel.add(new JLabel(WizardTranslate 00217 .get("label.loadbalancer.type")), loadbalancerPanelconstraints); 00218 loadbalancerPanelconstraints.gridx = 1; 00219 loadbalancerPanel.add(loadbalancer, loadbalancerPanelconstraints); 00220 00221 loadbalancerPanelconstraints.gridy = 1; 00222 wait4completion = new JComboBox(WizardConstants.WAIT_POLICIES); 00223 wait4completion.setEnabled(false); 00224 loadbalancerPanelconstraints.gridx = 0; 00225 loadbalancerPanel.add(new JLabel(WizardTranslate 00226 .get("label.loadbalancer.wait")), loadbalancerPanelconstraints); 00227 loadbalancerPanelconstraints.gridx = 1; 00228 loadbalancerPanel.add(wait4completion, loadbalancerPanelconstraints); 00229 00230 this.add(loadbalancerPanel, constraints); 00231 }
|
|
Reimplemented from org.objectweb.cjdbc.console.wizard.WizardTab. Definition at line 236 of file RequestManagerTab.java. References org.objectweb.cjdbc.console.wizard.WizardTabs.isDistributedDatabase(). 00237 { 00238 shedulerPanel.remove(scheduler); 00239 if (tabs.isDistributedDatabase()) 00240 { 00241 scheduler = new JComboBox(WizardConstants.SCHEDULERS_DISTRIBUTED); 00242 } 00243 else 00244 { 00245 scheduler = new JComboBox(WizardConstants.SCHEDULERS_STANDARD); 00246 } 00247 scheduler.setSelectedIndex(0); 00248 scheduler.addItemListener(this); 00249 shedulerPanelconstraints.gridx = 1; 00250 shedulerPanelconstraints.gridy = 0; 00251 shedulerPanel.add(scheduler, shedulerPanelconstraints); 00252 shedulerPanel.validate(); 00253 shedulerPanel.repaint(); 00254 }
|
|
Definition at line 259 of file RequestManagerTab.java. References org.objectweb.cjdbc.console.wizard.WizardTabs.setTabEnabled(). 00260 { 00261 JComponent source = (JComponent) e.getSource(); 00262 if (source.equals(scheduler)) 00263 { 00264 // change scheduler level 00265 shedulerPanel.remove(schedulerLevel); 00266 if (scheduler.getSelectedIndex() == 0) 00267 schedulerLevel = new JComboBox( 00268 WizardConstants.SCHEDULER_SINGLEDB_LEVELS); 00269 else if (scheduler.getSelectedIndex() == 1) 00270 schedulerLevel = new JComboBox(WizardConstants.SCHEDULER_RAIDB0_LEVELS); 00271 else if (scheduler.getSelectedIndex() == 2) 00272 schedulerLevel = new JComboBox(WizardConstants.SCHEDULER_RAIDB1_LEVELS); 00273 else if (scheduler.getSelectedIndex() == 3) 00274 schedulerLevel = new JComboBox(WizardConstants.SCHEDULER_RAIDB2_LEVELS); 00275 00276 shedulerPanelconstraints.gridx = 1; 00277 shedulerPanelconstraints.gridy = 1; 00278 schedulerLevel.setSelectedIndex(0); 00279 schedulerLevel.addItemListener(this); 00280 shedulerPanel.add(schedulerLevel, shedulerPanelconstraints); 00281 shedulerPanel.validate(); 00282 shedulerPanel.repaint(); 00283 00284 // change loadbalancer list 00285 loadbalancerPanel.remove(loadbalancer); 00286 if (scheduler.getSelectedIndex() == 0) 00287 loadbalancer = new JComboBox(WizardConstants.LOAD_BALANCER_SINGLEDB); 00288 else if (scheduler.getSelectedIndex() == 1) 00289 loadbalancer = new JComboBox(WizardConstants.LOAD_BALANCER_RAIDB0); 00290 else if (scheduler.getSelectedIndex() == 2) 00291 loadbalancer = new JComboBox(WizardConstants.LOAD_BALANCER_RAIDB1); 00292 else if (scheduler.getSelectedIndex() == 3) 00293 loadbalancer = new JComboBox(WizardConstants.LOAD_BALANCER_RAIDB2); 00294 00295 loadbalancerPanelconstraints.gridx = 1; 00296 loadbalancerPanelconstraints.gridy = 0; 00297 loadbalancer.setSelectedIndex(0); 00298 loadbalancer.addItemListener(this); 00299 loadbalancerPanel.add(loadbalancer, loadbalancerPanelconstraints); 00300 loadbalancerPanel.validate(); 00301 loadbalancerPanel.repaint(); 00302 00303 } 00304 else if (source.equals(usecaching)) 00305 { 00306 if (usecaching.getSelectedObjects() != null) 00307 tabs.setTabEnabled(WizardConstants.TAB_CACHING, true); 00308 else 00309 tabs.setTabEnabled(WizardConstants.TAB_CACHING, false); 00310 } 00311 else if (source.equals(userecoverylog)) 00312 { 00313 if (userecoverylog.getSelectedObjects() != null) 00314 tabs.setTabEnabled(WizardConstants.TAB_RECOVERY, true); 00315 else 00316 tabs.setTabEnabled(WizardConstants.TAB_RECOVERY, false); 00317 } 00318 00319 // enable wait4completion combo ? 00320 if (source.equals(loadbalancer) || source.equals(scheduler)) 00321 { 00322 String selected = (String) loadbalancer.getSelectedItem(); 00323 if (selected.startsWith(DatabasesXmlTags.ELT_RAIDb_1) 00324 || selected.startsWith(DatabasesXmlTags.ELT_RAIDb_2)) 00325 wait4completion.setEnabled(true); 00326 else 00327 wait4completion.setEnabled(false); 00328 } 00329 }
|