Skip to content

Commit

Permalink
App: remove DatabaseConfig unused fields
Browse files Browse the repository at this point in the history
  • Loading branch information
poolborges committed Apr 27, 2023
1 parent 038cb91 commit d5d74a4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@
<Component id="jSeparator1" min="-2" pref="880" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="jLblDBName" min="-2" pref="123" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<Component id="jtxtDbName" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jtxtDbURL" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jLabel7" max="32767" attributes="0"/>
Expand All @@ -58,6 +48,22 @@
<Component id="jButtonTest" alignment="0" min="-2" pref="160" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jLblDBName" max="32767" attributes="0"/>
<Component id="jLabel2" max="32767" attributes="0"/>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jtxtDbURL" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
<Component id="jtxtDbName" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public JPanelConfigDatabase() {
jcboDBDriver.addActionListener(dirty);
jcboDBDriver.addItem("MariaDB");
jcboDBDriver.addItem("MySQL");
jcboDBDriver.addItem("HSQLDB");
jcboDBDriver.setSelectedIndex(0);
multiDB.addActionListener(dirty);

Expand Down Expand Up @@ -404,14 +405,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jLblDBName, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addComponent(jtxtDbName, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jtxtDbURL, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand All @@ -424,7 +417,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(jtxtDbSchema, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
.addComponent(jtxtDbUser, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)
.addComponent(jtxtDbPassword, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButtonTest, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jButtonTest, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLblDBName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jtxtDbURL, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jtxtDbName, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)))))
.addGap(40, 40, 40)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLblDbName1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand Down Expand Up @@ -534,22 +538,19 @@ private void jcboDBDriverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
String selected = (String)jcboDBDriver.getSelectedItem();

switch(selected){
case "MySQL":
//jtxtDbDriverLib.setText("Driver: com.mysql.jdbc.Driver | URL: jdbc:mysql://localhost:3306/");
jtxtDbOptions.setText("?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull");
case "MySQL":
//jtxtDbOptions.setText("?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull");
break;
case "MariaDB":
//jtxtDbDriverLib.setText("Driver: org.mariadb.jdbc.Driver | URL: jdbc:mariadb://localhost:3306/");
jtxtDbOptions.setText("?characterEncoding=utf8");
case "MariaDB":
//jtxtDbOptions.setText("?characterEncoding=utf8");
break;
case "PostgreSQL":
//jtxtDbDriverLib.setText("Driver: org.postgresql.Driver | URL: jdbc:postgresql://localhost:5432/");
break;
case "Derby":
//jtxtDbDriverLib.setText("Driver: org.apache.derby.jdbc.EmbeddedDriver | URL: jdbc:derby:~/kriolospos/posdb;create=true");
//jtxtDbOptions.setText(";create=true");
break;
case "hsqldb":
//jtxtDbDriverLib.setText("Driver: org.apache.derby.jdbc.EmbeddedDriver | URL: jdbc:derby:~/kriolospos/posdb;create=true");
case "HSQLDB":
//jtxtDbOptions.setText(";shutdown=true");
break;
}
}//GEN-LAST:event_jcboDBDriverActionPerformed
Expand Down

0 comments on commit d5d74a4

Please sign in to comment.