@@ -90,50 +90,25 @@ public class ConnectionDialog extends JDialog {
9090 */
9191 JPanel connPanel = new JPanel ();
9292
93- /**
94- * The username label.
95- */
9693 JLabel usernameLabel = new JLabel ();
97-
98- /**
99- * The username text field.
100- */
10194 JTextField usernameTF = new JTextField ();
10295
103- /**
104- * The password label.
105- */
10696 JLabel passwdLabel = new JLabel ();
107-
10897 JPasswordField passwdTF = new JPasswordField ();
98+
10999 JLabel hostLabel = new JLabel ();
100+ JTextField hostTF = new JTextField ();
110101
111102 JLabel DBLabel = new JLabel ();
112103 JTextField DBTF = new JTextField ();
113104
114- /**
115- * The host field.
116- */
117- JTextField hostTF = new JTextField ();
105+ JLabel schemaLabel = new JLabel ();
106+ JTextField schemaTF = new JTextField ();
118107
119- /**
120- * The port label.
121- */
122108 JLabel portLabel = new JLabel ();
123-
124- /**
125- * The port field.
126- */
127109 JTextField portTF = new JTextField ();
128110
129- /**
130- * The name label.
131- */
132111 JLabel nameLabel = new JLabel ();
133-
134- /**
135- * The name field.
136- */
137112 JTextField nameTF = new JTextField ();
138113
139114 /**
@@ -262,6 +237,7 @@ private void init() {
262237 urlTF .setText (c .getUrl ());
263238 classNameTF .setText (c .getClassName ());
264239 DBTF .setText (c .getDB ());
240+ schemaTF .setText (c .getSchema ());
265241 hostTF .setText (c .getHost ());
266242 portTF .setText (c .getPort ());
267243 }
@@ -295,6 +271,9 @@ private void jbInit() throws Exception {
295271 hostLabel .setText (Options .getInstance ().getResource ("host" ));
296272 hostTF .setText ("" );
297273 hostTF .setColumns (20 );
274+ schemaLabel .setText ("Schema" );
275+ schemaTF .setText ("" );
276+ schemaTF .setColumns (20 );
298277 portLabel .setText (Options .getInstance ().getResource ("port" ));
299278 portTF .setText ("5432" );
300279 portTF .setColumns (5 );
@@ -331,34 +310,20 @@ public void focusLost(FocusEvent e) {
331310
332311 connPanel .add ("DEFAULT" , defaultPanel );
333312
334- defaultPanel .add (usernameLabel , new GridBagConstraints (0 , 1 , 1 , 1 , 0.0 , 0.0
335- , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
336- defaultPanel .add (usernameTF , new GridBagConstraints (1 , 1 , 3 , 1 , 1.0 , 0.0
337- , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
338- defaultPanel .add (passwdLabel , new GridBagConstraints (0 , 2 , 1 , 1 , 0.0 , 0.0
339- , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
340- defaultPanel .add (passwdTF , new GridBagConstraints (1 , 2 , 3 , 1 , 1.0 , 0.0
341- , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
342- defaultPanel .add (hostLabel , new GridBagConstraints (0 , 4 , 1 , 1 , 0.0 , 0.0
343- , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
344- defaultPanel .add (hostTF , new GridBagConstraints (1 , 4 , 3 , 1 , 1.0 , 0.0
345- , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
346-
347-
348- defaultPanel .add (DBLabel , new GridBagConstraints (0 , 3 , 1 , 1 , 0.0 , 0.0
349- ,GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
350- defaultPanel .add (DBTF , new GridBagConstraints (1 , 3 , 3 , 1 , 1.0 , 0.0
351- ,GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
352-
353-
354- defaultPanel .add (portLabel , new GridBagConstraints (0 , 5 , 1 , 1 , 0.0 , 0.0
355- , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
356- defaultPanel .add (portTF , new GridBagConstraints (1 , 5 , 3 , 1 , 0.0 , 0.0
357- , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
358- defaultPanel .add (nameLabel , new GridBagConstraints (0 , 0 , 1 , 1 , 0.0 , 0.0
359- , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
360- defaultPanel .add (nameTF , new GridBagConstraints (1 , 0 , 3 , 1 , 1.0 , 0.0
361- , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
313+ defaultPanel .add (usernameLabel , new GridBagConstraints (0 , 1 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
314+ defaultPanel .add (usernameTF , new GridBagConstraints (1 , 1 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
315+ defaultPanel .add (passwdLabel , new GridBagConstraints (0 , 2 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
316+ defaultPanel .add (passwdTF , new GridBagConstraints (1 , 2 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
317+ defaultPanel .add (DBLabel , new GridBagConstraints (0 , 3 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
318+ defaultPanel .add (DBTF , new GridBagConstraints (1 , 3 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
319+ defaultPanel .add (schemaLabel , new GridBagConstraints (0 , 4 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
320+ defaultPanel .add (schemaTF , new GridBagConstraints (1 , 4 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
321+ defaultPanel .add (hostLabel , new GridBagConstraints (0 , 5 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
322+ defaultPanel .add (hostTF , new GridBagConstraints (1 , 5 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
323+ defaultPanel .add (portLabel , new GridBagConstraints (0 , 6 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
324+ defaultPanel .add (portTF , new GridBagConstraints (1 , 6 , 3 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
325+ defaultPanel .add (nameLabel , new GridBagConstraints (0 , 0 , 1 , 1 , 0.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .NONE , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
326+ defaultPanel .add (nameTF , new GridBagConstraints (1 , 0 , 3 , 1 , 1.0 , 0.0 , GridBagConstraints .WEST , GridBagConstraints .HORIZONTAL , new Insets (5 , 5 , 5 , 5 ), 0 , 0 ));
362327
363328 cardLayout .show (connPanel , "DEFAULT" );
364329 }
@@ -395,6 +360,7 @@ void okButton_actionPerformed(ActionEvent e) {
395360 c .setName (nameTF .getText ());
396361 c .setUsername (usernameTF .getText ());
397362 c .setPassword (passwdTF .getText ());
363+ c .setSchema (schemaTF .getText ());
398364
399365 String TempPort = portTF .getText ();
400366
0 commit comments