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

org.objectweb.cjdbc.console.wizard.objects.ConnectionParameterDialog Class Reference

List of all members.

Public Member Functions

 ConnectionParameterDialog (ConnectionTypeInfo type) throws HeadlessException
ArrayList getValues ()
void actionPerformed (ActionEvent e)

Detailed Description

This class defines a ConnectionParameterDialog, all the forms and fields needed to define a connection manager on a backend

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 53 of file ConnectionParameterDialog.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.wizard.objects.ConnectionParameterDialog.ConnectionParameterDialog ConnectionTypeInfo  type  )  throws HeadlessException
 

Creates a new ConnectionParameterDialog object

Exceptions:
java.awt.HeadlessException 

Definition at line 65 of file ConnectionParameterDialog.java.

00067   {
00068     super();
00069     this.setModal(true);
00070     this.setTitle(type.getType());
00071     this.setResizable(false);
00072     this.setBackground(Color.white);
00073 
00074     values = new ArrayList();
00075 
00076     this.setSize(WizardConstants.CONNECTION_FRAME_WIDTH,
00077         WizardConstants.CONNECTION_FRAME_HEIGHT);
00078     GuiConstants.centerComponent(this, WizardConstants.CONNECTION_FRAME_WIDTH,
00079         WizardConstants.CONNECTION_FRAME_HEIGHT);
00080 
00081     JPanel pane = new JPanel();
00082     pane.setBorder(BorderFactory.createTitledBorder(type.getType()));
00083     this.add(pane);
00084 
00085     pane.setLayout(new GridBagLayout());
00086     GridBagConstraints constraints = new GridBagConstraints();
00087     constraints.fill = GridBagConstraints.HORIZONTAL;
00088     constraints.anchor = GridBagConstraints.CENTER;
00089 
00090     constraints.weightx = 1.0;
00091 
00092     String[] atts = type.getAttributes();
00093     for (int i = 0; i < atts.length; i++)
00094     {
00095       constraints.gridy = ++constraints.gridy;
00096       constraints.gridx = 0;
00097       pane.add(new JLabel(atts[i]), constraints);
00098       constraints.gridx = 1;
00099       JSlider slider = new JSlider(0, 600, type.getValue(i));
00100       slider.setPaintLabels(true);
00101       slider.setPaintTicks(true);
00102       slider.setPaintTrack(true);
00103       slider.setMajorTickSpacing(100);
00104       pane.add(slider, constraints);
00105       values.add(slider);
00106     }
00107 
00108     constraints.gridy = ++constraints.gridy;
00109     constraints.gridx = 0;
00110     JButton button = new JButton(WizardTranslate.get("label.finish.edit"));
00111     button.addActionListener(this);
00112     pane.add(button, constraints);
00113 
00114     this.validate();
00115     this.setVisible(true);
00116 
00117   }


Member Function Documentation

void org.objectweb.cjdbc.console.wizard.objects.ConnectionParameterDialog.actionPerformed ActionEvent  e  ) 
 

See also:
java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)

Definition at line 136 of file ConnectionParameterDialog.java.

00137   {
00138     this.setVisible(false);
00139   }

ArrayList org.objectweb.cjdbc.console.wizard.objects.ConnectionParameterDialog.getValues  ) 
 

Returns the values value.

Returns:
Returns the values.

Definition at line 124 of file ConnectionParameterDialog.java.

Referenced by org.objectweb.cjdbc.console.wizard.tab.BackendTab.actionPerformed().

00125   {
00126     int size = values.size();
00127     ArrayList results = new ArrayList(size);
00128     for (int i = 0; i < size; i++)
00129       results.add(new Integer((((JSlider) values.get(i)).getValue())));
00130     return results;
00131   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:03:20 2005 for C-JDBC by  doxygen 1.3.9.1