improve setup mysql, start make postgresql setup,added dbtype in options, data compress script and new extract data script method. bugfix: book images
This commit is contained in:
@@ -295,8 +295,8 @@ public class EmprestimoDao {
|
||||
}
|
||||
|
||||
public String campoStatusColor(Timestamp data_devolucao, int atraso) throws Exception {
|
||||
if (atraso < -15) {
|
||||
String d = "+ de 15 dias atrasado";
|
||||
if (atraso < -15) { //errado
|
||||
String d = "+ de 15 dias restantes ou ilimitado";
|
||||
return d;
|
||||
} else if (data_devolucao == null && atraso == 0) {
|
||||
String d = "Vence Hoje";
|
||||
@@ -308,7 +308,7 @@ public class EmprestimoDao {
|
||||
String d = String.valueOf(atraso) + " dias de atraso";
|
||||
return d;
|
||||
} else if (atraso > 15) {
|
||||
String d = "+de 15 dias restantes ou ilimitado";
|
||||
String d = "+ de 15 dias de atraso";
|
||||
return d;
|
||||
} else {
|
||||
int x = Math.abs(atraso);
|
||||
|
||||
@@ -31,17 +31,20 @@ public class ConexaoBanco {
|
||||
String ipserverPath = "";
|
||||
String dbuserpPath = "";
|
||||
String dbpassPath = "";
|
||||
String dbTypePath = "";
|
||||
|
||||
switch (util.getOS()) {
|
||||
case WINDOWS:
|
||||
ipserverPath = "C:\\Librography\\ipserver";
|
||||
dbuserpPath = "C:\\Librography\\DBUser";
|
||||
dbpassPath = "C:\\Librography\\DBPass";
|
||||
dbTypePath = "C:\\Librography\\DBType";
|
||||
break;
|
||||
case MAC:
|
||||
ipserverPath = "//Applications//Librography.app//config//ipserver";
|
||||
dbuserpPath = "//Applications//Librography.app//config//DBUser";
|
||||
dbpassPath = "//Applications//Librography.app//config//DBPass";
|
||||
dbTypePath = "//Applications//Librography.app//config//DBType";
|
||||
break;
|
||||
case LINUX:
|
||||
// some stuff
|
||||
@@ -59,8 +62,18 @@ public class ConexaoBanco {
|
||||
|
||||
String contentPass;
|
||||
contentPass = new String(Files.readAllBytes(Paths.get(dbpassPath)));
|
||||
|
||||
String contentDBType = new String(Files.readAllBytes(Paths.get(dbTypePath)));
|
||||
|
||||
String contentDBPort = "";
|
||||
if(contentDBType.contains("mysql")) {
|
||||
contentDBPort = "3306";
|
||||
} else if (contentDBType.contains("postgresql")) {
|
||||
contentDBPort = "5432";
|
||||
}
|
||||
|
||||
String url = "jdbc:mysql://" + contentIP + ":3306/applibrography"; //Nome da base de dados
|
||||
//String url = "jdbc:mysql://" + contentIP + ":3306/applibrography"; //Nome da base de dados
|
||||
String url = "jdbc:" + contentDBType + "://" + contentIP + ":" + contentDBPort + "/applibrography"; //Nome da base de dados
|
||||
String user = contentUser; //nome do usuário do MySQL
|
||||
String password = contentPass; //senha do MySQL
|
||||
//System.out.println(url + user + password);
|
||||
|
||||
@@ -99,25 +99,25 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="txtIp" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveIp" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="txtUserDB" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveUserDB" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel15" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="txtPassDB" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
@@ -125,58 +125,64 @@
|
||||
<Component id="btnSavePassDB" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel21" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="txtmsgRecibo" min="-2" pref="245" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveMsgRecibo" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="101" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel13" alignment="0" min="-2" pref="146" max="-2" attributes="0"/>
|
||||
<Component id="lblLibraryLogo" alignment="0" min="-2" pref="143" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="boxDBType" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="boxPrinter" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePrinter" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveDBType" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel11" alignment="0" min="-2" pref="144" max="-2" attributes="0"/>
|
||||
<Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="boxPrinter" min="-2" pref="251" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePrinter" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtLibraryName" min="-2" pref="320" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryAddress" min="-2" pref="317" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="txtmsgRecibo" min="-2" pref="245" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveMsgRecibo" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel13" alignment="0" min="-2" pref="146" max="-2" attributes="0"/>
|
||||
<Component id="lblLibraryLogo" alignment="0" min="-2" pref="143" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="btnSetLibraryLogo" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnLibraryName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryAddress" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel11" alignment="0" min="-2" pref="144" max="-2" attributes="0"/>
|
||||
<Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtLibraryName" min="-2" pref="320" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryAddress" min="-2" pref="317" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnLibraryName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryAddress" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -184,64 +190,65 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblLibraryLogo" min="-2" pref="146" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="btnSetLibraryLogo" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel21" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="boxDBType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveDBType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtIp" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveIp" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtUserDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveUserDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtIp" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveIp" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtUserDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveUserDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePassDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="txtPassDB" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="btnSaveMsgRecibo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtmsgRecibo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblLibraryLogo" min="-2" pref="146" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePassDB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="txtPassDB" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="btnSaveMsgRecibo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtmsgRecibo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="boxPrinter" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePrinter" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnSetLibraryLogo" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="boxPrinter" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSavePrinter" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryAddress" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryAddress" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="59" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLibraryAddress" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnLibraryAddress" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="132" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -277,6 +284,7 @@
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="boxPrinterMouseClicked"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="boxPrinterActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
@@ -393,6 +401,36 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtmsgRecibo">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel21">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Tipo de Banco de Dados:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="boxDBType">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="2">
|
||||
<StringItem index="0" value="postgresql"/>
|
||||
<StringItem index="1" value="mysql"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="boxDBTypeMouseClicked"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="boxDBTypeActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnSaveDBType">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Salvar"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSaveDBTypeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
@@ -555,7 +593,7 @@
|
||||
<Component id="txtTipos" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel14" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="57" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="140" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -818,7 +856,7 @@
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="cboxTema" min="-2" pref="280" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveTheme" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="279" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -829,10 +867,10 @@
|
||||
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel17" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnSaveTheme" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cboxTema" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="324" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="407" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -843,12 +881,12 @@
|
||||
<Property name="text" type="java.lang.String" value="Tema Padrão:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Component class="javax.swing.JButton" name="btnSaveTheme">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Salvar"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSaveThemeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="cboxTema">
|
||||
@@ -861,6 +899,9 @@
|
||||
</Property>
|
||||
<Property name="selectedIndex" type="int" value="-1"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cboxTemaActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
|
||||
@@ -10,6 +10,7 @@ import br.com.projeto.model.Options;
|
||||
import java.awt.Image;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
@@ -77,6 +78,9 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
btnSaveMsgRecibo = new javax.swing.JButton();
|
||||
jLabel16 = new javax.swing.JLabel();
|
||||
txtmsgRecibo = new javax.swing.JTextField();
|
||||
jLabel21 = new javax.swing.JLabel();
|
||||
boxDBType = new javax.swing.JComboBox<>();
|
||||
btnSaveDBType = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
@@ -111,7 +115,7 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
btnExcluirTipos = new javax.swing.JButton();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
jLabel17 = new javax.swing.JLabel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
btnSaveTheme = new javax.swing.JButton();
|
||||
cboxTema = new javax.swing.JComboBox<>();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
@@ -160,6 +164,11 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
boxPrinterMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
boxPrinter.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
boxPrinterActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnSavePrinter.setText("Salvar");
|
||||
btnSavePrinter.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -230,12 +239,33 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
|
||||
jLabel16.setText("Mensagem Recibo:");
|
||||
|
||||
jLabel21.setText("Tipo de Banco de Dados:");
|
||||
|
||||
boxDBType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "postgresql", "mysql" }));
|
||||
boxDBType.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
boxDBTypeMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
boxDBType.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
boxDBTypeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnSaveDBType.setText("Salvar");
|
||||
btnSaveDBType.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnSaveDBTypeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||
jPanel2.setLayout(jPanel2Layout);
|
||||
jPanel2Layout.setHorizontalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
|
||||
.addGap(20, 20, 20)
|
||||
.addGap(17, 17, 17)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
@@ -258,93 +288,103 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(btnSavePassDB))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addComponent(jLabel16)
|
||||
.addComponent(jLabel21)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(txtmsgRecibo, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(24, 24, 24)
|
||||
.addComponent(btnSaveMsgRecibo)))
|
||||
.addGap(101, 101, 101)
|
||||
.addComponent(boxDBType, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(btnSaveDBType))
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addComponent(jLabel9)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(boxPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(btnSavePrinter))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addComponent(jLabel16)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(txtmsgRecibo, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(24, 24, 24)
|
||||
.addComponent(btnSaveMsgRecibo))))
|
||||
.addGap(66, 66, 66)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lblLibraryLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(38, 38, 38)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lblLibraryLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(btnSetLibraryLogo)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(7, 7, 7)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(22, 22, 22)
|
||||
.addComponent(jLabel9)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(boxPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(btnSavePrinter))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel10))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtLibraryName, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtLibraryAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel10))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(btnSetLibraryLogo))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnLibraryName)
|
||||
.addComponent(btnLibraryAddress))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(txtLibraryName, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtLibraryAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(24, 24, 24)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnLibraryName)
|
||||
.addComponent(btnLibraryAddress))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
jPanel2Layout.setVerticalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(12, 12, 12)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(txtIp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSaveIp))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel12)
|
||||
.addComponent(txtUserDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSaveUserDB))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel15)
|
||||
.addComponent(btnSavePassDB))
|
||||
.addComponent(txtPassDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnSaveMsgRecibo)
|
||||
.addComponent(jLabel16)
|
||||
.addComponent(txtmsgRecibo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addComponent(jLabel13)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblLibraryLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(jLabel13)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblLibraryLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(btnSetLibraryLogo)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel21)
|
||||
.addComponent(boxDBType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSaveDBType))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(txtIp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSaveIp))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel12)
|
||||
.addComponent(txtUserDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSaveUserDB))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnSetLibraryLogo)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(boxPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSavePrinter))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10)
|
||||
.addComponent(txtLibraryName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnLibraryName))
|
||||
.addGap(23, 23, 23)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel11)
|
||||
.addComponent(txtLibraryAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnLibraryAddress))))
|
||||
.addContainerGap(59, Short.MAX_VALUE))
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel15)
|
||||
.addComponent(btnSavePassDB))
|
||||
.addComponent(txtPassDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnSaveMsgRecibo)
|
||||
.addComponent(jLabel16)
|
||||
.addComponent(txtmsgRecibo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(boxPrinter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnSavePrinter))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10)
|
||||
.addComponent(txtLibraryName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnLibraryName))
|
||||
.addGap(23, 23, 23)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel11)
|
||||
.addComponent(txtLibraryAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnLibraryAddress))
|
||||
.addGap(132, 132, 132))
|
||||
);
|
||||
|
||||
jTabbedPane2.addTab("Geral", jPanel2);
|
||||
@@ -624,22 +664,27 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
.addComponent(btnExcluirTipos)
|
||||
.addComponent(txtTipos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel14))
|
||||
.addContainerGap(57, Short.MAX_VALUE))
|
||||
.addContainerGap(140, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jTabbedPane2.addTab("Biblioteca", jPanel3);
|
||||
|
||||
jLabel17.setText("Tema Padrão:");
|
||||
|
||||
jButton1.setText("Salvar");
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
btnSaveTheme.setText("Salvar");
|
||||
btnSaveTheme.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
btnSaveThemeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
cboxTema.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Tema Claro", "Tema Escuro" }));
|
||||
cboxTema.setSelectedIndex(-1);
|
||||
cboxTema.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cboxTemaActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
||||
jPanel4.setLayout(jPanel4Layout);
|
||||
@@ -651,7 +696,7 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(cboxTema, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButton1)
|
||||
.addComponent(btnSaveTheme)
|
||||
.addContainerGap(279, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel4Layout.setVerticalGroup(
|
||||
@@ -660,9 +705,9 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
.addGap(38, 38, 38)
|
||||
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel17)
|
||||
.addComponent(jButton1)
|
||||
.addComponent(btnSaveTheme)
|
||||
.addComponent(cboxTema, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(324, Short.MAX_VALUE))
|
||||
.addContainerGap(407, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jTabbedPane2.addTab("Aparência", jPanel4);
|
||||
@@ -846,29 +891,6 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_boxTiposActionPerformed
|
||||
|
||||
private void btnSaveIpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveIpActionPerformed
|
||||
try {
|
||||
//mudar para dao com esse
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\ipserver"));
|
||||
//txtIp.getText();
|
||||
txtIp.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
//editar
|
||||
//mostrar ip no inicio
|
||||
try {
|
||||
Options obj = new Options();
|
||||
obj.setServer_ip((String) txtIp.getText());// aqui
|
||||
OptionsDao dao = new OptionsDao();
|
||||
dao.setIp(obj);
|
||||
JOptionPane.showMessageDialog(null, "Ip Salvo!");
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showMessageDialog(null, "Erro:" + e);
|
||||
}
|
||||
}//GEN-LAST:event_btnSaveIpActionPerformed
|
||||
|
||||
|
||||
private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated
|
||||
//impressoas padrão aqui
|
||||
@@ -952,7 +974,6 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
}//GEN-LAST:event_btnLibraryNameActionPerformed
|
||||
|
||||
private void btnLibraryAddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLibraryAddressActionPerformed
|
||||
|
||||
try {
|
||||
Options obj = new Options();
|
||||
obj.setLibrary_name((String) txtLibraryAddress.getText());// aqui
|
||||
@@ -964,27 +985,6 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
}
|
||||
}//GEN-LAST:event_btnLibraryAddressActionPerformed
|
||||
|
||||
private void btnSaveUserDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveUserDBActionPerformed
|
||||
try {
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\DBUser"));
|
||||
txtUserDB.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_btnSaveUserDBActionPerformed
|
||||
|
||||
private void btnSavePassDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSavePassDBActionPerformed
|
||||
try {
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\DBPass"));
|
||||
txtPassDB.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}//GEN-LAST:event_btnSavePassDBActionPerformed
|
||||
|
||||
private void boxPrinterMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_boxPrinterMouseClicked
|
||||
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
|
||||
boxPrinter.addItem("Dialogo");
|
||||
@@ -995,7 +995,7 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
|
||||
private void btnSavePrinterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSavePrinterActionPerformed
|
||||
try {
|
||||
//mudar para dao com esse
|
||||
//mudar para dao com esse
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\DefaultPrinter"));
|
||||
String printer = (String) boxPrinter.getSelectedItem();
|
||||
//System.out.println(printer);
|
||||
@@ -1019,11 +1019,93 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
}
|
||||
}//GEN-LAST:event_btnSaveMsgReciboActionPerformed
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
private void btnSaveThemeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveThemeActionPerformed
|
||||
OptionsDao optionsdao = new OptionsDao();
|
||||
optionsdao.setTheme((int) cboxTema.getSelectedIndex());
|
||||
JOptionPane.showMessageDialog(null, "Tema Salvo! reinicie o aplicativo para aplicar!");
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
}//GEN-LAST:event_btnSaveThemeActionPerformed
|
||||
|
||||
private void btnSavePassDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSavePassDBActionPerformed
|
||||
try {
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\DBPass"));
|
||||
txtPassDB.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}//GEN-LAST:event_btnSavePassDBActionPerformed
|
||||
|
||||
private void btnSaveUserDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveUserDBActionPerformed
|
||||
try {
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\DBUser"));
|
||||
txtUserDB.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_btnSaveUserDBActionPerformed
|
||||
|
||||
private void btnSaveIpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveIpActionPerformed
|
||||
try {
|
||||
//mudar para dao com esse
|
||||
PrintWriter out = new PrintWriter(new FileWriter("C:\\Librography\\ipserver"));
|
||||
//txtIp.getText();
|
||||
txtIp.write(out);
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
//editar
|
||||
//mostrar ip no inicio
|
||||
try {
|
||||
Options obj = new Options();
|
||||
obj.setServer_ip((String) txtIp.getText());// aqui
|
||||
OptionsDao dao = new OptionsDao();
|
||||
dao.setIp(obj);
|
||||
JOptionPane.showMessageDialog(null, "Ip Salvo!");
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showMessageDialog(null, "Erro:" + e);
|
||||
}
|
||||
}//GEN-LAST:event_btnSaveIpActionPerformed
|
||||
|
||||
private void boxDBTypeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_boxDBTypeMouseClicked
|
||||
// PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
|
||||
//boxDBType.addItem("Dialogo");
|
||||
// for (PrintService printer : printServices) {
|
||||
//boxDBType.addItem(printer.getName());
|
||||
// erro
|
||||
// }
|
||||
}//GEN-LAST:event_boxDBTypeMouseClicked
|
||||
|
||||
private void btnSaveDBTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveDBTypeActionPerformed
|
||||
try {
|
||||
//mudar para dao com esse
|
||||
|
||||
FileOutputStream out = new FileOutputStream("C:\\Librography\\DBType");
|
||||
String printer = (String) boxDBType.getSelectedItem();
|
||||
out.write(printer.trim().getBytes());
|
||||
out.close();
|
||||
//System.out.println(printer);
|
||||
|
||||
} catch (IOException e1) {
|
||||
System.err.println("Error occurred");
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_btnSaveDBTypeActionPerformed
|
||||
|
||||
private void boxDBTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boxDBTypeActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_boxDBTypeActionPerformed
|
||||
|
||||
private void boxPrinterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boxPrinterActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_boxPrinterActionPerformed
|
||||
|
||||
private void cboxTemaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboxTemaActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_cboxTemaActionPerformed
|
||||
|
||||
//############################################################################
|
||||
/**
|
||||
@@ -1070,6 +1152,7 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JComboBox<String> boxCorredor;
|
||||
private javax.swing.JComboBox<String> boxDBType;
|
||||
private javax.swing.JComboBox<String> boxDisponibilidade;
|
||||
private javax.swing.JComboBox boxPiso;
|
||||
private javax.swing.JComboBox<String> boxPosicao;
|
||||
@@ -1090,14 +1173,15 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
private javax.swing.JButton btnExcluirTipos;
|
||||
private javax.swing.JButton btnLibraryAddress;
|
||||
private javax.swing.JButton btnLibraryName;
|
||||
private javax.swing.JButton btnSaveDBType;
|
||||
private javax.swing.JButton btnSaveIp;
|
||||
private javax.swing.JButton btnSaveMsgRecibo;
|
||||
private javax.swing.JButton btnSavePassDB;
|
||||
private javax.swing.JButton btnSavePrinter;
|
||||
private javax.swing.JButton btnSaveTheme;
|
||||
private javax.swing.JButton btnSaveUserDB;
|
||||
private javax.swing.JButton btnSetLibraryLogo;
|
||||
private javax.swing.JComboBox<String> cboxTema;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
@@ -1108,6 +1192,7 @@ public class FormOptions extends javax.swing.JFrame {
|
||||
private javax.swing.JLabel jLabel16;
|
||||
private javax.swing.JLabel jLabel17;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel21;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
|
||||
Reference in New Issue
Block a user