Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

DistributionTab.java

00001 /**
00002  * C-JDBC: Clustered JDBC.
00003  * Copyright (C) 2002-2004 French National Institute For Research In Computer
00004  * Science And Control (INRIA).
00005  * Contact: c-jdbc@objectweb.org
00006  * 
00007  * This library is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU Lesser General Public License as published by the
00009  * Free Software Foundation; either version 2.1 of the License, or any later
00010  * version.
00011  * 
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00015  * for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this library; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00020  *
00021  * Initial developer(s): Nicolas Modrzyk.
00022  * Contributor(s): ______________________.
00023  */
00024 
00025 package org.objectweb.cjdbc.console.wizard.tab;
00026 
00027 import java.awt.GridBagConstraints;
00028 import java.awt.GridBagLayout;
00029 
00030 import javax.swing.BorderFactory;
00031 import javax.swing.JComboBox;
00032 import javax.swing.JLabel;
00033 import javax.swing.JPanel;
00034 import javax.swing.JSlider;
00035 import javax.swing.JTextField;
00036 
00037 import org.objectweb.cjdbc.common.i18n.WizardTranslate;
00038 import org.objectweb.cjdbc.console.wizard.WizardConstants;
00039 import org.objectweb.cjdbc.console.wizard.WizardTab;
00040 import org.objectweb.cjdbc.console.wizard.WizardTabs;
00041 
00042 /**
00043  * Distribution tab has the fields for distributed virtual database.
00044  * 
00045  * @see <code>WizardTab</code>
00046  * @author <a href="mailto:Nicolas.Modrzyk@inria.fr">Nicolas Modrzyk </a>
00047  * @version 1.0
00048  */
00049 public class DistributionTab extends WizardTab
00050 {
00051 
00052   public JSlider    castTimeout;
00053   public JComboBox  macroClock;
00054   public JTextField groupName;
00055 
00056   /**
00057    * Creates a new <code>DistributionTab</code> object
00058    * 
00059    * @param tabs
00060    */
00061   public DistributionTab(WizardTabs tabs)
00062   {
00063     super(tabs, WizardConstants.TAB_DISTRIBUTION);
00064     this.setVisible(false);
00065 
00066     // panels
00067     JPanel general = new JPanel();
00068     general.setBorder(BorderFactory.createTitledBorder(WizardTranslate
00069         .get("label.distribution.general")));
00070     general.setLayout(new GridBagLayout());
00071     constraints.fill = GridBagConstraints.HORIZONTAL;
00072     this.add(general, constraints);
00073 
00074     // constraints
00075     GridBagConstraints localconstraints = new GridBagConstraints();
00076     localconstraints.fill = GridBagConstraints.HORIZONTAL;
00077     localconstraints.weightx = 1.0;
00078     localconstraints.gridy = 0;
00079 
00080     // groupName
00081     localconstraints.gridy = ++localconstraints.gridy;
00082     groupName = new JTextField("");
00083     localconstraints.gridx = 0;
00084     general.add(new JLabel(WizardTranslate.get("label.groupName")),
00085         localconstraints);
00086     localconstraints.gridx = 1;
00087     general.add(groupName, localconstraints);
00088 
00089     // macroClock
00090     localconstraints.gridy = ++localconstraints.gridy;
00091     macroClock = new JComboBox(WizardConstants.MACRO_CLOCK);
00092     macroClock.setSelectedIndex(0);
00093     localconstraints.gridx = 0;
00094     general.add(new JLabel(WizardTranslate.get("label.macroClock")),
00095         localconstraints);
00096     localconstraints.gridx = 1;
00097     general.add(macroClock, localconstraints);
00098 
00099     // castTimeout
00100     localconstraints.gridy = ++localconstraints.gridy;
00101     castTimeout = new JSlider(JSlider.HORIZONTAL, 0, 2000, 0);
00102     castTimeout.setPaintTicks(true);
00103     castTimeout.setPaintLabels(true);
00104     castTimeout.setMajorTickSpacing(500);
00105     localconstraints.gridx = 0;
00106     general.add(new JLabel(WizardTranslate.get("label.castTimeout")),
00107         localconstraints);
00108     localconstraints.gridx = 1;
00109     general.add(castTimeout, localconstraints);
00110 
00111   }
00112 
00113 }

Generated on Mon Apr 11 22:01:31 2005 for C-JDBC by  doxygen 1.3.9.1