commit 28f6c45e18e8479194e923082fe9021bc5029efb Author: f.disciascio Date: Thu Mar 21 09:57:01 2024 +0100 primo commit diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..1d6cde2 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml new file mode 100644 index 0000000..966d5f5 --- /dev/null +++ b/.idea/jpa-buddy.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/libraries/Cassa.xml b/.idea/libraries/Cassa.xml new file mode 100644 index 0000000..16c8f39 --- /dev/null +++ b/.idea/libraries/Cassa.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Cassa1.xml b/.idea/libraries/Cassa1.xml new file mode 100644 index 0000000..6ccfb15 --- /dev/null +++ b/.idea/libraries/Cassa1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Cassa2.xml b/.idea/libraries/Cassa2.xml new file mode 100644 index 0000000..1b7899d --- /dev/null +++ b/.idea/libraries/Cassa2.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Cassa3.xml b/.idea/libraries/Cassa3.xml new file mode 100644 index 0000000..c1af813 --- /dev/null +++ b/.idea/libraries/Cassa3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/DynamicReport.xml b/.idea/libraries/DynamicReport.xml new file mode 100644 index 0000000..fc7adfb --- /dev/null +++ b/.idea/libraries/DynamicReport.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml new file mode 100644 index 0000000..96a6374 --- /dev/null +++ b/.idea/libraries/lib.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/lib1.xml b/.idea/libraries/lib1.xml new file mode 100644 index 0000000..ff5b721 --- /dev/null +++ b/.idea/libraries/lib1.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ee13ea1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..aa9b6b3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Aggiornamento.jar b/Aggiornamento.jar new file mode 100644 index 0000000..c4e8273 Binary files /dev/null and b/Aggiornamento.jar differ diff --git a/Cassa.iml b/Cassa.iml new file mode 100644 index 0000000..2a041e2 --- /dev/null +++ b/Cassa.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Dump20131030.sql b/Dump20131030.sql new file mode 100644 index 0000000..f47b0cb --- /dev/null +++ b/Dump20131030.sql @@ -0,0 +1,231 @@ +CREATE DATABASE IF NOT EXISTS `sir` /*!40100 DEFAULT CHARACTER SET utf8 */; +USE `sir`; +-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) +-- +-- Host: localhost Database: sir +-- ------------------------------------------------------ +-- Server version 5.6.14 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounts` +-- + +DROP TABLE IF EXISTS `accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accounts` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `ID_UTENTE` decimal(11,0) DEFAULT NULL, + `USERNAME` varchar(255) DEFAULT NULL, + `PASSWORD` varchar(255) DEFAULT NULL, + `DATA_CREAZIONE` date DEFAULT NULL, + `DATA_SCADENZA` date DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `FK_ACCO_UTEN` (`ID_UTENTE`), + CONSTRAINT `FK_ACCO_UTEN` FOREIGN KEY (`ID_UTENTE`) REFERENCES `utenti` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounts` +-- + +LOCK TABLES `accounts` WRITE; +/*!40000 ALTER TABLE `accounts` DISABLE KEYS */; +INSERT INTO `accounts` VALUES (1,NULL,'a','3104',NULL,NULL); +/*!40000 ALTER TABLE `accounts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `categorie_prodotti` +-- + +DROP TABLE IF EXISTS `categorie_prodotti`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorie_prodotti` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `NOME` varchar(255) DEFAULT NULL, + `DESCRIZIONE` varchar(255) DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `categorie_prodotti` +-- + +LOCK TABLES `categorie_prodotti` WRITE; +/*!40000 ALTER TABLE `categorie_prodotti` DISABLE KEYS */; +INSERT INTO `categorie_prodotti` VALUES (1,'Pizzeria',NULL),(2,'Insalate',NULL),(3,'Panini',NULL),(4,'Antipasti',NULL),(5,'Primi',NULL),(6,'Secondi',NULL),(7,'Contorni',NULL),(8,'Frutta',NULL),(9,'Dessert',NULL),(10,'Bevande',NULL),(11,'Bar',NULL),(12,'Menu',NULL); +/*!40000 ALTER TABLE `categorie_prodotti` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `categorie_utenti` +-- + +DROP TABLE IF EXISTS `categorie_utenti`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorie_utenti` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `NOME` varchar(255) DEFAULT NULL, + `DESCRIZIONE` varchar(255) DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `categorie_utenti` +-- + +LOCK TABLES `categorie_utenti` WRITE; +/*!40000 ALTER TABLE `categorie_utenti` DISABLE KEYS */; +/*!40000 ALTER TABLE `categorie_utenti` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `prodotti` +-- + +DROP TABLE IF EXISTS `prodotti`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `prodotti` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `CODICE` varchar(255) DEFAULT NULL, + `NOME` varchar(255) DEFAULT NULL, + `DESCRIZIONE` varchar(255) DEFAULT NULL, + `ID_CATEGORIA` decimal(11,0) DEFAULT NULL, + `PREZZO_BASE` decimal(11,5) DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `FK_PROD_CAPR` (`ID_CATEGORIA`), + CONSTRAINT `FK_PROD_CAPR` FOREIGN KEY (`ID_CATEGORIA`) REFERENCES `categorie_prodotti` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `prodotti` +-- + +LOCK TABLES `prodotti` WRITE; +/*!40000 ALTER TABLE `prodotti` DISABLE KEYS */; +INSERT INTO `prodotti` VALUES (1,'123','Suppli',NULL,1,1.49000),(2,NULL,'Acqua minerale',NULL,10,1.00000),(3,NULL,'Brioche',NULL,11,1.00000),(4,NULL,'Caffe','',11,0.80000),(5,NULL,'Cappuccino',NULL,11,0.90000),(6,NULL,'Coca Cola lattina',NULL,10,2.00000),(7,NULL,'Frutta fresca',NULL,8,2.50000),(8,NULL,'Hamburger',NULL,6,4.00000),(9,NULL,'Hot dog',NULL,3,3.00000),(10,NULL,'Insalata nizzarda',NULL,2,3.50000),(11,NULL,'Insalata verde',NULL,7,2.50000),(12,NULL,'Menu cena',NULL,12,5.00000),(13,NULL,'Menu pranzo',NULL,12,6.00000),(14,NULL,'Menu colazione',NULL,12,2.50000),(15,NULL,'Omelette',NULL,6,3.00000),(16,NULL,'Pasta al ragu',NULL,5,2.00000),(17,NULL,'Pasta fredda',NULL,5,2.00000),(18,NULL,'Risotto',NULL,5,2.50000),(19,NULL,'Pizza margherita',NULL,1,3.00000),(20,NULL,'Prosciutto crudo',NULL,3,3.00000),(21,NULL,'Spremuta arancia',NULL,11,2.50000),(22,NULL,'Vetrino',NULL,11,1.00000),(23,NULL,'Tiramisu',NULL,8,NULL); +/*!40000 ALTER TABLE `prodotti` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `tariffe` +-- + +DROP TABLE IF EXISTS `tariffe`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tariffe` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `NUMERO` varchar(255) DEFAULT NULL, + `DATA_EMISSIONE` date DEFAULT NULL, + `DATA_SCADENZA` date DEFAULT NULL, + `ID_PROFILO_TARIFFA` decimal(11,0) DEFAULT NULL, + `ID_UTENTE` decimal(11,0) DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `tariffe` +-- + +LOCK TABLES `tariffe` WRITE; +/*!40000 ALTER TABLE `tariffe` DISABLE KEYS */; +/*!40000 ALTER TABLE `tariffe` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `tessere` +-- + +DROP TABLE IF EXISTS `tessere`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tessere` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `NUMERO` varchar(255) DEFAULT NULL, + `DATA_EMISSIONE` date DEFAULT NULL, + `DATA_SCADENZA` date DEFAULT NULL, + `ID_PROFILO_TARIFFA` decimal(11,0) DEFAULT NULL, + `ID_UTENTE` decimal(11,0) DEFAULT NULL, + `CREDITO` decimal(11,5) DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `FK_TESS_UTEN` (`ID_UTENTE`), + CONSTRAINT `FK_TESS_UTEN` FOREIGN KEY (`ID_UTENTE`) REFERENCES `utenti` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `tessere` +-- + +LOCK TABLES `tessere` WRITE; +/*!40000 ALTER TABLE `tessere` DISABLE KEYS */; +/*!40000 ALTER TABLE `tessere` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `utenti` +-- + +DROP TABLE IF EXISTS `utenti`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `utenti` ( + `ID` decimal(11,0) NOT NULL DEFAULT '0', + `COGNOME` varchar(255) DEFAULT NULL, + `NOME` varchar(255) DEFAULT NULL, + `CODICE_FISCALE` varchar(16) DEFAULT NULL, + `DATA_DI_NASCITA` date DEFAULT NULL, + `ID_LUOGO_NASCITA` decimal(11,0) DEFAULT NULL, + `INDIRIZZO` varchar(255) DEFAULT NULL, + `CAP` varchar(255) DEFAULT NULL, + `ID_LUOGO_RESIDENZA` decimal(11,0) DEFAULT NULL, + `TELEFONO` varchar(20) DEFAULT NULL, + `E_MAIL` varchar(255) DEFAULT NULL, + `ID_CATEGORIA` decimal(11,0) DEFAULT NULL, + `MATRICOLA` varchar(255) DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `FK_UTEN_CAUT` (`ID_CATEGORIA`), + CONSTRAINT `FK_UTEN_CAUT` FOREIGN KEY (`ID_CATEGORIA`) REFERENCES `categorie_utenti` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `utenti` +-- + +LOCK TABLES `utenti` WRITE; +/*!40000 ALTER TABLE `utenti` DISABLE KEYS */; +/*!40000 ALTER TABLE `utenti` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2013-10-30 18:38:02 diff --git a/DynamicReport/avalon-LICENSE.txt b/DynamicReport/avalon-LICENSE.txt new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/DynamicReport/avalon-LICENSE.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/DynamicReport/avalon-NOTICE.txt b/DynamicReport/avalon-NOTICE.txt new file mode 100644 index 0000000..281b318 --- /dev/null +++ b/DynamicReport/avalon-NOTICE.txt @@ -0,0 +1,11 @@ + ========================================================================= + == NOTICE file corresponding to the section 4 d of == + == the Apache License, Version 2.0, == + ========================================================================= + + This product is developed by the Apache Avalon Project. + http://avalon.apache.org + + The names "Avalon" and "Merlin" must not be used to endorse or promote + products derived from this software without prior written permission. + For written permission, please contact pmc@avalon.apache.org. diff --git a/DynamicReport/avalon-framework-impl-4.2.0.jar b/DynamicReport/avalon-framework-impl-4.2.0.jar new file mode 100644 index 0000000..ca61697 Binary files /dev/null and b/DynamicReport/avalon-framework-impl-4.2.0.jar differ diff --git a/DynamicReport/barbecue-1.5-beta1.jar b/DynamicReport/barbecue-1.5-beta1.jar new file mode 100644 index 0000000..a8fe1e3 Binary files /dev/null and b/DynamicReport/barbecue-1.5-beta1.jar differ diff --git a/DynamicReport/barbecue-LICENSE.txt b/DynamicReport/barbecue-LICENSE.txt new file mode 100644 index 0000000..0a420a9 --- /dev/null +++ b/DynamicReport/barbecue-LICENSE.txt @@ -0,0 +1,26 @@ +/*********************************************************************************************************************** +Copyright (c) 2003, International Barcode Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of + conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + * Neither the name of the International Barcode Consortium nor the names of any contributors may be used to endorse + or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************************************************************/ + diff --git a/DynamicReport/barcode4j-2.0.jar b/DynamicReport/barcode4j-2.0.jar new file mode 100644 index 0000000..0b91a46 Binary files /dev/null and b/DynamicReport/barcode4j-2.0.jar differ diff --git a/DynamicReport/barcode4j-LICENSE.txt b/DynamicReport/barcode4j-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/barcode4j-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/barcode4j-NOTICE.txt b/DynamicReport/barcode4j-NOTICE.txt new file mode 100644 index 0000000..4706f89 --- /dev/null +++ b/DynamicReport/barcode4j-NOTICE.txt @@ -0,0 +1,21 @@ +========================================================================= +== NOTICE file corresponding to section 4(d) of the Apache License, == +== Version 2.0, in this case for the Barcode4J distribution. == +========================================================================= + +Barcode4J +Copyright 2002-2008 Jeremias Märki +Copyright 2005-2006 Dietmar Bürkle + +Portions of this software were contributed under section 5 of the +Apache License. Contributors are listed under: +http://barcode4j.sourceforge.net/contributors.html + +This product includes software developed for project +Krysalis (http://www.krysalis.org/). + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +This product includes software developed by the +JDOM Project (http://www.jdom.org/). \ No newline at end of file diff --git a/DynamicReport/batik-LICENSE.txt b/DynamicReport/batik-LICENSE.txt new file mode 100644 index 0000000..1653b64 --- /dev/null +++ b/DynamicReport/batik-LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/batik-anim-1.7.jar b/DynamicReport/batik-anim-1.7.jar new file mode 100644 index 0000000..2a150b2 Binary files /dev/null and b/DynamicReport/batik-anim-1.7.jar differ diff --git a/DynamicReport/batik-awt-util-1.7.jar b/DynamicReport/batik-awt-util-1.7.jar new file mode 100644 index 0000000..f83b5bd Binary files /dev/null and b/DynamicReport/batik-awt-util-1.7.jar differ diff --git a/DynamicReport/batik-bridge-1.7.jar b/DynamicReport/batik-bridge-1.7.jar new file mode 100644 index 0000000..872cf27 Binary files /dev/null and b/DynamicReport/batik-bridge-1.7.jar differ diff --git a/DynamicReport/batik-css-1.7.jar b/DynamicReport/batik-css-1.7.jar new file mode 100644 index 0000000..ef3013d Binary files /dev/null and b/DynamicReport/batik-css-1.7.jar differ diff --git a/DynamicReport/batik-dom-1.7.jar b/DynamicReport/batik-dom-1.7.jar new file mode 100644 index 0000000..0206475 Binary files /dev/null and b/DynamicReport/batik-dom-1.7.jar differ diff --git a/DynamicReport/batik-ext-1.7.jar b/DynamicReport/batik-ext-1.7.jar new file mode 100644 index 0000000..57fb273 Binary files /dev/null and b/DynamicReport/batik-ext-1.7.jar differ diff --git a/DynamicReport/batik-gvt-1.7.jar b/DynamicReport/batik-gvt-1.7.jar new file mode 100644 index 0000000..9aa9686 Binary files /dev/null and b/DynamicReport/batik-gvt-1.7.jar differ diff --git a/DynamicReport/batik-parser-1.7.jar b/DynamicReport/batik-parser-1.7.jar new file mode 100644 index 0000000..b84ad36 Binary files /dev/null and b/DynamicReport/batik-parser-1.7.jar differ diff --git a/DynamicReport/batik-script-1.7.jar b/DynamicReport/batik-script-1.7.jar new file mode 100644 index 0000000..a684f1c Binary files /dev/null and b/DynamicReport/batik-script-1.7.jar differ diff --git a/DynamicReport/batik-svg-dom-1.7.jar b/DynamicReport/batik-svg-dom-1.7.jar new file mode 100644 index 0000000..463d0e0 Binary files /dev/null and b/DynamicReport/batik-svg-dom-1.7.jar differ diff --git a/DynamicReport/batik-util-1.7.jar b/DynamicReport/batik-util-1.7.jar new file mode 100644 index 0000000..c50d1ff Binary files /dev/null and b/DynamicReport/batik-util-1.7.jar differ diff --git a/DynamicReport/batik-xml-1.7.jar b/DynamicReport/batik-xml-1.7.jar new file mode 100644 index 0000000..45ba157 Binary files /dev/null and b/DynamicReport/batik-xml-1.7.jar differ diff --git a/DynamicReport/bcprov-LICENSE.txt b/DynamicReport/bcprov-LICENSE.txt new file mode 100644 index 0000000..3676bd6 --- /dev/null +++ b/DynamicReport/bcprov-LICENSE.txt @@ -0,0 +1,7 @@ +Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/DynamicReport/bcprov-jdk14-138.jar b/DynamicReport/bcprov-jdk14-138.jar new file mode 100644 index 0000000..d1befb7 Binary files /dev/null and b/DynamicReport/bcprov-jdk14-138.jar differ diff --git a/DynamicReport/commons-LICENSE.txt b/DynamicReport/commons-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/commons-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/commons-NOTICE.txt b/DynamicReport/commons-NOTICE.txt new file mode 100644 index 0000000..439eb83 --- /dev/null +++ b/DynamicReport/commons-NOTICE.txt @@ -0,0 +1,3 @@ +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/DynamicReport/commons-beanutils-1.8.0.jar b/DynamicReport/commons-beanutils-1.8.0.jar new file mode 100644 index 0000000..caf7ae3 Binary files /dev/null and b/DynamicReport/commons-beanutils-1.8.0.jar differ diff --git a/DynamicReport/commons-collections-3.2.1.jar b/DynamicReport/commons-collections-3.2.1.jar new file mode 100644 index 0000000..c35fa1f Binary files /dev/null and b/DynamicReport/commons-collections-3.2.1.jar differ diff --git a/DynamicReport/commons-digester-2.1.jar b/DynamicReport/commons-digester-2.1.jar new file mode 100644 index 0000000..a07cfa8 Binary files /dev/null and b/DynamicReport/commons-digester-2.1.jar differ diff --git a/DynamicReport/commons-lang-2.5.jar b/DynamicReport/commons-lang-2.5.jar new file mode 100644 index 0000000..ae491da Binary files /dev/null and b/DynamicReport/commons-lang-2.5.jar differ diff --git a/DynamicReport/commons-lang3-3.1.jar b/DynamicReport/commons-lang3-3.1.jar new file mode 100644 index 0000000..a85e539 Binary files /dev/null and b/DynamicReport/commons-lang3-3.1.jar differ diff --git a/DynamicReport/commons-logging-1.1.1.jar b/DynamicReport/commons-logging-1.1.1.jar new file mode 100644 index 0000000..1deef14 Binary files /dev/null and b/DynamicReport/commons-logging-1.1.1.jar differ diff --git a/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar b/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar new file mode 100644 index 0000000..c3e5324 Binary files /dev/null and b/DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar differ diff --git a/DynamicReport/dynamicreports-adhoc-3.2.0.jar b/DynamicReport/dynamicreports-adhoc-3.2.0.jar new file mode 100644 index 0000000..54af925 Binary files /dev/null and b/DynamicReport/dynamicreports-adhoc-3.2.0.jar differ diff --git a/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar b/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar new file mode 100644 index 0000000..2ae8ab3 Binary files /dev/null and b/DynamicReport/dynamicreports-core-3.2.0-javadoc.jar differ diff --git a/DynamicReport/dynamicreports-core-3.2.0-sources.jar b/DynamicReport/dynamicreports-core-3.2.0-sources.jar new file mode 100644 index 0000000..f8d78e8 Binary files /dev/null and b/DynamicReport/dynamicreports-core-3.2.0-sources.jar differ diff --git a/DynamicReport/dynamicreports-core-3.2.0.jar b/DynamicReport/dynamicreports-core-3.2.0.jar new file mode 100644 index 0000000..d44b039 Binary files /dev/null and b/DynamicReport/dynamicreports-core-3.2.0.jar differ diff --git a/DynamicReport/dynamicreports-examples-3.2.0-sources.jar b/DynamicReport/dynamicreports-examples-3.2.0-sources.jar new file mode 100644 index 0000000..4d03fe3 Binary files /dev/null and b/DynamicReport/dynamicreports-examples-3.2.0-sources.jar differ diff --git a/DynamicReport/dynamicreports-examples-3.2.0.jar b/DynamicReport/dynamicreports-examples-3.2.0.jar new file mode 100644 index 0000000..693689d Binary files /dev/null and b/DynamicReport/dynamicreports-examples-3.2.0.jar differ diff --git a/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar b/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar new file mode 100644 index 0000000..f0fa281 Binary files /dev/null and b/DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar differ diff --git a/DynamicReport/dynamicreports-googlecharts-3.2.0.jar b/DynamicReport/dynamicreports-googlecharts-3.2.0.jar new file mode 100644 index 0000000..8814b39 Binary files /dev/null and b/DynamicReport/dynamicreports-googlecharts-3.2.0.jar differ diff --git a/DynamicReport/hsqldb-1.8.0.10.jar b/DynamicReport/hsqldb-1.8.0.10.jar new file mode 100644 index 0000000..e010269 Binary files /dev/null and b/DynamicReport/hsqldb-1.8.0.10.jar differ diff --git a/DynamicReport/hsqldb-LICENSE.txt b/DynamicReport/hsqldb-LICENSE.txt new file mode 100644 index 0000000..a53f073 --- /dev/null +++ b/DynamicReport/hsqldb-LICENSE.txt @@ -0,0 +1,67 @@ +COPYRIGHTS AND LICENSES (based on BSD License) + +For work developed by the HSQL Development Group: + +Copyright (c) 2001-2010, The HSQL Development Group +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither the name of the HSQL Development Group nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For work originally developed by the Hypersonic SQL Group: + +Copyright (c) 1995-2000 by the Hypersonic SQL Group. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither the name of the Hypersonic SQL Group nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This software consists of voluntary contributions made by many individuals on behalf of the +Hypersonic SQL Group. \ No newline at end of file diff --git a/DynamicReport/iText-LICENSE.txt b/DynamicReport/iText-LICENSE.txt new file mode 100644 index 0000000..6a61e91 --- /dev/null +++ b/DynamicReport/iText-LICENSE.txt @@ -0,0 +1,437 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. +. + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. +. + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. +. + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +. + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +. + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +. + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. +. + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +. + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/DynamicReport/itext-2.1.7.js2.jar b/DynamicReport/itext-2.1.7.js2.jar new file mode 100644 index 0000000..5d319fc Binary files /dev/null and b/DynamicReport/itext-2.1.7.js2.jar differ diff --git a/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt b/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/jackson-annotations-2.0.5-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/jackson-annotations-2.1.4.jar b/DynamicReport/jackson-annotations-2.1.4.jar new file mode 100644 index 0000000..143edf4 Binary files /dev/null and b/DynamicReport/jackson-annotations-2.1.4.jar differ diff --git a/DynamicReport/jackson-core-2.0.5-LICENSE.txt b/DynamicReport/jackson-core-2.0.5-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/jackson-core-2.0.5-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/jackson-core-2.1.4.jar b/DynamicReport/jackson-core-2.1.4.jar new file mode 100644 index 0000000..0f14468 Binary files /dev/null and b/DynamicReport/jackson-core-2.1.4.jar differ diff --git a/DynamicReport/jackson-databind-2.0.5-LICENSE.txt b/DynamicReport/jackson-databind-2.0.5-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/jackson-databind-2.0.5-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/jackson-databind-2.1.4.jar b/DynamicReport/jackson-databind-2.1.4.jar new file mode 100644 index 0000000..ce125d1 Binary files /dev/null and b/DynamicReport/jackson-databind-2.1.4.jar differ diff --git a/DynamicReport/jasperreports-5.5.1.jar b/DynamicReport/jasperreports-5.5.1.jar new file mode 100644 index 0000000..b22c6b4 Binary files /dev/null and b/DynamicReport/jasperreports-5.5.1.jar differ diff --git a/DynamicReport/jasperreports-LICENSE.txt b/DynamicReport/jasperreports-LICENSE.txt new file mode 100644 index 0000000..cca7fc2 --- /dev/null +++ b/DynamicReport/jasperreports-LICENSE.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/DynamicReport/jcommon-1.0.15.jar b/DynamicReport/jcommon-1.0.15.jar new file mode 100644 index 0000000..d0dc26d Binary files /dev/null and b/DynamicReport/jcommon-1.0.15.jar differ diff --git a/DynamicReport/jcommon-LICENSE.txt b/DynamicReport/jcommon-LICENSE.txt new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/DynamicReport/jcommon-LICENSE.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/DynamicReport/jdtcore-3.1.0.jar b/DynamicReport/jdtcore-3.1.0.jar new file mode 100644 index 0000000..d920738 Binary files /dev/null and b/DynamicReport/jdtcore-3.1.0.jar differ diff --git a/DynamicReport/jdtcore-LICENSE.txt b/DynamicReport/jdtcore-LICENSE.txt new file mode 100644 index 0000000..aa7cc81 --- /dev/null +++ b/DynamicReport/jdtcore-LICENSE.txt @@ -0,0 +1,87 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/DynamicReport/jfreechart-1.0.12.jar b/DynamicReport/jfreechart-1.0.12.jar new file mode 100644 index 0000000..73be90f Binary files /dev/null and b/DynamicReport/jfreechart-1.0.12.jar differ diff --git a/DynamicReport/jfreechart-LICENSE.txt b/DynamicReport/jfreechart-LICENSE.txt new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/DynamicReport/jfreechart-LICENSE.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/DynamicReport/json-20080701.jar b/DynamicReport/json-20080701.jar new file mode 100644 index 0000000..c9a093e Binary files /dev/null and b/DynamicReport/json-20080701.jar differ diff --git a/DynamicReport/jxl-2.6.10.jar b/DynamicReport/jxl-2.6.10.jar new file mode 100644 index 0000000..a2eced5 Binary files /dev/null and b/DynamicReport/jxl-2.6.10.jar differ diff --git a/DynamicReport/jxl-LICENSE.txt b/DynamicReport/jxl-LICENSE.txt new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/DynamicReport/jxl-LICENSE.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/DynamicReport/log4j-1.2.14.jar b/DynamicReport/log4j-1.2.14.jar new file mode 100644 index 0000000..6251307 Binary files /dev/null and b/DynamicReport/log4j-1.2.14.jar differ diff --git a/DynamicReport/log4j-LICENSE.txt b/DynamicReport/log4j-LICENSE.txt new file mode 100644 index 0000000..6279e52 --- /dev/null +++ b/DynamicReport/log4j-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 1999-2005 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/poi-3.7.jar b/DynamicReport/poi-3.7.jar new file mode 100644 index 0000000..a08d953 Binary files /dev/null and b/DynamicReport/poi-3.7.jar differ diff --git a/DynamicReport/poi-LICENSE.txt b/DynamicReport/poi-LICENSE.txt new file mode 100644 index 0000000..3f40d40 --- /dev/null +++ b/DynamicReport/poi-LICENSE.txt @@ -0,0 +1,507 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +APACHE POI SUBCOMPONENTS: + +Apache POI includes subcomponents with separate copyright notices and +license terms. Your use of these subcomponents is subject to the terms +and conditions of the following licenses: + + +Office Open XML schemas (ooxml-schemas-1.0.jar) + + The Office Open XML schema definitions used by Apache POI are + a part of the Office Open XML ECMA Specification (ECMA-376, [1]). + As defined in section 9.4 of the ECMA bylaws [2], this specification + is available to all interested parties without restriction: + + 9.4 All documents when approved shall be made available to + all interested parties without restriction. + + Furthermore, both Microsoft and Adobe have granted patent licenses + to this work [3,4,5]. + + [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm + [2] http://www.ecma-international.org/memento/Ecmabylaws.htm + [3] http://www.microsoft.com/interop/osp/ + [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ECMA-376%20Edition%201%20Microsoft%20Patent%20Declaration.pdf + [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/ga-2006-191.pdf + + +DOM4J library (dom4j-1.6.1.jar) + + Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. + + Redistribution and use of this software and associated documentation + ("Software"), with or without modification, are permitted provided + that the following conditions are met: + + 1. Redistributions of source code must retain copyright + statements and notices. Redistributions must also contain a + copy of this document. + + 2. Redistributions in binary form must reproduce the + above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + + 3. The name "DOM4J" must not be used to endorse or promote + products derived from this Software without prior written + permission of MetaStuff, Ltd. For written permission, + please contact dom4j-info@metastuff.com. + + 4. Products derived from this Software may not be called "DOM4J" + nor may "DOM4J" appear in their names without prior written + permission of MetaStuff, Ltd. DOM4J is a registered + trademark of MetaStuff, Ltd. + + 5. Due credit should be given to the DOM4J Project - + http://www.dom4j.org + + THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + + +JUnit test library (junit-3.8.1.jar) + + Common Public License - v 1.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + + 1. DEFINITIONS + + "Contribution" means: + + a) in the case of the initial Contributor, the initial code and + documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from + and are distributed by that particular Contributor. A Contribution + 'originates' from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include additions to the Program which: (i) are + separate modules of software distributed in conjunction with the + Program under their own license agreement, and (ii) are not derivative + works of the Program. + + "Contributor" means any person or entity that distributes the Program. + + "Licensed Patents " mean patent claims licensable by a Contributor which + are necessarily infringed by the use or sale of its Contribution alone + or when combined with the Program. + + "Program" means the Contributions distributed in accordance with this + Agreement. + + "Recipient" means anyone who receives the Program under this Agreement, + including all Contributors. + + 2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free copyright license + to reproduce, prepare derivative works of, publicly display, publicly + perform, distribute and sublicense the Contribution of such + Contributor, if any, and such derivative works, in source code and + object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free patent license under + Licensed Patents to make, use, sell, offer to sell, import and + otherwise transfer the Contribution of such Contributor, if any, in + source code and object code form. This patent license shall apply to + the combination of the Contribution and the Program if, at the time + the Contribution is added by the Contributor, such addition of the + Contribution causes such combination to be covered by the Licensed + Patents. The patent license shall not apply to any other combinations + which include the Contribution. No hardware per se is licensed + hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the rights + and licenses granted hereunder, each Recipient hereby assumes sole + responsibility to secure any other intellectual property rights + needed, if any. For example, if a third party patent license is + required to allow Recipient to distribute the Program, it is + Recipient's responsibility to acquire that license before + distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. + + 3. REQUIREMENTS + + A Contributor may choose to distribute the Program in object code form + under its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties + or conditions of merchantability and fitness for a particular + purpose; + + ii) effectively excludes on behalf of all Contributors all liability + for damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a + reasonable manner on or through a medium customarily used for + software exchange. + + When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of + the Program. + + Contributors may not remove or alter any copyright notices contained + within the Program. + + Each Contributor must identify itself as the originator of its + Contribution, if any, in a manner that reasonably allows subsequent + Recipients to identify the originator of the Contribution. + + 4. COMMERCIAL DISTRIBUTION + + Commercial distributors of software may accept certain responsibilities + with respect to end users, business partners and the like. While this + license is intended to facilitate the commercial use of the Program, + the Contributor who includes the Program in a commercial product offering + should do so in a manner which does not create potential liability for + other Contributors. Therefore, if a Contributor includes the Program + in a commercial product offering, such Contributor ("Commercial + Contributor") hereby agrees to defend and indemnify every other + Contributor ("Indemnified Contributor") against any losses, damages + and costs (collectively "Losses") arising from claims, lawsuits and + other legal actions brought by a third party against the Indemnified + Contributor to the extent caused by the acts or omissions of such + Commercial Contributor in connection with its distribution of the + Program in a commercial product offering. The obligations in this + section do not apply to any claims or Losses relating to any actual + or alleged intellectual property infringement. In order to qualify, + an Indemnified Contributor must: a) promptly notify the Commercial + Contributor in writing of such claim, and b) allow the Commercial + Contributor to control, and cooperate with the Commercial Contributor + in, the defense and any related settlement negotiations. The Indemnified + Contributor may participate in any such claim at its own expense. + + For example, a Contributor might include the Program in a commercial + product offering, Product X. That Contributor is then a Commercial + Contributor. If that Commercial Contributor then makes performance + claims, or offers warranties related to Product X, those performance + claims and warranties are such Commercial Contributor's responsibility + alone. Under this section, the Commercial Contributor would have to + defend claims against the other Contributors related to those + performance claims and warranties, and if a court requires any other + Contributor to pay any damages as a result, the Commercial Contributor + must pay those damages. + + 5. NO WARRANTY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED + ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER + EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR + CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR + A PARTICULAR PURPOSE. Each Recipient is solely responsible for + determining the appropriateness of using and distributing the Program + and assumes all risks associated with its exercise of rights under this + Agreement, including but not limited to the risks and costs of program + errors, compliance with applicable laws, damage to or loss of data, + programs or equipment, and unavailability or interruption of operations. + + 6. DISCLAIMER OF LIABILITY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR + ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING + WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR + DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED + HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + 7. GENERAL + + If any provision of this Agreement is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this Agreement, and without further + action by the parties hereto, such provision shall be reformed to the + minimum extent necessary to make such provision valid and enforceable. + + If Recipient institutes patent litigation against a Contributor with + respect to a patent applicable to software (including a cross-claim or + counterclaim in a lawsuit), then any patent licenses granted by that + Contributor to such Recipient under this Agreement shall terminate as of + the date such litigation is filed. In addition, if Recipient institutes + patent litigation against any entity (including a cross-claim or + counterclaim in a lawsuit) alleging that the Program itself (excluding + combinations of the Program with other software or hardware) infringes + such Recipient's patent(s), then such Recipient's rights granted under + Section 2(b) shall terminate as of the date such litigation is filed. + + All Recipient's rights under this Agreement shall terminate if it fails + to comply with any of the material terms or conditions of this Agreement + and does not cure such failure in a reasonable period of time after + becoming aware of such noncompliance. If all Recipient's rights under + this Agreement terminate, Recipient agrees to cease use and distribution + of the Program as soon as reasonably practicable. However, Recipient's + obligations under this Agreement and any licenses granted by Recipient + relating to the Program shall continue and survive. + + Everyone is permitted to copy and distribute copies of this Agreement, + but in order to avoid inconsistency the Agreement is copyrighted and may + only be modified in the following manner. The Agreement Steward reserves + the right to publish new versions (including revisions) of this Agreement + from time to time. No one other than the Agreement Steward has the right + to modify this Agreement. IBM is the initial Agreement Steward. IBM may + assign the responsibility to serve as the Agreement Steward to a suitable + separate entity. Each new version of the Agreement will be given a + distinguishing version number. The Program (including Contributions) may + always be distributed subject to the version of the Agreement under which + it was received. In addition, after a new version of the Agreement is + published, Contributor may elect to distribute the Program (including + its Contributions) under the new version. Except as expressly stated in + Sections 2(a) and 2(b) above, Recipient receives no rights or licenses + to the intellectual property of any Contributor under this Agreement, + whether expressly, by implication, estoppel or otherwise. All rights in + the Program not expressly granted under this Agreement are reserved. + + This Agreement is governed by the laws of the State of New York and the + intellectual property laws of the United States of America. No party to + this Agreement will bring a legal action under this Agreement more than + one year after the cause of action arose. Each party waives its rights + to a jury trial in any resulting litigation. diff --git a/DynamicReport/poi-NOTICE.txt b/DynamicReport/poi-NOTICE.txt new file mode 100644 index 0000000..6d9855f --- /dev/null +++ b/DynamicReport/poi-NOTICE.txt @@ -0,0 +1,21 @@ +Apache POI +Copyright 2009 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +This product contains the DOM4J library (http://www.dom4j.org). +Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. + +This product contains parts that were originally based on software from BEA. +Copyright (c) 2000-2003, BEA Systems, . + +This product contains W3C XML Schema documents. Copyright 2001-2003 (c) +World Wide Web Consortium (Massachusetts Institute of Technology, European +Research Consortium for Informatics and Mathematics, Keio University) + +This product contains the Piccolo XML Parser for Java +(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren. + +This product contains the chunks_parse_cmds.tbl file from the vsdump program. +Copyright (C) 2006-2007 Valek Filippov (frob@df.ru) diff --git a/DynamicReport/serializer-2.7.1.jar b/DynamicReport/serializer-2.7.1.jar new file mode 100644 index 0000000..99f98db Binary files /dev/null and b/DynamicReport/serializer-2.7.1.jar differ diff --git a/DynamicReport/serializer-LICENSE.txt b/DynamicReport/serializer-LICENSE.txt new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/DynamicReport/serializer-LICENSE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/DynamicReport/servlet-api-2.4.jar b/DynamicReport/servlet-api-2.4.jar new file mode 100644 index 0000000..dd326d3 Binary files /dev/null and b/DynamicReport/servlet-api-2.4.jar differ diff --git a/DynamicReport/spring-LICENSE.txt b/DynamicReport/spring-LICENSE.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/DynamicReport/spring-LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/spring-beans-2.5.jar b/DynamicReport/spring-beans-2.5.jar new file mode 100644 index 0000000..4d6a4bf Binary files /dev/null and b/DynamicReport/spring-beans-2.5.jar differ diff --git a/DynamicReport/spring-core-2.5.jar b/DynamicReport/spring-core-2.5.jar new file mode 100644 index 0000000..7347707 Binary files /dev/null and b/DynamicReport/spring-core-2.5.jar differ diff --git a/DynamicReport/velocity-1.7.jar b/DynamicReport/velocity-1.7.jar new file mode 100644 index 0000000..ae936d3 Binary files /dev/null and b/DynamicReport/velocity-1.7.jar differ diff --git a/DynamicReport/velocity-LICENSE.txt b/DynamicReport/velocity-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/velocity-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/xalan-2.7.1.jar b/DynamicReport/xalan-2.7.1.jar new file mode 100644 index 0000000..458fa73 Binary files /dev/null and b/DynamicReport/xalan-2.7.1.jar differ diff --git a/DynamicReport/xalan-LICENSE.txt b/DynamicReport/xalan-LICENSE.txt new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/DynamicReport/xalan-LICENSE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/DynamicReport/xml-apis-1.3.04.jar b/DynamicReport/xml-apis-1.3.04.jar new file mode 100644 index 0000000..d42c0ea Binary files /dev/null and b/DynamicReport/xml-apis-1.3.04.jar differ diff --git a/DynamicReport/xml-apis-LICENSE.txt b/DynamicReport/xml-apis-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/DynamicReport/xml-apis-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/DynamicReport/xml-apis-NOTICE.txt b/DynamicReport/xml-apis-NOTICE.txt new file mode 100644 index 0000000..4544ce7 --- /dev/null +++ b/DynamicReport/xml-apis-NOTICE.txt @@ -0,0 +1,13 @@ + ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the Apache xml-commons xml-apis == + == distribution. == + ========================================================================= + + This product includes software developed by + The Apache Software Foundation (http://www.apache.org/). + + Portions of this software were originally based on the following: + - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. + - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. + - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org diff --git a/DynamicReport/xml-apis-ext-1.3.04.jar b/DynamicReport/xml-apis-ext-1.3.04.jar new file mode 100644 index 0000000..a7869d6 Binary files /dev/null and b/DynamicReport/xml-apis-ext-1.3.04.jar differ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..a032931 --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Cassa. + + + diff --git a/build/built-jar.properties b/build/built-jar.properties new file mode 100644 index 0000000..90b249d --- /dev/null +++ b/build/built-jar.properties @@ -0,0 +1,4 @@ +#Wed, 18 Jan 2023 16:12:06 +0100 + + +G\:\\Lavoro\\Goffredo\\Cassa= diff --git a/build/classes/Cassa.jar b/build/classes/Cassa.jar new file mode 100644 index 0000000..69078d1 Binary files /dev/null and b/build/classes/Cassa.jar differ diff --git a/build/classes/SmartCard/APDUCommandBoxing.class b/build/classes/SmartCard/APDUCommandBoxing.class new file mode 100644 index 0000000..2bf8440 Binary files /dev/null and b/build/classes/SmartCard/APDUCommandBoxing.class differ diff --git a/build/classes/SmartCard/CardList.class b/build/classes/SmartCard/CardList.class new file mode 100644 index 0000000..5d2bce2 Binary files /dev/null and b/build/classes/SmartCard/CardList.class differ diff --git a/build/classes/SmartCard/FrmMain$1.class b/build/classes/SmartCard/FrmMain$1.class new file mode 100644 index 0000000..80cb3e8 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$1.class differ diff --git a/build/classes/SmartCard/FrmMain$10.class b/build/classes/SmartCard/FrmMain$10.class new file mode 100644 index 0000000..13649f0 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$10.class differ diff --git a/build/classes/SmartCard/FrmMain$11.class b/build/classes/SmartCard/FrmMain$11.class new file mode 100644 index 0000000..124b21d Binary files /dev/null and b/build/classes/SmartCard/FrmMain$11.class differ diff --git a/build/classes/SmartCard/FrmMain$12.class b/build/classes/SmartCard/FrmMain$12.class new file mode 100644 index 0000000..a6aaab9 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$12.class differ diff --git a/build/classes/SmartCard/FrmMain$13.class b/build/classes/SmartCard/FrmMain$13.class new file mode 100644 index 0000000..bfc5084 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$13.class differ diff --git a/build/classes/SmartCard/FrmMain$14.class b/build/classes/SmartCard/FrmMain$14.class new file mode 100644 index 0000000..5e4f7e5 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$14.class differ diff --git a/build/classes/SmartCard/FrmMain$15.class b/build/classes/SmartCard/FrmMain$15.class new file mode 100644 index 0000000..e4743e5 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$15.class differ diff --git a/build/classes/SmartCard/FrmMain$16.class b/build/classes/SmartCard/FrmMain$16.class new file mode 100644 index 0000000..762cf48 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$16.class differ diff --git a/build/classes/SmartCard/FrmMain$17.class b/build/classes/SmartCard/FrmMain$17.class new file mode 100644 index 0000000..c0a6866 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$17.class differ diff --git a/build/classes/SmartCard/FrmMain$18.class b/build/classes/SmartCard/FrmMain$18.class new file mode 100644 index 0000000..c2fb05b Binary files /dev/null and b/build/classes/SmartCard/FrmMain$18.class differ diff --git a/build/classes/SmartCard/FrmMain$19.class b/build/classes/SmartCard/FrmMain$19.class new file mode 100644 index 0000000..356930f Binary files /dev/null and b/build/classes/SmartCard/FrmMain$19.class differ diff --git a/build/classes/SmartCard/FrmMain$2.class b/build/classes/SmartCard/FrmMain$2.class new file mode 100644 index 0000000..50107d9 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$2.class differ diff --git a/build/classes/SmartCard/FrmMain$20.class b/build/classes/SmartCard/FrmMain$20.class new file mode 100644 index 0000000..89c38fc Binary files /dev/null and b/build/classes/SmartCard/FrmMain$20.class differ diff --git a/build/classes/SmartCard/FrmMain$21.class b/build/classes/SmartCard/FrmMain$21.class new file mode 100644 index 0000000..bac3ef6 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$21.class differ diff --git a/build/classes/SmartCard/FrmMain$22.class b/build/classes/SmartCard/FrmMain$22.class new file mode 100644 index 0000000..b29572a Binary files /dev/null and b/build/classes/SmartCard/FrmMain$22.class differ diff --git a/build/classes/SmartCard/FrmMain$23.class b/build/classes/SmartCard/FrmMain$23.class new file mode 100644 index 0000000..21d5ba6 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$23.class differ diff --git a/build/classes/SmartCard/FrmMain$24.class b/build/classes/SmartCard/FrmMain$24.class new file mode 100644 index 0000000..351a25f Binary files /dev/null and b/build/classes/SmartCard/FrmMain$24.class differ diff --git a/build/classes/SmartCard/FrmMain$3.class b/build/classes/SmartCard/FrmMain$3.class new file mode 100644 index 0000000..02f2e55 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$3.class differ diff --git a/build/classes/SmartCard/FrmMain$4.class b/build/classes/SmartCard/FrmMain$4.class new file mode 100644 index 0000000..56c39af Binary files /dev/null and b/build/classes/SmartCard/FrmMain$4.class differ diff --git a/build/classes/SmartCard/FrmMain$5.class b/build/classes/SmartCard/FrmMain$5.class new file mode 100644 index 0000000..711828a Binary files /dev/null and b/build/classes/SmartCard/FrmMain$5.class differ diff --git a/build/classes/SmartCard/FrmMain$6.class b/build/classes/SmartCard/FrmMain$6.class new file mode 100644 index 0000000..ae6ced5 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$6.class differ diff --git a/build/classes/SmartCard/FrmMain$7.class b/build/classes/SmartCard/FrmMain$7.class new file mode 100644 index 0000000..bce95ac Binary files /dev/null and b/build/classes/SmartCard/FrmMain$7.class differ diff --git a/build/classes/SmartCard/FrmMain$8.class b/build/classes/SmartCard/FrmMain$8.class new file mode 100644 index 0000000..cdd3f87 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$8.class differ diff --git a/build/classes/SmartCard/FrmMain$9.class b/build/classes/SmartCard/FrmMain$9.class new file mode 100644 index 0000000..5a45b1a Binary files /dev/null and b/build/classes/SmartCard/FrmMain$9.class differ diff --git a/build/classes/SmartCard/FrmMain$APDUSet.class b/build/classes/SmartCard/FrmMain$APDUSet.class new file mode 100644 index 0000000..157b762 Binary files /dev/null and b/build/classes/SmartCard/FrmMain$APDUSet.class differ diff --git a/build/classes/SmartCard/FrmMain.class b/build/classes/SmartCard/FrmMain.class new file mode 100644 index 0000000..068d234 Binary files /dev/null and b/build/classes/SmartCard/FrmMain.class differ diff --git a/build/classes/SmartCard/ISO7816FileSystem$DF.class b/build/classes/SmartCard/ISO7816FileSystem$DF.class new file mode 100644 index 0000000..94bf78d Binary files /dev/null and b/build/classes/SmartCard/ISO7816FileSystem$DF.class differ diff --git a/build/classes/SmartCard/ISO7816FileSystem$EF.class b/build/classes/SmartCard/ISO7816FileSystem$EF.class new file mode 100644 index 0000000..28d714e Binary files /dev/null and b/build/classes/SmartCard/ISO7816FileSystem$EF.class differ diff --git a/build/classes/SmartCard/ISO7816FileSystem.class b/build/classes/SmartCard/ISO7816FileSystem.class new file mode 100644 index 0000000..732e514 Binary files /dev/null and b/build/classes/SmartCard/ISO7816FileSystem.class differ diff --git a/build/classes/SmartCard/ISO7816Response.class b/build/classes/SmartCard/ISO7816Response.class new file mode 100644 index 0000000..32d6e58 Binary files /dev/null and b/build/classes/SmartCard/ISO7816Response.class differ diff --git a/build/classes/SmartCard/Main$1.class b/build/classes/SmartCard/Main$1.class new file mode 100644 index 0000000..1acc44d Binary files /dev/null and b/build/classes/SmartCard/Main$1.class differ diff --git a/build/classes/SmartCard/Main.class b/build/classes/SmartCard/Main.class new file mode 100644 index 0000000..2a8b625 Binary files /dev/null and b/build/classes/SmartCard/Main.class differ diff --git a/build/classes/SmartCard/SmartCard.class b/build/classes/SmartCard/SmartCard.class new file mode 100644 index 0000000..6d71399 Binary files /dev/null and b/build/classes/SmartCard/SmartCard.class differ diff --git a/build/classes/SmartCard/StringUtil.class b/build/classes/SmartCard/StringUtil.class new file mode 100644 index 0000000..98ae695 Binary files /dev/null and b/build/classes/SmartCard/StringUtil.class differ diff --git a/build/classes/puntocassa/ComboItem.class b/build/classes/puntocassa/ComboItem.class new file mode 100644 index 0000000..0ee5a30 Binary files /dev/null and b/build/classes/puntocassa/ComboItem.class differ diff --git a/build/classes/puntocassa/DecimalFormatRenderer.class b/build/classes/puntocassa/DecimalFormatRenderer.class new file mode 100644 index 0000000..559e8d6 Binary files /dev/null and b/build/classes/puntocassa/DecimalFormatRenderer.class differ diff --git a/build/classes/puntocassa/Encoding.class b/build/classes/puntocassa/Encoding.class new file mode 100644 index 0000000..3581e78 Binary files /dev/null and b/build/classes/puntocassa/Encoding.class differ diff --git a/build/classes/puntocassa/JEnhancedOptionPane.class b/build/classes/puntocassa/JEnhancedOptionPane.class new file mode 100644 index 0000000..b6f20cd Binary files /dev/null and b/build/classes/puntocassa/JEnhancedOptionPane.class differ diff --git a/build/classes/puntocassa/JInternalReport.class b/build/classes/puntocassa/JInternalReport.class new file mode 100644 index 0000000..0908fdc Binary files /dev/null and b/build/classes/puntocassa/JInternalReport.class differ diff --git a/build/classes/puntocassa/JPnlPagamenti$1.class b/build/classes/puntocassa/JPnlPagamenti$1.class new file mode 100644 index 0000000..ea10308 Binary files /dev/null and b/build/classes/puntocassa/JPnlPagamenti$1.class differ diff --git a/build/classes/puntocassa/JPnlPagamenti.class b/build/classes/puntocassa/JPnlPagamenti.class new file mode 100644 index 0000000..2af045a Binary files /dev/null and b/build/classes/puntocassa/JPnlPagamenti.class differ diff --git a/build/classes/puntocassa/MyApplication.class b/build/classes/puntocassa/MyApplication.class new file mode 100644 index 0000000..d5e7b43 Binary files /dev/null and b/build/classes/puntocassa/MyApplication.class differ diff --git a/build/classes/puntocassa/MyDialog$1.class b/build/classes/puntocassa/MyDialog$1.class new file mode 100644 index 0000000..8666333 Binary files /dev/null and b/build/classes/puntocassa/MyDialog$1.class differ diff --git a/build/classes/puntocassa/MyDialog$2.class b/build/classes/puntocassa/MyDialog$2.class new file mode 100644 index 0000000..3d31aef Binary files /dev/null and b/build/classes/puntocassa/MyDialog$2.class differ diff --git a/build/classes/puntocassa/MyDialog.class b/build/classes/puntocassa/MyDialog.class new file mode 100644 index 0000000..d757a11 Binary files /dev/null and b/build/classes/puntocassa/MyDialog.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$1.class b/build/classes/puntocassa/MyKeyBoard$1.class new file mode 100644 index 0000000..148db54 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$1.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$2.class b/build/classes/puntocassa/MyKeyBoard$2.class new file mode 100644 index 0000000..55ee00d Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$2.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$3.class b/build/classes/puntocassa/MyKeyBoard$3.class new file mode 100644 index 0000000..5420262 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$3.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$4.class b/build/classes/puntocassa/MyKeyBoard$4.class new file mode 100644 index 0000000..5623277 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$4.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$5.class b/build/classes/puntocassa/MyKeyBoard$5.class new file mode 100644 index 0000000..951d183 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$5.class differ diff --git a/build/classes/puntocassa/MyKeyBoard$ListenerPulsanti.class b/build/classes/puntocassa/MyKeyBoard$ListenerPulsanti.class new file mode 100644 index 0000000..effd712 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard$ListenerPulsanti.class differ diff --git a/build/classes/puntocassa/MyKeyBoard.class b/build/classes/puntocassa/MyKeyBoard.class new file mode 100644 index 0000000..98cfcb7 Binary files /dev/null and b/build/classes/puntocassa/MyKeyBoard.class differ diff --git a/build/classes/puntocassa/MyTableModel.class b/build/classes/puntocassa/MyTableModel.class new file mode 100644 index 0000000..e9088f5 Binary files /dev/null and b/build/classes/puntocassa/MyTableModel.class differ diff --git a/build/classes/puntocassa/PuntoCassa$1$1.class b/build/classes/puntocassa/PuntoCassa$1$1.class new file mode 100644 index 0000000..35c4b95 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$1$1.class differ diff --git a/build/classes/puntocassa/PuntoCassa$1$2.class b/build/classes/puntocassa/PuntoCassa$1$2.class new file mode 100644 index 0000000..a04c862 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$1$2.class differ diff --git a/build/classes/puntocassa/PuntoCassa$1.class b/build/classes/puntocassa/PuntoCassa$1.class new file mode 100644 index 0000000..66f0a95 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$1.class differ diff --git a/build/classes/puntocassa/PuntoCassa$10.class b/build/classes/puntocassa/PuntoCassa$10.class new file mode 100644 index 0000000..fcac3cf Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$10.class differ diff --git a/build/classes/puntocassa/PuntoCassa$11.class b/build/classes/puntocassa/PuntoCassa$11.class new file mode 100644 index 0000000..0564303 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$11.class differ diff --git a/build/classes/puntocassa/PuntoCassa$12.class b/build/classes/puntocassa/PuntoCassa$12.class new file mode 100644 index 0000000..d1bb48f Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$12.class differ diff --git a/build/classes/puntocassa/PuntoCassa$13.class b/build/classes/puntocassa/PuntoCassa$13.class new file mode 100644 index 0000000..a2ef107 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$13.class differ diff --git a/build/classes/puntocassa/PuntoCassa$14.class b/build/classes/puntocassa/PuntoCassa$14.class new file mode 100644 index 0000000..441fc52 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$14.class differ diff --git a/build/classes/puntocassa/PuntoCassa$15.class b/build/classes/puntocassa/PuntoCassa$15.class new file mode 100644 index 0000000..fd3d5d5 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$15.class differ diff --git a/build/classes/puntocassa/PuntoCassa$16.class b/build/classes/puntocassa/PuntoCassa$16.class new file mode 100644 index 0000000..dd07e2c Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$16.class differ diff --git a/build/classes/puntocassa/PuntoCassa$17.class b/build/classes/puntocassa/PuntoCassa$17.class new file mode 100644 index 0000000..cc3aae8 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$17.class differ diff --git a/build/classes/puntocassa/PuntoCassa$18.class b/build/classes/puntocassa/PuntoCassa$18.class new file mode 100644 index 0000000..89a03ca Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$18.class differ diff --git a/build/classes/puntocassa/PuntoCassa$19.class b/build/classes/puntocassa/PuntoCassa$19.class new file mode 100644 index 0000000..07acc65 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$19.class differ diff --git a/build/classes/puntocassa/PuntoCassa$2.class b/build/classes/puntocassa/PuntoCassa$2.class new file mode 100644 index 0000000..3bec4a1 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$2.class differ diff --git a/build/classes/puntocassa/PuntoCassa$20.class b/build/classes/puntocassa/PuntoCassa$20.class new file mode 100644 index 0000000..4b6ffd1 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$20.class differ diff --git a/build/classes/puntocassa/PuntoCassa$21.class b/build/classes/puntocassa/PuntoCassa$21.class new file mode 100644 index 0000000..d19d589 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$21.class differ diff --git a/build/classes/puntocassa/PuntoCassa$22.class b/build/classes/puntocassa/PuntoCassa$22.class new file mode 100644 index 0000000..aa0f1f2 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$22.class differ diff --git a/build/classes/puntocassa/PuntoCassa$23.class b/build/classes/puntocassa/PuntoCassa$23.class new file mode 100644 index 0000000..667c398 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$23.class differ diff --git a/build/classes/puntocassa/PuntoCassa$24.class b/build/classes/puntocassa/PuntoCassa$24.class new file mode 100644 index 0000000..26cb52f Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$24.class differ diff --git a/build/classes/puntocassa/PuntoCassa$25.class b/build/classes/puntocassa/PuntoCassa$25.class new file mode 100644 index 0000000..ac32891 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$25.class differ diff --git a/build/classes/puntocassa/PuntoCassa$26.class b/build/classes/puntocassa/PuntoCassa$26.class new file mode 100644 index 0000000..da8d8ad Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$26.class differ diff --git a/build/classes/puntocassa/PuntoCassa$27.class b/build/classes/puntocassa/PuntoCassa$27.class new file mode 100644 index 0000000..2ac0b30 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$27.class differ diff --git a/build/classes/puntocassa/PuntoCassa$28.class b/build/classes/puntocassa/PuntoCassa$28.class new file mode 100644 index 0000000..dd7b360 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$28.class differ diff --git a/build/classes/puntocassa/PuntoCassa$29.class b/build/classes/puntocassa/PuntoCassa$29.class new file mode 100644 index 0000000..f782c6d Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$29.class differ diff --git a/build/classes/puntocassa/PuntoCassa$3.class b/build/classes/puntocassa/PuntoCassa$3.class new file mode 100644 index 0000000..3443e0f Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$3.class differ diff --git a/build/classes/puntocassa/PuntoCassa$30.class b/build/classes/puntocassa/PuntoCassa$30.class new file mode 100644 index 0000000..997fedd Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$30.class differ diff --git a/build/classes/puntocassa/PuntoCassa$31.class b/build/classes/puntocassa/PuntoCassa$31.class new file mode 100644 index 0000000..7fc282e Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$31.class differ diff --git a/build/classes/puntocassa/PuntoCassa$32.class b/build/classes/puntocassa/PuntoCassa$32.class new file mode 100644 index 0000000..923ee63 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$32.class differ diff --git a/build/classes/puntocassa/PuntoCassa$33.class b/build/classes/puntocassa/PuntoCassa$33.class new file mode 100644 index 0000000..6352dac Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$33.class differ diff --git a/build/classes/puntocassa/PuntoCassa$34.class b/build/classes/puntocassa/PuntoCassa$34.class new file mode 100644 index 0000000..47b2073 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$34.class differ diff --git a/build/classes/puntocassa/PuntoCassa$35.class b/build/classes/puntocassa/PuntoCassa$35.class new file mode 100644 index 0000000..6a97f51 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$35.class differ diff --git a/build/classes/puntocassa/PuntoCassa$36.class b/build/classes/puntocassa/PuntoCassa$36.class new file mode 100644 index 0000000..609c045 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$36.class differ diff --git a/build/classes/puntocassa/PuntoCassa$37.class b/build/classes/puntocassa/PuntoCassa$37.class new file mode 100644 index 0000000..6323c00 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$37.class differ diff --git a/build/classes/puntocassa/PuntoCassa$38.class b/build/classes/puntocassa/PuntoCassa$38.class new file mode 100644 index 0000000..ab1da04 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$38.class differ diff --git a/build/classes/puntocassa/PuntoCassa$4.class b/build/classes/puntocassa/PuntoCassa$4.class new file mode 100644 index 0000000..afeaa8d Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$4.class differ diff --git a/build/classes/puntocassa/PuntoCassa$5.class b/build/classes/puntocassa/PuntoCassa$5.class new file mode 100644 index 0000000..eb288dd Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$5.class differ diff --git a/build/classes/puntocassa/PuntoCassa$6.class b/build/classes/puntocassa/PuntoCassa$6.class new file mode 100644 index 0000000..e05aeea Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$6.class differ diff --git a/build/classes/puntocassa/PuntoCassa$7.class b/build/classes/puntocassa/PuntoCassa$7.class new file mode 100644 index 0000000..c36f3db Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$7.class differ diff --git a/build/classes/puntocassa/PuntoCassa$8.class b/build/classes/puntocassa/PuntoCassa$8.class new file mode 100644 index 0000000..9fc229c Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$8.class differ diff --git a/build/classes/puntocassa/PuntoCassa$9.class b/build/classes/puntocassa/PuntoCassa$9.class new file mode 100644 index 0000000..3891c6f Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$9.class differ diff --git a/build/classes/puntocassa/PuntoCassa$ButtonCategoria.class b/build/classes/puntocassa/PuntoCassa$ButtonCategoria.class new file mode 100644 index 0000000..23b7499 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$ButtonCategoria.class differ diff --git a/build/classes/puntocassa/PuntoCassa$ButtonProdotto.class b/build/classes/puntocassa/PuntoCassa$ButtonProdotto.class new file mode 100644 index 0000000..e94a9c1 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$ButtonProdotto.class differ diff --git a/build/classes/puntocassa/PuntoCassa$CardTask.class b/build/classes/puntocassa/PuntoCassa$CardTask.class new file mode 100644 index 0000000..bbbe473 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$CardTask.class differ diff --git a/build/classes/puntocassa/PuntoCassa$MyCanvas.class b/build/classes/puntocassa/PuntoCassa$MyCanvas.class new file mode 100644 index 0000000..f2a168a Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$MyCanvas.class differ diff --git a/build/classes/puntocassa/PuntoCassa$TimerDBConn.class b/build/classes/puntocassa/PuntoCassa$TimerDBConn.class new file mode 100644 index 0000000..accb8c8 Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$TimerDBConn.class differ diff --git a/build/classes/puntocassa/PuntoCassa$statiCarta.class b/build/classes/puntocassa/PuntoCassa$statiCarta.class new file mode 100644 index 0000000..cd82feb Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa$statiCarta.class differ diff --git a/build/classes/puntocassa/PuntoCassa.class b/build/classes/puntocassa/PuntoCassa.class new file mode 100644 index 0000000..1e258aa Binary files /dev/null and b/build/classes/puntocassa/PuntoCassa.class differ diff --git a/build/classes/puntocassa/esci2.jpg b/build/classes/puntocassa/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/build/classes/puntocassa/esci2.jpg differ diff --git a/build/classes/puntocassa/frmCerca$1.class b/build/classes/puntocassa/frmCerca$1.class new file mode 100644 index 0000000..021679b Binary files /dev/null and b/build/classes/puntocassa/frmCerca$1.class differ diff --git a/build/classes/puntocassa/frmCerca$10.class b/build/classes/puntocassa/frmCerca$10.class new file mode 100644 index 0000000..e7431f2 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$10.class differ diff --git a/build/classes/puntocassa/frmCerca$11.class b/build/classes/puntocassa/frmCerca$11.class new file mode 100644 index 0000000..a1b5755 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$11.class differ diff --git a/build/classes/puntocassa/frmCerca$12.class b/build/classes/puntocassa/frmCerca$12.class new file mode 100644 index 0000000..a9ae6a6 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$12.class differ diff --git a/build/classes/puntocassa/frmCerca$13.class b/build/classes/puntocassa/frmCerca$13.class new file mode 100644 index 0000000..5fdcd6f Binary files /dev/null and b/build/classes/puntocassa/frmCerca$13.class differ diff --git a/build/classes/puntocassa/frmCerca$14.class b/build/classes/puntocassa/frmCerca$14.class new file mode 100644 index 0000000..8f86045 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$14.class differ diff --git a/build/classes/puntocassa/frmCerca$2.class b/build/classes/puntocassa/frmCerca$2.class new file mode 100644 index 0000000..b3a9373 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$2.class differ diff --git a/build/classes/puntocassa/frmCerca$3.class b/build/classes/puntocassa/frmCerca$3.class new file mode 100644 index 0000000..f2020b7 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$3.class differ diff --git a/build/classes/puntocassa/frmCerca$4.class b/build/classes/puntocassa/frmCerca$4.class new file mode 100644 index 0000000..a711393 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$4.class differ diff --git a/build/classes/puntocassa/frmCerca$5.class b/build/classes/puntocassa/frmCerca$5.class new file mode 100644 index 0000000..36dd44c Binary files /dev/null and b/build/classes/puntocassa/frmCerca$5.class differ diff --git a/build/classes/puntocassa/frmCerca$6.class b/build/classes/puntocassa/frmCerca$6.class new file mode 100644 index 0000000..d7d8556 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$6.class differ diff --git a/build/classes/puntocassa/frmCerca$7.class b/build/classes/puntocassa/frmCerca$7.class new file mode 100644 index 0000000..2a37e64 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$7.class differ diff --git a/build/classes/puntocassa/frmCerca$8.class b/build/classes/puntocassa/frmCerca$8.class new file mode 100644 index 0000000..d31fdf9 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$8.class differ diff --git a/build/classes/puntocassa/frmCerca$9.class b/build/classes/puntocassa/frmCerca$9.class new file mode 100644 index 0000000..1f02236 Binary files /dev/null and b/build/classes/puntocassa/frmCerca$9.class differ diff --git a/build/classes/puntocassa/frmCerca.class b/build/classes/puntocassa/frmCerca.class new file mode 100644 index 0000000..1f9fed4 Binary files /dev/null and b/build/classes/puntocassa/frmCerca.class differ diff --git a/build/classes/puntocassa/frmMeteo$1.class b/build/classes/puntocassa/frmMeteo$1.class new file mode 100644 index 0000000..858c29d Binary files /dev/null and b/build/classes/puntocassa/frmMeteo$1.class differ diff --git a/build/classes/puntocassa/frmMeteo$2.class b/build/classes/puntocassa/frmMeteo$2.class new file mode 100644 index 0000000..a5cf96f Binary files /dev/null and b/build/classes/puntocassa/frmMeteo$2.class differ diff --git a/build/classes/puntocassa/frmMeteo$3.class b/build/classes/puntocassa/frmMeteo$3.class new file mode 100644 index 0000000..c5c5348 Binary files /dev/null and b/build/classes/puntocassa/frmMeteo$3.class differ diff --git a/build/classes/puntocassa/frmMeteo.class b/build/classes/puntocassa/frmMeteo.class new file mode 100644 index 0000000..fe0382f Binary files /dev/null and b/build/classes/puntocassa/frmMeteo.class differ diff --git a/build/classes/puntocassa/frmMovimenti$1.class b/build/classes/puntocassa/frmMovimenti$1.class new file mode 100644 index 0000000..1ef799f Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti$1.class differ diff --git a/build/classes/puntocassa/frmMovimenti$2.class b/build/classes/puntocassa/frmMovimenti$2.class new file mode 100644 index 0000000..f93fb09 Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti$2.class differ diff --git a/build/classes/puntocassa/frmMovimenti$3.class b/build/classes/puntocassa/frmMovimenti$3.class new file mode 100644 index 0000000..11f4f95 Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti$3.class differ diff --git a/build/classes/puntocassa/frmMovimenti$4.class b/build/classes/puntocassa/frmMovimenti$4.class new file mode 100644 index 0000000..fd7cbde Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti$4.class differ diff --git a/build/classes/puntocassa/frmMovimenti$5.class b/build/classes/puntocassa/frmMovimenti$5.class new file mode 100644 index 0000000..3740e30 Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti$5.class differ diff --git a/build/classes/puntocassa/frmMovimenti.class b/build/classes/puntocassa/frmMovimenti.class new file mode 100644 index 0000000..3406f84 Binary files /dev/null and b/build/classes/puntocassa/frmMovimenti.class differ diff --git a/build/classes/puntocassa/frmProdotti$1.class b/build/classes/puntocassa/frmProdotti$1.class new file mode 100644 index 0000000..79cabb7 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$1.class differ diff --git a/build/classes/puntocassa/frmProdotti$10.class b/build/classes/puntocassa/frmProdotti$10.class new file mode 100644 index 0000000..903f96e Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$10.class differ diff --git a/build/classes/puntocassa/frmProdotti$11.class b/build/classes/puntocassa/frmProdotti$11.class new file mode 100644 index 0000000..0d70b1f Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$11.class differ diff --git a/build/classes/puntocassa/frmProdotti$12.class b/build/classes/puntocassa/frmProdotti$12.class new file mode 100644 index 0000000..52216bc Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$12.class differ diff --git a/build/classes/puntocassa/frmProdotti$13.class b/build/classes/puntocassa/frmProdotti$13.class new file mode 100644 index 0000000..e39b454 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$13.class differ diff --git a/build/classes/puntocassa/frmProdotti$2.class b/build/classes/puntocassa/frmProdotti$2.class new file mode 100644 index 0000000..4e2f3ee Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$2.class differ diff --git a/build/classes/puntocassa/frmProdotti$3.class b/build/classes/puntocassa/frmProdotti$3.class new file mode 100644 index 0000000..24cb425 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$3.class differ diff --git a/build/classes/puntocassa/frmProdotti$4.class b/build/classes/puntocassa/frmProdotti$4.class new file mode 100644 index 0000000..c7ad5a8 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$4.class differ diff --git a/build/classes/puntocassa/frmProdotti$5.class b/build/classes/puntocassa/frmProdotti$5.class new file mode 100644 index 0000000..0af45f3 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$5.class differ diff --git a/build/classes/puntocassa/frmProdotti$6.class b/build/classes/puntocassa/frmProdotti$6.class new file mode 100644 index 0000000..337ba10 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$6.class differ diff --git a/build/classes/puntocassa/frmProdotti$7.class b/build/classes/puntocassa/frmProdotti$7.class new file mode 100644 index 0000000..1b25350 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$7.class differ diff --git a/build/classes/puntocassa/frmProdotti$8.class b/build/classes/puntocassa/frmProdotti$8.class new file mode 100644 index 0000000..719ce25 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$8.class differ diff --git a/build/classes/puntocassa/frmProdotti$9.class b/build/classes/puntocassa/frmProdotti$9.class new file mode 100644 index 0000000..5fc29b1 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti$9.class differ diff --git a/build/classes/puntocassa/frmProdotti.class b/build/classes/puntocassa/frmProdotti.class new file mode 100644 index 0000000..b842b41 Binary files /dev/null and b/build/classes/puntocassa/frmProdotti.class differ diff --git a/build/classes/puntocassa/frmProgress$1.class b/build/classes/puntocassa/frmProgress$1.class new file mode 100644 index 0000000..0e270dd Binary files /dev/null and b/build/classes/puntocassa/frmProgress$1.class differ diff --git a/build/classes/puntocassa/frmProgress$2.class b/build/classes/puntocassa/frmProgress$2.class new file mode 100644 index 0000000..ca2d219 Binary files /dev/null and b/build/classes/puntocassa/frmProgress$2.class differ diff --git a/build/classes/puntocassa/frmProgress.class b/build/classes/puntocassa/frmProgress.class new file mode 100644 index 0000000..7cebe4b Binary files /dev/null and b/build/classes/puntocassa/frmProgress.class differ diff --git a/build/classes/puntocassa/frmStorno$1.class b/build/classes/puntocassa/frmStorno$1.class new file mode 100644 index 0000000..cd900ae Binary files /dev/null and b/build/classes/puntocassa/frmStorno$1.class differ diff --git a/build/classes/puntocassa/frmStorno$2.class b/build/classes/puntocassa/frmStorno$2.class new file mode 100644 index 0000000..3860e39 Binary files /dev/null and b/build/classes/puntocassa/frmStorno$2.class differ diff --git a/build/classes/puntocassa/frmStorno$3.class b/build/classes/puntocassa/frmStorno$3.class new file mode 100644 index 0000000..83a7e55 Binary files /dev/null and b/build/classes/puntocassa/frmStorno$3.class differ diff --git a/build/classes/puntocassa/frmStorno$4.class b/build/classes/puntocassa/frmStorno$4.class new file mode 100644 index 0000000..926ce7e Binary files /dev/null and b/build/classes/puntocassa/frmStorno$4.class differ diff --git a/build/classes/puntocassa/frmStorno$5.class b/build/classes/puntocassa/frmStorno$5.class new file mode 100644 index 0000000..b776417 Binary files /dev/null and b/build/classes/puntocassa/frmStorno$5.class differ diff --git a/build/classes/puntocassa/frmStorno$6.class b/build/classes/puntocassa/frmStorno$6.class new file mode 100644 index 0000000..106c78f Binary files /dev/null and b/build/classes/puntocassa/frmStorno$6.class differ diff --git a/build/classes/puntocassa/frmStorno.class b/build/classes/puntocassa/frmStorno.class new file mode 100644 index 0000000..545bb05 Binary files /dev/null and b/build/classes/puntocassa/frmStorno.class differ diff --git a/build/classes/risorse/Acqua minerale.jpg b/build/classes/risorse/Acqua minerale.jpg new file mode 100644 index 0000000..416cc55 Binary files /dev/null and b/build/classes/risorse/Acqua minerale.jpg differ diff --git a/build/classes/risorse/Brioche.jpg b/build/classes/risorse/Brioche.jpg new file mode 100644 index 0000000..df3217e Binary files /dev/null and b/build/classes/risorse/Brioche.jpg differ diff --git a/build/classes/risorse/Caffe.jpg b/build/classes/risorse/Caffe.jpg new file mode 100644 index 0000000..8615520 Binary files /dev/null and b/build/classes/risorse/Caffe.jpg differ diff --git a/build/classes/risorse/Cappuccino.jpg b/build/classes/risorse/Cappuccino.jpg new file mode 100644 index 0000000..89f67f8 Binary files /dev/null and b/build/classes/risorse/Cappuccino.jpg differ diff --git a/build/classes/risorse/Coca Cola lattina.jpg b/build/classes/risorse/Coca Cola lattina.jpg new file mode 100644 index 0000000..2f1da8e Binary files /dev/null and b/build/classes/risorse/Coca Cola lattina.jpg differ diff --git a/build/classes/risorse/Frutta fresca.jpg b/build/classes/risorse/Frutta fresca.jpg new file mode 100644 index 0000000..a303980 Binary files /dev/null and b/build/classes/risorse/Frutta fresca.jpg differ diff --git a/build/classes/risorse/Hamburger.jpg b/build/classes/risorse/Hamburger.jpg new file mode 100644 index 0000000..71e7a92 Binary files /dev/null and b/build/classes/risorse/Hamburger.jpg differ diff --git a/build/classes/risorse/Insalata nizzarda.jpg b/build/classes/risorse/Insalata nizzarda.jpg new file mode 100644 index 0000000..42891cb Binary files /dev/null and b/build/classes/risorse/Insalata nizzarda.jpg differ diff --git a/build/classes/risorse/Insalata verde.jpg b/build/classes/risorse/Insalata verde.jpg new file mode 100644 index 0000000..78fa2b3 Binary files /dev/null and b/build/classes/risorse/Insalata verde.jpg differ diff --git a/build/classes/risorse/Logo.ico b/build/classes/risorse/Logo.ico new file mode 100644 index 0000000..2828b6c Binary files /dev/null and b/build/classes/risorse/Logo.ico differ diff --git a/build/classes/risorse/Menu colazione.jpg b/build/classes/risorse/Menu colazione.jpg new file mode 100644 index 0000000..0d643b5 Binary files /dev/null and b/build/classes/risorse/Menu colazione.jpg differ diff --git a/build/classes/risorse/Menu completo.jpg b/build/classes/risorse/Menu completo.jpg new file mode 100644 index 0000000..92417af Binary files /dev/null and b/build/classes/risorse/Menu completo.jpg differ diff --git a/build/classes/risorse/Menu ridotto.jpg b/build/classes/risorse/Menu ridotto.jpg new file mode 100644 index 0000000..a696599 Binary files /dev/null and b/build/classes/risorse/Menu ridotto.jpg differ diff --git a/build/classes/risorse/Movimenti.jpg b/build/classes/risorse/Movimenti.jpg new file mode 100644 index 0000000..069bfeb Binary files /dev/null and b/build/classes/risorse/Movimenti.jpg differ diff --git a/build/classes/risorse/Movimenti.png b/build/classes/risorse/Movimenti.png new file mode 100644 index 0000000..6d3773f Binary files /dev/null and b/build/classes/risorse/Movimenti.png differ diff --git a/build/classes/risorse/Omelette.jpg b/build/classes/risorse/Omelette.jpg new file mode 100644 index 0000000..afe6bb4 Binary files /dev/null and b/build/classes/risorse/Omelette.jpg differ diff --git a/build/classes/risorse/Pasta al ragu.jpg b/build/classes/risorse/Pasta al ragu.jpg new file mode 100644 index 0000000..13e469b Binary files /dev/null and b/build/classes/risorse/Pasta al ragu.jpg differ diff --git a/build/classes/risorse/Pasta fredda.jpg b/build/classes/risorse/Pasta fredda.jpg new file mode 100644 index 0000000..8216fae Binary files /dev/null and b/build/classes/risorse/Pasta fredda.jpg differ diff --git a/build/classes/risorse/Prosciutto crudo.jpg b/build/classes/risorse/Prosciutto crudo.jpg new file mode 100644 index 0000000..228779e Binary files /dev/null and b/build/classes/risorse/Prosciutto crudo.jpg differ diff --git a/build/classes/risorse/Risotto.jpg b/build/classes/risorse/Risotto.jpg new file mode 100644 index 0000000..0308f6e Binary files /dev/null and b/build/classes/risorse/Risotto.jpg differ diff --git a/build/classes/risorse/Spremuta arancia.jpg b/build/classes/risorse/Spremuta arancia.jpg new file mode 100644 index 0000000..87593ea Binary files /dev/null and b/build/classes/risorse/Spremuta arancia.jpg differ diff --git a/build/classes/risorse/Thumbs.db b/build/classes/risorse/Thumbs.db new file mode 100644 index 0000000..4ad42a6 Binary files /dev/null and b/build/classes/risorse/Thumbs.db differ diff --git a/build/classes/risorse/Tiramisu.jpg b/build/classes/risorse/Tiramisu.jpg new file mode 100644 index 0000000..db5f013 Binary files /dev/null and b/build/classes/risorse/Tiramisu.jpg differ diff --git a/build/classes/risorse/Vetrino.jpg b/build/classes/risorse/Vetrino.jpg new file mode 100644 index 0000000..eab164e Binary files /dev/null and b/build/classes/risorse/Vetrino.jpg differ diff --git a/build/classes/risorse/a scalare.png b/build/classes/risorse/a scalare.png new file mode 100644 index 0000000..f5400ee Binary files /dev/null and b/build/classes/risorse/a scalare.png differ diff --git a/build/classes/risorse/coltello e forchetta.jpg b/build/classes/risorse/coltello e forchetta.jpg new file mode 100644 index 0000000..235b635 Binary files /dev/null and b/build/classes/risorse/coltello e forchetta.jpg differ diff --git a/build/classes/risorse/contanti.png b/build/classes/risorse/contanti.png new file mode 100644 index 0000000..ad3f601 Binary files /dev/null and b/build/classes/risorse/contanti.png differ diff --git a/build/classes/risorse/da asporto.jpg b/build/classes/risorse/da asporto.jpg new file mode 100644 index 0000000..033b098 Binary files /dev/null and b/build/classes/risorse/da asporto.jpg differ diff --git a/build/classes/risorse/db.png b/build/classes/risorse/db.png new file mode 100644 index 0000000..08708f3 Binary files /dev/null and b/build/classes/risorse/db.png differ diff --git a/build/classes/risorse/differito.jpg b/build/classes/risorse/differito.jpg new file mode 100644 index 0000000..59b3f23 Binary files /dev/null and b/build/classes/risorse/differito.jpg differ diff --git a/build/classes/risorse/differito.png b/build/classes/risorse/differito.png new file mode 100644 index 0000000..902bca9 Binary files /dev/null and b/build/classes/risorse/differito.png differ diff --git a/build/classes/risorse/esci.jpg b/build/classes/risorse/esci.jpg new file mode 100644 index 0000000..69febe7 Binary files /dev/null and b/build/classes/risorse/esci.jpg differ diff --git a/build/classes/risorse/esci2.jpg b/build/classes/risorse/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/build/classes/risorse/esci2.jpg differ diff --git a/build/classes/risorse/freccia_down.jpg b/build/classes/risorse/freccia_down.jpg new file mode 100644 index 0000000..b5a8964 Binary files /dev/null and b/build/classes/risorse/freccia_down.jpg differ diff --git a/build/classes/risorse/freccia_dx.jpg b/build/classes/risorse/freccia_dx.jpg new file mode 100644 index 0000000..a3bfff1 Binary files /dev/null and b/build/classes/risorse/freccia_dx.jpg differ diff --git a/build/classes/risorse/freccia_sx.jpg b/build/classes/risorse/freccia_sx.jpg new file mode 100644 index 0000000..8845cfb Binary files /dev/null and b/build/classes/risorse/freccia_sx.jpg differ diff --git a/build/classes/risorse/freccia_up.jpg b/build/classes/risorse/freccia_up.jpg new file mode 100644 index 0000000..bfbd19a Binary files /dev/null and b/build/classes/risorse/freccia_up.jpg differ diff --git a/build/classes/risorse/fulmine.jpg b/build/classes/risorse/fulmine.jpg new file mode 100644 index 0000000..76a0929 Binary files /dev/null and b/build/classes/risorse/fulmine.jpg differ diff --git a/build/classes/risorse/fulmine.png b/build/classes/risorse/fulmine.png new file mode 100644 index 0000000..d9f3bd6 Binary files /dev/null and b/build/classes/risorse/fulmine.png differ diff --git a/build/classes/risorse/giù.png b/build/classes/risorse/giù.png new file mode 100644 index 0000000..3e35679 Binary files /dev/null and b/build/classes/risorse/giù.png differ diff --git a/build/classes/risorse/logo (1).png b/build/classes/risorse/logo (1).png new file mode 100644 index 0000000..1eea74d Binary files /dev/null and b/build/classes/risorse/logo (1).png differ diff --git a/build/classes/risorse/logo.png b/build/classes/risorse/logo.png new file mode 100644 index 0000000..500ce11 Binary files /dev/null and b/build/classes/risorse/logo.png differ diff --git a/build/classes/risorse/logoStampa.jpg b/build/classes/risorse/logoStampa.jpg new file mode 100644 index 0000000..005ba66 Binary files /dev/null and b/build/classes/risorse/logoStampa.jpg differ diff --git a/build/classes/risorse/meteo.png b/build/classes/risorse/meteo.png new file mode 100644 index 0000000..17ed983 Binary files /dev/null and b/build/classes/risorse/meteo.png differ diff --git a/build/classes/risorse/print.png b/build/classes/risorse/print.png new file mode 100644 index 0000000..42999cc Binary files /dev/null and b/build/classes/risorse/print.png differ diff --git a/build/classes/risorse/prodotti.png b/build/classes/risorse/prodotti.png new file mode 100644 index 0000000..3ba74d2 Binary files /dev/null and b/build/classes/risorse/prodotti.png differ diff --git a/build/classes/risorse/puntocassa (2).xml b/build/classes/risorse/puntocassa (2).xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/build/classes/risorse/puntocassa (2).xml @@ -0,0 +1,43 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + localhost + 1521 + xe + SIR_CASSA + sir_cassa + + + ..\risorse\ + E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/build/classes/risorse/puntocassa - Copia.xml b/build/classes/risorse/puntocassa - Copia.xml new file mode 100644 index 0000000..308d9a4 --- /dev/null +++ b/build/classes/risorse/puntocassa - Copia.xml @@ -0,0 +1,34 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + marco-nbacer + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + + 123 + diff --git a/build/classes/risorse/puntocassa.xml b/build/classes/risorse/puntocassa.xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/build/classes/risorse/puntocassa.xml @@ -0,0 +1,43 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + localhost + 1521 + xe + SIR_CASSA + sir_cassa + + + ..\risorse\ + E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/build/classes/risorse/puntocassaGF.xml b/build/classes/risorse/puntocassaGF.xml new file mode 100644 index 0000000..e5bac86 --- /dev/null +++ b/build/classes/risorse/puntocassaGF.xml @@ -0,0 +1,37 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + XP_TEST + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + 20 + 150 + 150 + + 1 + diff --git a/build/classes/risorse/storno.png b/build/classes/risorse/storno.png new file mode 100644 index 0000000..a7071da Binary files /dev/null and b/build/classes/risorse/storno.png differ diff --git a/build/classes/risorse/ticket.png b/build/classes/risorse/ticket.png new file mode 100644 index 0000000..00b3125 Binary files /dev/null and b/build/classes/risorse/ticket.png differ diff --git a/build/classes/risorse/ticket2.png b/build/classes/risorse/ticket2.png new file mode 100644 index 0000000..f2759b1 Binary files /dev/null and b/build/classes/risorse/ticket2.png differ diff --git a/build/classes/risorse/tsn.png b/build/classes/risorse/tsn.png new file mode 100644 index 0000000..cc35a2e Binary files /dev/null and b/build/classes/risorse/tsn.png differ diff --git a/dist/Cassa.jar b/dist/Cassa.jar new file mode 100644 index 0000000..0a2dc74 Binary files /dev/null and b/dist/Cassa.jar differ diff --git a/dist/README.TXT b/dist/README.TXT new file mode 100644 index 0000000..54daa7c --- /dev/null +++ b/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "Cassa.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/dist/lib/AbsoluteLayout.jar b/dist/lib/AbsoluteLayout.jar new file mode 100644 index 0000000..6106c0c Binary files /dev/null and b/dist/lib/AbsoluteLayout.jar differ diff --git a/dist/lib/avalon-framework-impl-4.2.0.jar b/dist/lib/avalon-framework-impl-4.2.0.jar new file mode 100644 index 0000000..ca61697 Binary files /dev/null and b/dist/lib/avalon-framework-impl-4.2.0.jar differ diff --git a/dist/lib/barbecue-1.5-beta1.jar b/dist/lib/barbecue-1.5-beta1.jar new file mode 100644 index 0000000..a8fe1e3 Binary files /dev/null and b/dist/lib/barbecue-1.5-beta1.jar differ diff --git a/dist/lib/barcode4j-2.0.jar b/dist/lib/barcode4j-2.0.jar new file mode 100644 index 0000000..0b91a46 Binary files /dev/null and b/dist/lib/barcode4j-2.0.jar differ diff --git a/dist/lib/batik-anim-1.7.jar b/dist/lib/batik-anim-1.7.jar new file mode 100644 index 0000000..2a150b2 Binary files /dev/null and b/dist/lib/batik-anim-1.7.jar differ diff --git a/dist/lib/batik-awt-util-1.7.jar b/dist/lib/batik-awt-util-1.7.jar new file mode 100644 index 0000000..f83b5bd Binary files /dev/null and b/dist/lib/batik-awt-util-1.7.jar differ diff --git a/dist/lib/batik-bridge-1.7.jar b/dist/lib/batik-bridge-1.7.jar new file mode 100644 index 0000000..872cf27 Binary files /dev/null and b/dist/lib/batik-bridge-1.7.jar differ diff --git a/dist/lib/batik-css-1.7.jar b/dist/lib/batik-css-1.7.jar new file mode 100644 index 0000000..ef3013d Binary files /dev/null and b/dist/lib/batik-css-1.7.jar differ diff --git a/dist/lib/batik-dom-1.7.jar b/dist/lib/batik-dom-1.7.jar new file mode 100644 index 0000000..0206475 Binary files /dev/null and b/dist/lib/batik-dom-1.7.jar differ diff --git a/dist/lib/batik-ext-1.7.jar b/dist/lib/batik-ext-1.7.jar new file mode 100644 index 0000000..57fb273 Binary files /dev/null and b/dist/lib/batik-ext-1.7.jar differ diff --git a/dist/lib/batik-gvt-1.7.jar b/dist/lib/batik-gvt-1.7.jar new file mode 100644 index 0000000..9aa9686 Binary files /dev/null and b/dist/lib/batik-gvt-1.7.jar differ diff --git a/dist/lib/batik-parser-1.7.jar b/dist/lib/batik-parser-1.7.jar new file mode 100644 index 0000000..b84ad36 Binary files /dev/null and b/dist/lib/batik-parser-1.7.jar differ diff --git a/dist/lib/batik-script-1.7.jar b/dist/lib/batik-script-1.7.jar new file mode 100644 index 0000000..a684f1c Binary files /dev/null and b/dist/lib/batik-script-1.7.jar differ diff --git a/dist/lib/batik-svg-dom-1.7.jar b/dist/lib/batik-svg-dom-1.7.jar new file mode 100644 index 0000000..463d0e0 Binary files /dev/null and b/dist/lib/batik-svg-dom-1.7.jar differ diff --git a/dist/lib/batik-util-1.7.jar b/dist/lib/batik-util-1.7.jar new file mode 100644 index 0000000..c50d1ff Binary files /dev/null and b/dist/lib/batik-util-1.7.jar differ diff --git a/dist/lib/batik-xml-1.7.jar b/dist/lib/batik-xml-1.7.jar new file mode 100644 index 0000000..45ba157 Binary files /dev/null and b/dist/lib/batik-xml-1.7.jar differ diff --git a/dist/lib/bcprov-jdk14-138.jar b/dist/lib/bcprov-jdk14-138.jar new file mode 100644 index 0000000..d1befb7 Binary files /dev/null and b/dist/lib/bcprov-jdk14-138.jar differ diff --git a/dist/lib/beansbinding-1.2.1.jar b/dist/lib/beansbinding-1.2.1.jar new file mode 100644 index 0000000..ec1d179 Binary files /dev/null and b/dist/lib/beansbinding-1.2.1.jar differ diff --git a/dist/lib/commons-beanutils-1.8.0.jar b/dist/lib/commons-beanutils-1.8.0.jar new file mode 100644 index 0000000..caf7ae3 Binary files /dev/null and b/dist/lib/commons-beanutils-1.8.0.jar differ diff --git a/dist/lib/commons-collections-3.2.1.jar b/dist/lib/commons-collections-3.2.1.jar new file mode 100644 index 0000000..c35fa1f Binary files /dev/null and b/dist/lib/commons-collections-3.2.1.jar differ diff --git a/dist/lib/commons-digester-2.1.jar b/dist/lib/commons-digester-2.1.jar new file mode 100644 index 0000000..a07cfa8 Binary files /dev/null and b/dist/lib/commons-digester-2.1.jar differ diff --git a/dist/lib/commons-lang-2.5.jar b/dist/lib/commons-lang-2.5.jar new file mode 100644 index 0000000..ae491da Binary files /dev/null and b/dist/lib/commons-lang-2.5.jar differ diff --git a/dist/lib/commons-lang3-3.1.jar b/dist/lib/commons-lang3-3.1.jar new file mode 100644 index 0000000..a85e539 Binary files /dev/null and b/dist/lib/commons-lang3-3.1.jar differ diff --git a/dist/lib/commons-logging-1.1.1.jar b/dist/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000..1deef14 Binary files /dev/null and b/dist/lib/commons-logging-1.1.1.jar differ diff --git a/dist/lib/dynamicreports-adhoc-3.2.0-sources.jar b/dist/lib/dynamicreports-adhoc-3.2.0-sources.jar new file mode 100644 index 0000000..c3e5324 Binary files /dev/null and b/dist/lib/dynamicreports-adhoc-3.2.0-sources.jar differ diff --git a/dist/lib/dynamicreports-adhoc-3.2.0.jar b/dist/lib/dynamicreports-adhoc-3.2.0.jar new file mode 100644 index 0000000..54af925 Binary files /dev/null and b/dist/lib/dynamicreports-adhoc-3.2.0.jar differ diff --git a/dist/lib/dynamicreports-core-3.2.0-javadoc.jar b/dist/lib/dynamicreports-core-3.2.0-javadoc.jar new file mode 100644 index 0000000..2ae8ab3 Binary files /dev/null and b/dist/lib/dynamicreports-core-3.2.0-javadoc.jar differ diff --git a/dist/lib/dynamicreports-core-3.2.0-sources.jar b/dist/lib/dynamicreports-core-3.2.0-sources.jar new file mode 100644 index 0000000..f8d78e8 Binary files /dev/null and b/dist/lib/dynamicreports-core-3.2.0-sources.jar differ diff --git a/dist/lib/dynamicreports-core-3.2.0.jar b/dist/lib/dynamicreports-core-3.2.0.jar new file mode 100644 index 0000000..d44b039 Binary files /dev/null and b/dist/lib/dynamicreports-core-3.2.0.jar differ diff --git a/dist/lib/dynamicreports-examples-3.2.0-sources.jar b/dist/lib/dynamicreports-examples-3.2.0-sources.jar new file mode 100644 index 0000000..4d03fe3 Binary files /dev/null and b/dist/lib/dynamicreports-examples-3.2.0-sources.jar differ diff --git a/dist/lib/dynamicreports-examples-3.2.0.jar b/dist/lib/dynamicreports-examples-3.2.0.jar new file mode 100644 index 0000000..693689d Binary files /dev/null and b/dist/lib/dynamicreports-examples-3.2.0.jar differ diff --git a/dist/lib/dynamicreports-googlecharts-3.2.0-sources.jar b/dist/lib/dynamicreports-googlecharts-3.2.0-sources.jar new file mode 100644 index 0000000..f0fa281 Binary files /dev/null and b/dist/lib/dynamicreports-googlecharts-3.2.0-sources.jar differ diff --git a/dist/lib/dynamicreports-googlecharts-3.2.0.jar b/dist/lib/dynamicreports-googlecharts-3.2.0.jar new file mode 100644 index 0000000..8814b39 Binary files /dev/null and b/dist/lib/dynamicreports-googlecharts-3.2.0.jar differ diff --git a/dist/lib/hsqldb-1.8.0.10.jar b/dist/lib/hsqldb-1.8.0.10.jar new file mode 100644 index 0000000..e010269 Binary files /dev/null and b/dist/lib/hsqldb-1.8.0.10.jar differ diff --git a/dist/lib/itext-2.1.7.js2.jar b/dist/lib/itext-2.1.7.js2.jar new file mode 100644 index 0000000..5d319fc Binary files /dev/null and b/dist/lib/itext-2.1.7.js2.jar differ diff --git a/dist/lib/jackson-annotations-2.1.4.jar b/dist/lib/jackson-annotations-2.1.4.jar new file mode 100644 index 0000000..143edf4 Binary files /dev/null and b/dist/lib/jackson-annotations-2.1.4.jar differ diff --git a/dist/lib/jackson-core-2.1.4.jar b/dist/lib/jackson-core-2.1.4.jar new file mode 100644 index 0000000..0f14468 Binary files /dev/null and b/dist/lib/jackson-core-2.1.4.jar differ diff --git a/dist/lib/jackson-databind-2.1.4.jar b/dist/lib/jackson-databind-2.1.4.jar new file mode 100644 index 0000000..ce125d1 Binary files /dev/null and b/dist/lib/jackson-databind-2.1.4.jar differ diff --git a/dist/lib/jasperreports-5.5.1.jar b/dist/lib/jasperreports-5.5.1.jar new file mode 100644 index 0000000..b22c6b4 Binary files /dev/null and b/dist/lib/jasperreports-5.5.1.jar differ diff --git a/dist/lib/jcommon-1.0.15.jar b/dist/lib/jcommon-1.0.15.jar new file mode 100644 index 0000000..d0dc26d Binary files /dev/null and b/dist/lib/jcommon-1.0.15.jar differ diff --git a/dist/lib/jdtcore-3.1.0.jar b/dist/lib/jdtcore-3.1.0.jar new file mode 100644 index 0000000..d920738 Binary files /dev/null and b/dist/lib/jdtcore-3.1.0.jar differ diff --git a/dist/lib/jfreechart-1.0.12.jar b/dist/lib/jfreechart-1.0.12.jar new file mode 100644 index 0000000..73be90f Binary files /dev/null and b/dist/lib/jfreechart-1.0.12.jar differ diff --git a/dist/lib/json-20080701.jar b/dist/lib/json-20080701.jar new file mode 100644 index 0000000..c9a093e Binary files /dev/null and b/dist/lib/json-20080701.jar differ diff --git a/dist/lib/jssc-2.8.0.jar b/dist/lib/jssc-2.8.0.jar new file mode 100644 index 0000000..d2b5c07 Binary files /dev/null and b/dist/lib/jssc-2.8.0.jar differ diff --git a/dist/lib/jxl-2.6.10.jar b/dist/lib/jxl-2.6.10.jar new file mode 100644 index 0000000..a2eced5 Binary files /dev/null and b/dist/lib/jxl-2.6.10.jar differ diff --git a/dist/lib/log4j-1.2.14.jar b/dist/lib/log4j-1.2.14.jar new file mode 100644 index 0000000..6251307 Binary files /dev/null and b/dist/lib/log4j-1.2.14.jar differ diff --git a/dist/lib/ojdbc6.jar b/dist/lib/ojdbc6.jar new file mode 100644 index 0000000..8240f40 Binary files /dev/null and b/dist/lib/ojdbc6.jar differ diff --git a/dist/lib/poi-3.7.jar b/dist/lib/poi-3.7.jar new file mode 100644 index 0000000..a08d953 Binary files /dev/null and b/dist/lib/poi-3.7.jar differ diff --git a/dist/lib/serializer-2.7.1.jar b/dist/lib/serializer-2.7.1.jar new file mode 100644 index 0000000..99f98db Binary files /dev/null and b/dist/lib/serializer-2.7.1.jar differ diff --git a/dist/lib/servlet-api-2.4.jar b/dist/lib/servlet-api-2.4.jar new file mode 100644 index 0000000..dd326d3 Binary files /dev/null and b/dist/lib/servlet-api-2.4.jar differ diff --git a/dist/lib/spring-beans-2.5.jar b/dist/lib/spring-beans-2.5.jar new file mode 100644 index 0000000..4d6a4bf Binary files /dev/null and b/dist/lib/spring-beans-2.5.jar differ diff --git a/dist/lib/spring-core-2.5.jar b/dist/lib/spring-core-2.5.jar new file mode 100644 index 0000000..7347707 Binary files /dev/null and b/dist/lib/spring-core-2.5.jar differ diff --git a/dist/lib/velocity-1.7.jar b/dist/lib/velocity-1.7.jar new file mode 100644 index 0000000..ae936d3 Binary files /dev/null and b/dist/lib/velocity-1.7.jar differ diff --git a/dist/lib/xalan-2.7.1.jar b/dist/lib/xalan-2.7.1.jar new file mode 100644 index 0000000..458fa73 Binary files /dev/null and b/dist/lib/xalan-2.7.1.jar differ diff --git a/dist/lib/xml-apis-1.3.04.jar b/dist/lib/xml-apis-1.3.04.jar new file mode 100644 index 0000000..d42c0ea Binary files /dev/null and b/dist/lib/xml-apis-1.3.04.jar differ diff --git a/dist/lib/xml-apis-ext-1.3.04.jar b/dist/lib/xml-apis-ext-1.3.04.jar new file mode 100644 index 0000000..a7869d6 Binary files /dev/null and b/dist/lib/xml-apis-ext-1.3.04.jar differ diff --git a/jssc-2.8.0.jar b/jssc-2.8.0.jar new file mode 100644 index 0000000..d2b5c07 Binary files /dev/null and b/jssc-2.8.0.jar differ diff --git a/lib/AbsoluteLayout.jar b/lib/AbsoluteLayout.jar new file mode 100644 index 0000000..667ffd2 Binary files /dev/null and b/lib/AbsoluteLayout.jar differ diff --git a/lib/avalon-framework-impl-4.2.0.jar b/lib/avalon-framework-impl-4.2.0.jar new file mode 100644 index 0000000..ca61697 Binary files /dev/null and b/lib/avalon-framework-impl-4.2.0.jar differ diff --git a/lib/barbecue-1.5-beta1.jar b/lib/barbecue-1.5-beta1.jar new file mode 100644 index 0000000..a8fe1e3 Binary files /dev/null and b/lib/barbecue-1.5-beta1.jar differ diff --git a/lib/barcode4j-2.0.jar b/lib/barcode4j-2.0.jar new file mode 100644 index 0000000..0b91a46 Binary files /dev/null and b/lib/barcode4j-2.0.jar differ diff --git a/lib/batik-anim-1.7.jar b/lib/batik-anim-1.7.jar new file mode 100644 index 0000000..2a150b2 Binary files /dev/null and b/lib/batik-anim-1.7.jar differ diff --git a/lib/batik-awt-util-1.7.jar b/lib/batik-awt-util-1.7.jar new file mode 100644 index 0000000..f83b5bd Binary files /dev/null and b/lib/batik-awt-util-1.7.jar differ diff --git a/lib/batik-bridge-1.7.jar b/lib/batik-bridge-1.7.jar new file mode 100644 index 0000000..872cf27 Binary files /dev/null and b/lib/batik-bridge-1.7.jar differ diff --git a/lib/batik-css-1.7.jar b/lib/batik-css-1.7.jar new file mode 100644 index 0000000..ef3013d Binary files /dev/null and b/lib/batik-css-1.7.jar differ diff --git a/lib/batik-dom-1.7.jar b/lib/batik-dom-1.7.jar new file mode 100644 index 0000000..0206475 Binary files /dev/null and b/lib/batik-dom-1.7.jar differ diff --git a/lib/batik-ext-1.7.jar b/lib/batik-ext-1.7.jar new file mode 100644 index 0000000..57fb273 Binary files /dev/null and b/lib/batik-ext-1.7.jar differ diff --git a/lib/batik-gvt-1.7.jar b/lib/batik-gvt-1.7.jar new file mode 100644 index 0000000..9aa9686 Binary files /dev/null and b/lib/batik-gvt-1.7.jar differ diff --git a/lib/batik-parser-1.7.jar b/lib/batik-parser-1.7.jar new file mode 100644 index 0000000..b84ad36 Binary files /dev/null and b/lib/batik-parser-1.7.jar differ diff --git a/lib/batik-script-1.7.jar b/lib/batik-script-1.7.jar new file mode 100644 index 0000000..a684f1c Binary files /dev/null and b/lib/batik-script-1.7.jar differ diff --git a/lib/batik-svg-dom-1.7.jar b/lib/batik-svg-dom-1.7.jar new file mode 100644 index 0000000..463d0e0 Binary files /dev/null and b/lib/batik-svg-dom-1.7.jar differ diff --git a/lib/batik-util-1.7.jar b/lib/batik-util-1.7.jar new file mode 100644 index 0000000..c50d1ff Binary files /dev/null and b/lib/batik-util-1.7.jar differ diff --git a/lib/batik-xml-1.7.jar b/lib/batik-xml-1.7.jar new file mode 100644 index 0000000..45ba157 Binary files /dev/null and b/lib/batik-xml-1.7.jar differ diff --git a/lib/bcprov-jdk14-138.jar b/lib/bcprov-jdk14-138.jar new file mode 100644 index 0000000..d1befb7 Binary files /dev/null and b/lib/bcprov-jdk14-138.jar differ diff --git a/lib/beansbinding-1.2.1.jar b/lib/beansbinding-1.2.1.jar new file mode 100644 index 0000000..7f26dc3 Binary files /dev/null and b/lib/beansbinding-1.2.1.jar differ diff --git a/lib/commons-beanutils-1.8.0.jar b/lib/commons-beanutils-1.8.0.jar new file mode 100644 index 0000000..caf7ae3 Binary files /dev/null and b/lib/commons-beanutils-1.8.0.jar differ diff --git a/lib/commons-collections-3.2.1.jar b/lib/commons-collections-3.2.1.jar new file mode 100644 index 0000000..c35fa1f Binary files /dev/null and b/lib/commons-collections-3.2.1.jar differ diff --git a/lib/commons-digester-2.1.jar b/lib/commons-digester-2.1.jar new file mode 100644 index 0000000..a07cfa8 Binary files /dev/null and b/lib/commons-digester-2.1.jar differ diff --git a/lib/commons-lang-2.5.jar b/lib/commons-lang-2.5.jar new file mode 100644 index 0000000..ae491da Binary files /dev/null and b/lib/commons-lang-2.5.jar differ diff --git a/lib/commons-lang3-3.1.jar b/lib/commons-lang3-3.1.jar new file mode 100644 index 0000000..a85e539 Binary files /dev/null and b/lib/commons-lang3-3.1.jar differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000..1deef14 Binary files /dev/null and b/lib/commons-logging-1.1.1.jar differ diff --git a/lib/dynamicreports-adhoc-3.2.0-sources.jar b/lib/dynamicreports-adhoc-3.2.0-sources.jar new file mode 100644 index 0000000..c3e5324 Binary files /dev/null and b/lib/dynamicreports-adhoc-3.2.0-sources.jar differ diff --git a/lib/dynamicreports-adhoc-3.2.0.jar b/lib/dynamicreports-adhoc-3.2.0.jar new file mode 100644 index 0000000..54af925 Binary files /dev/null and b/lib/dynamicreports-adhoc-3.2.0.jar differ diff --git a/lib/dynamicreports-core-3.2.0-javadoc.jar b/lib/dynamicreports-core-3.2.0-javadoc.jar new file mode 100644 index 0000000..2ae8ab3 Binary files /dev/null and b/lib/dynamicreports-core-3.2.0-javadoc.jar differ diff --git a/lib/dynamicreports-core-3.2.0-sources.jar b/lib/dynamicreports-core-3.2.0-sources.jar new file mode 100644 index 0000000..f8d78e8 Binary files /dev/null and b/lib/dynamicreports-core-3.2.0-sources.jar differ diff --git a/lib/dynamicreports-core-3.2.0.jar b/lib/dynamicreports-core-3.2.0.jar new file mode 100644 index 0000000..d44b039 Binary files /dev/null and b/lib/dynamicreports-core-3.2.0.jar differ diff --git a/lib/dynamicreports-examples-3.2.0-sources.jar b/lib/dynamicreports-examples-3.2.0-sources.jar new file mode 100644 index 0000000..4d03fe3 Binary files /dev/null and b/lib/dynamicreports-examples-3.2.0-sources.jar differ diff --git a/lib/dynamicreports-examples-3.2.0.jar b/lib/dynamicreports-examples-3.2.0.jar new file mode 100644 index 0000000..693689d Binary files /dev/null and b/lib/dynamicreports-examples-3.2.0.jar differ diff --git a/lib/dynamicreports-googlecharts-3.2.0-sources.jar b/lib/dynamicreports-googlecharts-3.2.0-sources.jar new file mode 100644 index 0000000..f0fa281 Binary files /dev/null and b/lib/dynamicreports-googlecharts-3.2.0-sources.jar differ diff --git a/lib/dynamicreports-googlecharts-3.2.0.jar b/lib/dynamicreports-googlecharts-3.2.0.jar new file mode 100644 index 0000000..8814b39 Binary files /dev/null and b/lib/dynamicreports-googlecharts-3.2.0.jar differ diff --git a/lib/hsqldb-1.8.0.10.jar b/lib/hsqldb-1.8.0.10.jar new file mode 100644 index 0000000..e010269 Binary files /dev/null and b/lib/hsqldb-1.8.0.10.jar differ diff --git a/lib/itext-2.1.7.js2.jar b/lib/itext-2.1.7.js2.jar new file mode 100644 index 0000000..5d319fc Binary files /dev/null and b/lib/itext-2.1.7.js2.jar differ diff --git a/lib/jackson-annotations-2.1.4.jar b/lib/jackson-annotations-2.1.4.jar new file mode 100644 index 0000000..143edf4 Binary files /dev/null and b/lib/jackson-annotations-2.1.4.jar differ diff --git a/lib/jackson-core-2.1.4.jar b/lib/jackson-core-2.1.4.jar new file mode 100644 index 0000000..0f14468 Binary files /dev/null and b/lib/jackson-core-2.1.4.jar differ diff --git a/lib/jackson-databind-2.1.4.jar b/lib/jackson-databind-2.1.4.jar new file mode 100644 index 0000000..ce125d1 Binary files /dev/null and b/lib/jackson-databind-2.1.4.jar differ diff --git a/lib/jasperreports-5.5.1.jar b/lib/jasperreports-5.5.1.jar new file mode 100644 index 0000000..b22c6b4 Binary files /dev/null and b/lib/jasperreports-5.5.1.jar differ diff --git a/lib/jcommon-1.0.15.jar b/lib/jcommon-1.0.15.jar new file mode 100644 index 0000000..d0dc26d Binary files /dev/null and b/lib/jcommon-1.0.15.jar differ diff --git a/lib/jdtcore-3.1.0.jar b/lib/jdtcore-3.1.0.jar new file mode 100644 index 0000000..d920738 Binary files /dev/null and b/lib/jdtcore-3.1.0.jar differ diff --git a/lib/jfreechart-1.0.12.jar b/lib/jfreechart-1.0.12.jar new file mode 100644 index 0000000..73be90f Binary files /dev/null and b/lib/jfreechart-1.0.12.jar differ diff --git a/lib/json-20080701.jar b/lib/json-20080701.jar new file mode 100644 index 0000000..c9a093e Binary files /dev/null and b/lib/json-20080701.jar differ diff --git a/lib/jssc-2.8.0.jar b/lib/jssc-2.8.0.jar new file mode 100644 index 0000000..d2b5c07 Binary files /dev/null and b/lib/jssc-2.8.0.jar differ diff --git a/lib/jxl-2.6.10.jar b/lib/jxl-2.6.10.jar new file mode 100644 index 0000000..a2eced5 Binary files /dev/null and b/lib/jxl-2.6.10.jar differ diff --git a/lib/log4j-1.2.14.jar b/lib/log4j-1.2.14.jar new file mode 100644 index 0000000..6251307 Binary files /dev/null and b/lib/log4j-1.2.14.jar differ diff --git a/lib/ojdbc6.jar b/lib/ojdbc6.jar new file mode 100644 index 0000000..8240f40 Binary files /dev/null and b/lib/ojdbc6.jar differ diff --git a/lib/poi-3.7.jar b/lib/poi-3.7.jar new file mode 100644 index 0000000..a08d953 Binary files /dev/null and b/lib/poi-3.7.jar differ diff --git a/lib/serializer-2.7.1.jar b/lib/serializer-2.7.1.jar new file mode 100644 index 0000000..99f98db Binary files /dev/null and b/lib/serializer-2.7.1.jar differ diff --git a/lib/servlet-api-2.4.jar b/lib/servlet-api-2.4.jar new file mode 100644 index 0000000..dd326d3 Binary files /dev/null and b/lib/servlet-api-2.4.jar differ diff --git a/lib/spring-beans-2.5.jar b/lib/spring-beans-2.5.jar new file mode 100644 index 0000000..4d6a4bf Binary files /dev/null and b/lib/spring-beans-2.5.jar differ diff --git a/lib/spring-core-2.5.jar b/lib/spring-core-2.5.jar new file mode 100644 index 0000000..7347707 Binary files /dev/null and b/lib/spring-core-2.5.jar differ diff --git a/lib/velocity-1.7.jar b/lib/velocity-1.7.jar new file mode 100644 index 0000000..ae936d3 Binary files /dev/null and b/lib/velocity-1.7.jar differ diff --git a/lib/xalan-2.7.1.jar b/lib/xalan-2.7.1.jar new file mode 100644 index 0000000..458fa73 Binary files /dev/null and b/lib/xalan-2.7.1.jar differ diff --git a/lib/xml-apis-1.3.04.jar b/lib/xml-apis-1.3.04.jar new file mode 100644 index 0000000..d42c0ea Binary files /dev/null and b/lib/xml-apis-1.3.04.jar differ diff --git a/lib/xml-apis-ext-1.3.04.jar b/lib/xml-apis-ext-1.3.04.jar new file mode 100644 index 0000000..a7869d6 Binary files /dev/null and b/lib/xml-apis-ext-1.3.04.jar differ diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/mysql-connector-java-5.1.23-bin.jar b/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 0000000..9bd1fde Binary files /dev/null and b/mysql-connector-java-5.1.23-bin.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..45775cf --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..a53d8a4 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=573a3561 +build.xml.script.CRC32=0bf5d772 +build.xml.stylesheet.CRC32=8064a381@1.68.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=573a3561 +nbproject/build-impl.xml.script.CRC32=409ad3c4 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/private/config.properties b/nbproject/private/config.properties new file mode 100644 index 0000000..e69de29 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..3b0b6d2 --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,6 @@ +compile.on.save=true +do.depend=false +do.jar=true +javac.debug=true +javadoc.preview=true +user.properties.file=C:\\Users\\marco\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..fc30a18 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,19 @@ + + + + + src/puntocassa/PuntoCassa.java + + + 1899 + + + + + + + file:/G:/Lavoro/Goffredo/Cassa/src/puntocassa/PuntoCassa.java + file:/G:/Lavoro/Goffredo/Cassa/src/puntocassa/frmCerca.java + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..7d7a61f --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,199 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=Cassa +application.vendor=Master +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Cassa.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.avalon-framework-impl-4.2.0.jar=DynamicReport/avalon-framework-impl-4.2.0.jar +file.reference.barbecue-1.5-beta1.jar=DynamicReport/barbecue-1.5-beta1.jar +file.reference.barcode4j-2.0.jar=DynamicReport/barcode4j-2.0.jar +file.reference.batik-anim-1.7.jar=DynamicReport/batik-anim-1.7.jar +file.reference.batik-awt-util-1.7.jar=DynamicReport/batik-awt-util-1.7.jar +file.reference.batik-bridge-1.7.jar=DynamicReport/batik-bridge-1.7.jar +file.reference.batik-css-1.7.jar=DynamicReport/batik-css-1.7.jar +file.reference.batik-dom-1.7.jar=DynamicReport/batik-dom-1.7.jar +file.reference.batik-ext-1.7.jar=DynamicReport/batik-ext-1.7.jar +file.reference.batik-gvt-1.7.jar=DynamicReport/batik-gvt-1.7.jar +file.reference.batik-parser-1.7.jar=DynamicReport/batik-parser-1.7.jar +file.reference.batik-script-1.7.jar=DynamicReport/batik-script-1.7.jar +file.reference.batik-svg-dom-1.7.jar=DynamicReport/batik-svg-dom-1.7.jar +file.reference.batik-util-1.7.jar=DynamicReport/batik-util-1.7.jar +file.reference.batik-xml-1.7.jar=DynamicReport/batik-xml-1.7.jar +file.reference.bcprov-jdk14-138.jar=DynamicReport/bcprov-jdk14-138.jar +file.reference.commons-beanutils-1.8.0.jar=DynamicReport/commons-beanutils-1.8.0.jar +file.reference.commons-collections-3.2.1.jar=DynamicReport/commons-collections-3.2.1.jar +file.reference.commons-digester-2.1.jar=DynamicReport/commons-digester-2.1.jar +file.reference.commons-lang-2.5.jar=DynamicReport/commons-lang-2.5.jar +file.reference.commons-lang3-3.1.jar=DynamicReport/commons-lang3-3.1.jar +file.reference.commons-logging-1.1.1.jar=DynamicReport/commons-logging-1.1.1.jar +file.reference.dynamicreports-adhoc-3.2.0-sources.jar=DynamicReport/dynamicreports-adhoc-3.2.0-sources.jar +file.reference.dynamicreports-adhoc-3.2.0.jar=DynamicReport/dynamicreports-adhoc-3.2.0.jar +file.reference.dynamicreports-core-3.2.0-javadoc.jar=DynamicReport/dynamicreports-core-3.2.0-javadoc.jar +file.reference.dynamicreports-core-3.2.0-sources.jar=DynamicReport/dynamicreports-core-3.2.0-sources.jar +file.reference.dynamicreports-core-3.2.0.jar=DynamicReport/dynamicreports-core-3.2.0.jar +file.reference.dynamicreports-examples-3.2.0-sources.jar=DynamicReport/dynamicreports-examples-3.2.0-sources.jar +file.reference.dynamicreports-examples-3.2.0.jar=DynamicReport/dynamicreports-examples-3.2.0.jar +file.reference.dynamicreports-googlecharts-3.2.0-sources.jar=DynamicReport/dynamicreports-googlecharts-3.2.0-sources.jar +file.reference.dynamicreports-googlecharts-3.2.0.jar=DynamicReport/dynamicreports-googlecharts-3.2.0.jar +file.reference.hsqldb-1.8.0.10.jar=DynamicReport/hsqldb-1.8.0.10.jar +file.reference.itext-2.1.7.js2.jar=DynamicReport/itext-2.1.7.js2.jar +file.reference.jackson-annotations-2.1.4.jar=DynamicReport/jackson-annotations-2.1.4.jar +file.reference.jackson-core-2.1.4.jar=DynamicReport/jackson-core-2.1.4.jar +file.reference.jackson-databind-2.1.4.jar=DynamicReport/jackson-databind-2.1.4.jar +file.reference.jasperreports-5.5.1.jar=DynamicReport/jasperreports-5.5.1.jar +file.reference.jcommon-1.0.15.jar=DynamicReport/jcommon-1.0.15.jar +file.reference.jdtcore-3.1.0.jar=DynamicReport/jdtcore-3.1.0.jar +file.reference.jfreechart-1.0.12.jar=DynamicReport/jfreechart-1.0.12.jar +file.reference.json-20080701.jar=DynamicReport/json-20080701.jar +file.reference.jssc-2.8.0.jar=jssc-2.8.0.jar +file.reference.jxl-2.6.10.jar=DynamicReport/jxl-2.6.10.jar +file.reference.log4j-1.2.14.jar=DynamicReport/log4j-1.2.14.jar +file.reference.ojdbc6.jar=ojdbc6.jar +file.reference.poi-3.7.jar=DynamicReport/poi-3.7.jar +file.reference.serializer-2.7.1.jar=DynamicReport/serializer-2.7.1.jar +file.reference.servlet-api-2.4.jar=DynamicReport/servlet-api-2.4.jar +file.reference.spring-beans-2.5.jar=DynamicReport/spring-beans-2.5.jar +file.reference.spring-core-2.5.jar=DynamicReport/spring-core-2.5.jar +file.reference.velocity-1.7.jar=DynamicReport/velocity-1.7.jar +file.reference.xalan-2.7.1.jar=DynamicReport/xalan-2.7.1.jar +file.reference.xml-apis-1.3.04.jar=DynamicReport/xml-apis-1.3.04.jar +file.reference.xml-apis-ext-1.3.04.jar=DynamicReport/xml-apis-ext-1.3.04.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${libs.absolutelayout.classpath}:\ + ${file.reference.avalon-framework-impl-4.2.0.jar}:\ + ${file.reference.barbecue-1.5-beta1.jar}:\ + ${file.reference.barcode4j-2.0.jar}:\ + ${file.reference.batik-anim-1.7.jar}:\ + ${file.reference.batik-awt-util-1.7.jar}:\ + ${file.reference.batik-bridge-1.7.jar}:\ + ${file.reference.batik-css-1.7.jar}:\ + ${file.reference.batik-dom-1.7.jar}:\ + ${file.reference.batik-ext-1.7.jar}:\ + ${file.reference.batik-gvt-1.7.jar}:\ + ${file.reference.batik-parser-1.7.jar}:\ + ${file.reference.batik-script-1.7.jar}:\ + ${file.reference.batik-svg-dom-1.7.jar}:\ + ${file.reference.batik-util-1.7.jar}:\ + ${file.reference.batik-xml-1.7.jar}:\ + ${file.reference.bcprov-jdk14-138.jar}:\ + ${file.reference.commons-beanutils-1.8.0.jar}:\ + ${file.reference.commons-collections-3.2.1.jar}:\ + ${file.reference.commons-digester-2.1.jar}:\ + ${file.reference.commons-lang-2.5.jar}:\ + ${file.reference.commons-lang3-3.1.jar}:\ + ${file.reference.commons-logging-1.1.1.jar}:\ + ${file.reference.dynamicreports-adhoc-3.2.0-sources.jar}:\ + ${file.reference.dynamicreports-adhoc-3.2.0.jar}:\ + ${file.reference.dynamicreports-core-3.2.0-javadoc.jar}:\ + ${file.reference.dynamicreports-core-3.2.0-sources.jar}:\ + ${file.reference.dynamicreports-core-3.2.0.jar}:\ + ${file.reference.dynamicreports-examples-3.2.0-sources.jar}:\ + ${file.reference.dynamicreports-examples-3.2.0.jar}:\ + ${file.reference.dynamicreports-googlecharts-3.2.0-sources.jar}:\ + ${file.reference.dynamicreports-googlecharts-3.2.0.jar}:\ + ${file.reference.hsqldb-1.8.0.10.jar}:\ + ${file.reference.itext-2.1.7.js2.jar}:\ + ${file.reference.jackson-annotations-2.1.4.jar}:\ + ${file.reference.jackson-core-2.1.4.jar}:\ + ${file.reference.jackson-databind-2.1.4.jar}:\ + ${file.reference.jasperreports-5.5.1.jar}:\ + ${file.reference.jcommon-1.0.15.jar}:\ + ${file.reference.jdtcore-3.1.0.jar}:\ + ${file.reference.jfreechart-1.0.12.jar}:\ + ${file.reference.json-20080701.jar}:\ + ${file.reference.jxl-2.6.10.jar}:\ + ${file.reference.log4j-1.2.14.jar}:\ + ${file.reference.poi-3.7.jar}:\ + ${file.reference.serializer-2.7.1.jar}:\ + ${file.reference.servlet-api-2.4.jar}:\ + ${file.reference.spring-beans-2.5.jar}:\ + ${file.reference.spring-core-2.5.jar}:\ + ${file.reference.velocity-1.7.jar}:\ + ${file.reference.xalan-2.7.1.jar}:\ + ${file.reference.xml-apis-1.3.04.jar}:\ + ${file.reference.xml-apis-ext-1.3.04.jar}:\ + ${libs.beans-binding.classpath}:\ + ${file.reference.ojdbc6.jar}:\ + ${file.reference.jssc-2.8.0.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +main.class=puntocassa.PuntoCassa +# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed +manifest.custom.codebase= +# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) +manifest.custom.permissions= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..f98b81a --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Cassa + + + + + + + + + diff --git a/ojdbc6.jar b/ojdbc6.jar new file mode 100644 index 0000000..8240f40 Binary files /dev/null and b/ojdbc6.jar differ diff --git a/out/production/Cassa/Cassa.jar b/out/production/Cassa/Cassa.jar new file mode 100644 index 0000000..69078d1 Binary files /dev/null and b/out/production/Cassa/Cassa.jar differ diff --git a/out/production/Cassa/SmartCard/APDUCommandBoxing.class b/out/production/Cassa/SmartCard/APDUCommandBoxing.class new file mode 100644 index 0000000..2a7be25 Binary files /dev/null and b/out/production/Cassa/SmartCard/APDUCommandBoxing.class differ diff --git a/out/production/Cassa/SmartCard/CardList.class b/out/production/Cassa/SmartCard/CardList.class new file mode 100644 index 0000000..c2e741b Binary files /dev/null and b/out/production/Cassa/SmartCard/CardList.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$1.class b/out/production/Cassa/SmartCard/FrmMain$1.class new file mode 100644 index 0000000..9c9ba22 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$1.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$10.class b/out/production/Cassa/SmartCard/FrmMain$10.class new file mode 100644 index 0000000..cf41fc0 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$10.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$11.class b/out/production/Cassa/SmartCard/FrmMain$11.class new file mode 100644 index 0000000..ec80cae Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$11.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$12.class b/out/production/Cassa/SmartCard/FrmMain$12.class new file mode 100644 index 0000000..3556086 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$12.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$13.class b/out/production/Cassa/SmartCard/FrmMain$13.class new file mode 100644 index 0000000..06aaed4 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$13.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$14.class b/out/production/Cassa/SmartCard/FrmMain$14.class new file mode 100644 index 0000000..4c1b68a Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$14.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$15.class b/out/production/Cassa/SmartCard/FrmMain$15.class new file mode 100644 index 0000000..e139850 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$15.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$16.class b/out/production/Cassa/SmartCard/FrmMain$16.class new file mode 100644 index 0000000..c46b772 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$16.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$17.class b/out/production/Cassa/SmartCard/FrmMain$17.class new file mode 100644 index 0000000..30bf54a Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$17.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$18.class b/out/production/Cassa/SmartCard/FrmMain$18.class new file mode 100644 index 0000000..ba1313e Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$18.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$19.class b/out/production/Cassa/SmartCard/FrmMain$19.class new file mode 100644 index 0000000..228a9b5 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$19.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$2.class b/out/production/Cassa/SmartCard/FrmMain$2.class new file mode 100644 index 0000000..08d907c Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$2.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$20.class b/out/production/Cassa/SmartCard/FrmMain$20.class new file mode 100644 index 0000000..02d885b Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$20.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$21.class b/out/production/Cassa/SmartCard/FrmMain$21.class new file mode 100644 index 0000000..b7d09ee Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$21.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$22.class b/out/production/Cassa/SmartCard/FrmMain$22.class new file mode 100644 index 0000000..c2575dd Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$22.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$23.class b/out/production/Cassa/SmartCard/FrmMain$23.class new file mode 100644 index 0000000..f81642d Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$23.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$24.class b/out/production/Cassa/SmartCard/FrmMain$24.class new file mode 100644 index 0000000..cec93e4 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$24.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$3.class b/out/production/Cassa/SmartCard/FrmMain$3.class new file mode 100644 index 0000000..b1ff3ed Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$3.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$4.class b/out/production/Cassa/SmartCard/FrmMain$4.class new file mode 100644 index 0000000..0540144 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$4.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$5.class b/out/production/Cassa/SmartCard/FrmMain$5.class new file mode 100644 index 0000000..3190f29 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$5.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$6.class b/out/production/Cassa/SmartCard/FrmMain$6.class new file mode 100644 index 0000000..e9fea30 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$6.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$7.class b/out/production/Cassa/SmartCard/FrmMain$7.class new file mode 100644 index 0000000..5f58385 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$7.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$8.class b/out/production/Cassa/SmartCard/FrmMain$8.class new file mode 100644 index 0000000..5e63b7c Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$8.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$9.class b/out/production/Cassa/SmartCard/FrmMain$9.class new file mode 100644 index 0000000..0323fe5 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$9.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain$APDUSet.class b/out/production/Cassa/SmartCard/FrmMain$APDUSet.class new file mode 100644 index 0000000..23de103 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain$APDUSet.class differ diff --git a/out/production/Cassa/SmartCard/FrmMain.class b/out/production/Cassa/SmartCard/FrmMain.class new file mode 100644 index 0000000..ee0aff0 Binary files /dev/null and b/out/production/Cassa/SmartCard/FrmMain.class differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class b/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class new file mode 100644 index 0000000..bd61d5a Binary files /dev/null and b/out/production/Cassa/SmartCard/ISO7816FileSystem$DF.class differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class b/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class new file mode 100644 index 0000000..28d714e Binary files /dev/null and b/out/production/Cassa/SmartCard/ISO7816FileSystem$EF.class differ diff --git a/out/production/Cassa/SmartCard/ISO7816FileSystem.class b/out/production/Cassa/SmartCard/ISO7816FileSystem.class new file mode 100644 index 0000000..732e514 Binary files /dev/null and b/out/production/Cassa/SmartCard/ISO7816FileSystem.class differ diff --git a/out/production/Cassa/SmartCard/ISO7816Response.class b/out/production/Cassa/SmartCard/ISO7816Response.class new file mode 100644 index 0000000..32d6e58 Binary files /dev/null and b/out/production/Cassa/SmartCard/ISO7816Response.class differ diff --git a/out/production/Cassa/SmartCard/Main$1.class b/out/production/Cassa/SmartCard/Main$1.class new file mode 100644 index 0000000..4dbfa83 Binary files /dev/null and b/out/production/Cassa/SmartCard/Main$1.class differ diff --git a/out/production/Cassa/SmartCard/Main.class b/out/production/Cassa/SmartCard/Main.class new file mode 100644 index 0000000..2a5c984 Binary files /dev/null and b/out/production/Cassa/SmartCard/Main.class differ diff --git a/out/production/Cassa/SmartCard/SmartCard.class b/out/production/Cassa/SmartCard/SmartCard.class new file mode 100644 index 0000000..6d71399 Binary files /dev/null and b/out/production/Cassa/SmartCard/SmartCard.class differ diff --git a/out/production/Cassa/SmartCard/StringUtil.class b/out/production/Cassa/SmartCard/StringUtil.class new file mode 100644 index 0000000..5be976d Binary files /dev/null and b/out/production/Cassa/SmartCard/StringUtil.class differ diff --git a/out/production/Cassa/puntocassa/ComboItem.class b/out/production/Cassa/puntocassa/ComboItem.class new file mode 100644 index 0000000..0ee5a30 Binary files /dev/null and b/out/production/Cassa/puntocassa/ComboItem.class differ diff --git a/out/production/Cassa/puntocassa/DecimalFormatRenderer.class b/out/production/Cassa/puntocassa/DecimalFormatRenderer.class new file mode 100644 index 0000000..ed0b34b Binary files /dev/null and b/out/production/Cassa/puntocassa/DecimalFormatRenderer.class differ diff --git a/out/production/Cassa/puntocassa/Encoding.class b/out/production/Cassa/puntocassa/Encoding.class new file mode 100644 index 0000000..3581e78 Binary files /dev/null and b/out/production/Cassa/puntocassa/Encoding.class differ diff --git a/out/production/Cassa/puntocassa/JEnhancedOptionPane.class b/out/production/Cassa/puntocassa/JEnhancedOptionPane.class new file mode 100644 index 0000000..b6f20cd Binary files /dev/null and b/out/production/Cassa/puntocassa/JEnhancedOptionPane.class differ diff --git a/out/production/Cassa/puntocassa/JInternalReport.class b/out/production/Cassa/puntocassa/JInternalReport.class new file mode 100644 index 0000000..daf2b0a Binary files /dev/null and b/out/production/Cassa/puntocassa/JInternalReport.class differ diff --git a/out/production/Cassa/puntocassa/JPnlPagamenti$1.class b/out/production/Cassa/puntocassa/JPnlPagamenti$1.class new file mode 100644 index 0000000..6be4cae Binary files /dev/null and b/out/production/Cassa/puntocassa/JPnlPagamenti$1.class differ diff --git a/out/production/Cassa/puntocassa/JPnlPagamenti.class b/out/production/Cassa/puntocassa/JPnlPagamenti.class new file mode 100644 index 0000000..28e3b37 Binary files /dev/null and b/out/production/Cassa/puntocassa/JPnlPagamenti.class differ diff --git a/out/production/Cassa/puntocassa/MyApplication.class b/out/production/Cassa/puntocassa/MyApplication.class new file mode 100644 index 0000000..1c2d7f6 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyApplication.class differ diff --git a/out/production/Cassa/puntocassa/MyDialog$1.class b/out/production/Cassa/puntocassa/MyDialog$1.class new file mode 100644 index 0000000..9ebee6e Binary files /dev/null and b/out/production/Cassa/puntocassa/MyDialog$1.class differ diff --git a/out/production/Cassa/puntocassa/MyDialog$2.class b/out/production/Cassa/puntocassa/MyDialog$2.class new file mode 100644 index 0000000..81d59e5 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyDialog$2.class differ diff --git a/out/production/Cassa/puntocassa/MyDialog.class b/out/production/Cassa/puntocassa/MyDialog.class new file mode 100644 index 0000000..b8c4444 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyDialog.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$1.class b/out/production/Cassa/puntocassa/MyKeyBoard$1.class new file mode 100644 index 0000000..29736c0 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$1.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$2.class b/out/production/Cassa/puntocassa/MyKeyBoard$2.class new file mode 100644 index 0000000..f75b8c0 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$2.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$3.class b/out/production/Cassa/puntocassa/MyKeyBoard$3.class new file mode 100644 index 0000000..c998b97 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$3.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$4.class b/out/production/Cassa/puntocassa/MyKeyBoard$4.class new file mode 100644 index 0000000..b1fe0a7 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$4.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$5.class b/out/production/Cassa/puntocassa/MyKeyBoard$5.class new file mode 100644 index 0000000..53d41de Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$5.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class b/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class new file mode 100644 index 0000000..f9dba64 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard$ListenerPulsanti.class differ diff --git a/out/production/Cassa/puntocassa/MyKeyBoard.class b/out/production/Cassa/puntocassa/MyKeyBoard.class new file mode 100644 index 0000000..c6968b9 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyKeyBoard.class differ diff --git a/out/production/Cassa/puntocassa/MyTableModel.class b/out/production/Cassa/puntocassa/MyTableModel.class new file mode 100644 index 0000000..3a16e94 Binary files /dev/null and b/out/production/Cassa/puntocassa/MyTableModel.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1$1.class b/out/production/Cassa/puntocassa/PuntoCassa$1$1.class new file mode 100644 index 0000000..8075c61 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$1$1.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1$2.class b/out/production/Cassa/puntocassa/PuntoCassa$1$2.class new file mode 100644 index 0000000..15e6b0a Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$1$2.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$1.class b/out/production/Cassa/puntocassa/PuntoCassa$1.class new file mode 100644 index 0000000..714f068 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$1.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$10.class b/out/production/Cassa/puntocassa/PuntoCassa$10.class new file mode 100644 index 0000000..b856112 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$10.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$11.class b/out/production/Cassa/puntocassa/PuntoCassa$11.class new file mode 100644 index 0000000..30f203c Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$11.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$12.class b/out/production/Cassa/puntocassa/PuntoCassa$12.class new file mode 100644 index 0000000..f96fb6b Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$12.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$13.class b/out/production/Cassa/puntocassa/PuntoCassa$13.class new file mode 100644 index 0000000..e59fd09 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$13.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$14.class b/out/production/Cassa/puntocassa/PuntoCassa$14.class new file mode 100644 index 0000000..e67423f Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$14.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$15.class b/out/production/Cassa/puntocassa/PuntoCassa$15.class new file mode 100644 index 0000000..e77c04c Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$15.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$16.class b/out/production/Cassa/puntocassa/PuntoCassa$16.class new file mode 100644 index 0000000..19a4d51 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$16.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$17.class b/out/production/Cassa/puntocassa/PuntoCassa$17.class new file mode 100644 index 0000000..0d3eadb Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$17.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$18.class b/out/production/Cassa/puntocassa/PuntoCassa$18.class new file mode 100644 index 0000000..04fbc2b Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$18.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$19.class b/out/production/Cassa/puntocassa/PuntoCassa$19.class new file mode 100644 index 0000000..9eecd86 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$19.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$2.class b/out/production/Cassa/puntocassa/PuntoCassa$2.class new file mode 100644 index 0000000..6514527 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$2.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$20.class b/out/production/Cassa/puntocassa/PuntoCassa$20.class new file mode 100644 index 0000000..72712f4 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$20.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$21.class b/out/production/Cassa/puntocassa/PuntoCassa$21.class new file mode 100644 index 0000000..96012ee Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$21.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$22.class b/out/production/Cassa/puntocassa/PuntoCassa$22.class new file mode 100644 index 0000000..2c88237 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$22.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$23.class b/out/production/Cassa/puntocassa/PuntoCassa$23.class new file mode 100644 index 0000000..85f2c41 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$23.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$24.class b/out/production/Cassa/puntocassa/PuntoCassa$24.class new file mode 100644 index 0000000..391f136 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$24.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$25.class b/out/production/Cassa/puntocassa/PuntoCassa$25.class new file mode 100644 index 0000000..69ba0b1 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$25.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$26.class b/out/production/Cassa/puntocassa/PuntoCassa$26.class new file mode 100644 index 0000000..6f86bcd Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$26.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$27.class b/out/production/Cassa/puntocassa/PuntoCassa$27.class new file mode 100644 index 0000000..58c2583 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$27.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$28.class b/out/production/Cassa/puntocassa/PuntoCassa$28.class new file mode 100644 index 0000000..0df24cb Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$28.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$29.class b/out/production/Cassa/puntocassa/PuntoCassa$29.class new file mode 100644 index 0000000..b37b27b Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$29.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$3.class b/out/production/Cassa/puntocassa/PuntoCassa$3.class new file mode 100644 index 0000000..c8cd214 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$3.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$30.class b/out/production/Cassa/puntocassa/PuntoCassa$30.class new file mode 100644 index 0000000..ebc7b7a Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$30.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$31.class b/out/production/Cassa/puntocassa/PuntoCassa$31.class new file mode 100644 index 0000000..a8af0cb Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$31.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$32.class b/out/production/Cassa/puntocassa/PuntoCassa$32.class new file mode 100644 index 0000000..fa372aa Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$32.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$33.class b/out/production/Cassa/puntocassa/PuntoCassa$33.class new file mode 100644 index 0000000..9bdf69a Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$33.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$34.class b/out/production/Cassa/puntocassa/PuntoCassa$34.class new file mode 100644 index 0000000..485dcd2 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$34.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$35.class b/out/production/Cassa/puntocassa/PuntoCassa$35.class new file mode 100644 index 0000000..9a25903 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$35.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$36.class b/out/production/Cassa/puntocassa/PuntoCassa$36.class new file mode 100644 index 0000000..cadd20d Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$36.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$37.class b/out/production/Cassa/puntocassa/PuntoCassa$37.class new file mode 100644 index 0000000..402408c Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$37.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$38.class b/out/production/Cassa/puntocassa/PuntoCassa$38.class new file mode 100644 index 0000000..601c17a Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$38.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$4.class b/out/production/Cassa/puntocassa/PuntoCassa$4.class new file mode 100644 index 0000000..2c4e71a Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$4.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$5.class b/out/production/Cassa/puntocassa/PuntoCassa$5.class new file mode 100644 index 0000000..a8f81d4 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$5.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$6.class b/out/production/Cassa/puntocassa/PuntoCassa$6.class new file mode 100644 index 0000000..c582913 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$6.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$7.class b/out/production/Cassa/puntocassa/PuntoCassa$7.class new file mode 100644 index 0000000..32e39de Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$7.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$8.class b/out/production/Cassa/puntocassa/PuntoCassa$8.class new file mode 100644 index 0000000..7e7c181 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$8.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$9.class b/out/production/Cassa/puntocassa/PuntoCassa$9.class new file mode 100644 index 0000000..ed6001f Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$9.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class b/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class new file mode 100644 index 0000000..07549dc Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$ButtonCategoria.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class b/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class new file mode 100644 index 0000000..53ebc07 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$ButtonProdotto.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class b/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class new file mode 100644 index 0000000..e67fafe Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$CardTask.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class b/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class new file mode 100644 index 0000000..b61bd76 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$MyCanvas.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class b/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class new file mode 100644 index 0000000..e6cbcaf Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$TimerDBConn.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class b/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class new file mode 100644 index 0000000..ec32b64 Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa$statiCarta.class differ diff --git a/out/production/Cassa/puntocassa/PuntoCassa.class b/out/production/Cassa/puntocassa/PuntoCassa.class new file mode 100644 index 0000000..4cdfcee Binary files /dev/null and b/out/production/Cassa/puntocassa/PuntoCassa.class differ diff --git a/out/production/Cassa/puntocassa/esci2.jpg b/out/production/Cassa/puntocassa/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/out/production/Cassa/puntocassa/esci2.jpg differ diff --git a/out/production/Cassa/puntocassa/frmCerca$1.class b/out/production/Cassa/puntocassa/frmCerca$1.class new file mode 100644 index 0000000..00fd78f Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$1.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$10.class b/out/production/Cassa/puntocassa/frmCerca$10.class new file mode 100644 index 0000000..fda46b1 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$10.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$11.class b/out/production/Cassa/puntocassa/frmCerca$11.class new file mode 100644 index 0000000..52e890f Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$11.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$12.class b/out/production/Cassa/puntocassa/frmCerca$12.class new file mode 100644 index 0000000..faddb18 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$12.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$13.class b/out/production/Cassa/puntocassa/frmCerca$13.class new file mode 100644 index 0000000..3f401d8 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$13.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$14.class b/out/production/Cassa/puntocassa/frmCerca$14.class new file mode 100644 index 0000000..ff6a9ce Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$14.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$2.class b/out/production/Cassa/puntocassa/frmCerca$2.class new file mode 100644 index 0000000..754e21c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$2.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$3.class b/out/production/Cassa/puntocassa/frmCerca$3.class new file mode 100644 index 0000000..914fb67 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$3.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$4.class b/out/production/Cassa/puntocassa/frmCerca$4.class new file mode 100644 index 0000000..b8f40ea Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$4.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$5.class b/out/production/Cassa/puntocassa/frmCerca$5.class new file mode 100644 index 0000000..94e5dfa Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$5.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$6.class b/out/production/Cassa/puntocassa/frmCerca$6.class new file mode 100644 index 0000000..9edd42c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$6.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$7.class b/out/production/Cassa/puntocassa/frmCerca$7.class new file mode 100644 index 0000000..95a3af5 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$7.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$8.class b/out/production/Cassa/puntocassa/frmCerca$8.class new file mode 100644 index 0000000..79af4b8 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$8.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca$9.class b/out/production/Cassa/puntocassa/frmCerca$9.class new file mode 100644 index 0000000..0018dbe Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca$9.class differ diff --git a/out/production/Cassa/puntocassa/frmCerca.class b/out/production/Cassa/puntocassa/frmCerca.class new file mode 100644 index 0000000..e8e23d0 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmCerca.class differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$1.class b/out/production/Cassa/puntocassa/frmMeteo$1.class new file mode 100644 index 0000000..d2fe118 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMeteo$1.class differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$2.class b/out/production/Cassa/puntocassa/frmMeteo$2.class new file mode 100644 index 0000000..f16e5ae Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMeteo$2.class differ diff --git a/out/production/Cassa/puntocassa/frmMeteo$3.class b/out/production/Cassa/puntocassa/frmMeteo$3.class new file mode 100644 index 0000000..9f6ba10 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMeteo$3.class differ diff --git a/out/production/Cassa/puntocassa/frmMeteo.class b/out/production/Cassa/puntocassa/frmMeteo.class new file mode 100644 index 0000000..5341a0c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMeteo.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$1.class b/out/production/Cassa/puntocassa/frmMovimenti$1.class new file mode 100644 index 0000000..46cbe3d Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti$1.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$2.class b/out/production/Cassa/puntocassa/frmMovimenti$2.class new file mode 100644 index 0000000..720155f Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti$2.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$3.class b/out/production/Cassa/puntocassa/frmMovimenti$3.class new file mode 100644 index 0000000..43cfa30 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti$3.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$4.class b/out/production/Cassa/puntocassa/frmMovimenti$4.class new file mode 100644 index 0000000..b775ea3 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti$4.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti$5.class b/out/production/Cassa/puntocassa/frmMovimenti$5.class new file mode 100644 index 0000000..5e6d1a6 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti$5.class differ diff --git a/out/production/Cassa/puntocassa/frmMovimenti.class b/out/production/Cassa/puntocassa/frmMovimenti.class new file mode 100644 index 0000000..b9ac44f Binary files /dev/null and b/out/production/Cassa/puntocassa/frmMovimenti.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$1.class b/out/production/Cassa/puntocassa/frmProdotti$1.class new file mode 100644 index 0000000..e3d9eab Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$1.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$10.class b/out/production/Cassa/puntocassa/frmProdotti$10.class new file mode 100644 index 0000000..8e44f8d Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$10.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$11.class b/out/production/Cassa/puntocassa/frmProdotti$11.class new file mode 100644 index 0000000..11a83be Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$11.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$12.class b/out/production/Cassa/puntocassa/frmProdotti$12.class new file mode 100644 index 0000000..095b001 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$12.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$13.class b/out/production/Cassa/puntocassa/frmProdotti$13.class new file mode 100644 index 0000000..551fa4c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$13.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$2.class b/out/production/Cassa/puntocassa/frmProdotti$2.class new file mode 100644 index 0000000..0d8da6f Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$2.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$3.class b/out/production/Cassa/puntocassa/frmProdotti$3.class new file mode 100644 index 0000000..e01f0d7 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$3.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$4.class b/out/production/Cassa/puntocassa/frmProdotti$4.class new file mode 100644 index 0000000..28a11bb Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$4.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$5.class b/out/production/Cassa/puntocassa/frmProdotti$5.class new file mode 100644 index 0000000..9eda8d0 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$5.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$6.class b/out/production/Cassa/puntocassa/frmProdotti$6.class new file mode 100644 index 0000000..12fcc81 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$6.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$7.class b/out/production/Cassa/puntocassa/frmProdotti$7.class new file mode 100644 index 0000000..aeaf8ab Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$7.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$8.class b/out/production/Cassa/puntocassa/frmProdotti$8.class new file mode 100644 index 0000000..13c0370 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$8.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti$9.class b/out/production/Cassa/puntocassa/frmProdotti$9.class new file mode 100644 index 0000000..1dfed32 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti$9.class differ diff --git a/out/production/Cassa/puntocassa/frmProdotti.class b/out/production/Cassa/puntocassa/frmProdotti.class new file mode 100644 index 0000000..0dc9618 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProdotti.class differ diff --git a/out/production/Cassa/puntocassa/frmProgress$1.class b/out/production/Cassa/puntocassa/frmProgress$1.class new file mode 100644 index 0000000..1d55ee9 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProgress$1.class differ diff --git a/out/production/Cassa/puntocassa/frmProgress$2.class b/out/production/Cassa/puntocassa/frmProgress$2.class new file mode 100644 index 0000000..37e7610 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProgress$2.class differ diff --git a/out/production/Cassa/puntocassa/frmProgress.class b/out/production/Cassa/puntocassa/frmProgress.class new file mode 100644 index 0000000..ab6cb24 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmProgress.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$1.class b/out/production/Cassa/puntocassa/frmStorno$1.class new file mode 100644 index 0000000..677d334 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$1.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$2.class b/out/production/Cassa/puntocassa/frmStorno$2.class new file mode 100644 index 0000000..3f68045 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$2.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$3.class b/out/production/Cassa/puntocassa/frmStorno$3.class new file mode 100644 index 0000000..00e1ba0 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$3.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$4.class b/out/production/Cassa/puntocassa/frmStorno$4.class new file mode 100644 index 0000000..bbe383c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$4.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$5.class b/out/production/Cassa/puntocassa/frmStorno$5.class new file mode 100644 index 0000000..61daef1 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$5.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno$6.class b/out/production/Cassa/puntocassa/frmStorno$6.class new file mode 100644 index 0000000..2673f32 Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno$6.class differ diff --git a/out/production/Cassa/puntocassa/frmStorno.class b/out/production/Cassa/puntocassa/frmStorno.class new file mode 100644 index 0000000..c5fee4c Binary files /dev/null and b/out/production/Cassa/puntocassa/frmStorno.class differ diff --git a/out/production/Cassa/risorse/Acqua minerale.jpg b/out/production/Cassa/risorse/Acqua minerale.jpg new file mode 100644 index 0000000..416cc55 Binary files /dev/null and b/out/production/Cassa/risorse/Acqua minerale.jpg differ diff --git a/out/production/Cassa/risorse/Brioche.jpg b/out/production/Cassa/risorse/Brioche.jpg new file mode 100644 index 0000000..df3217e Binary files /dev/null and b/out/production/Cassa/risorse/Brioche.jpg differ diff --git a/out/production/Cassa/risorse/Caffe.jpg b/out/production/Cassa/risorse/Caffe.jpg new file mode 100644 index 0000000..8615520 Binary files /dev/null and b/out/production/Cassa/risorse/Caffe.jpg differ diff --git a/out/production/Cassa/risorse/Cappuccino.jpg b/out/production/Cassa/risorse/Cappuccino.jpg new file mode 100644 index 0000000..89f67f8 Binary files /dev/null and b/out/production/Cassa/risorse/Cappuccino.jpg differ diff --git a/out/production/Cassa/risorse/Coca Cola lattina.jpg b/out/production/Cassa/risorse/Coca Cola lattina.jpg new file mode 100644 index 0000000..2f1da8e Binary files /dev/null and b/out/production/Cassa/risorse/Coca Cola lattina.jpg differ diff --git a/out/production/Cassa/risorse/Frutta fresca.jpg b/out/production/Cassa/risorse/Frutta fresca.jpg new file mode 100644 index 0000000..a303980 Binary files /dev/null and b/out/production/Cassa/risorse/Frutta fresca.jpg differ diff --git a/out/production/Cassa/risorse/Hamburger.jpg b/out/production/Cassa/risorse/Hamburger.jpg new file mode 100644 index 0000000..71e7a92 Binary files /dev/null and b/out/production/Cassa/risorse/Hamburger.jpg differ diff --git a/out/production/Cassa/risorse/Insalata nizzarda.jpg b/out/production/Cassa/risorse/Insalata nizzarda.jpg new file mode 100644 index 0000000..42891cb Binary files /dev/null and b/out/production/Cassa/risorse/Insalata nizzarda.jpg differ diff --git a/out/production/Cassa/risorse/Insalata verde.jpg b/out/production/Cassa/risorse/Insalata verde.jpg new file mode 100644 index 0000000..78fa2b3 Binary files /dev/null and b/out/production/Cassa/risorse/Insalata verde.jpg differ diff --git a/out/production/Cassa/risorse/Logo.ico b/out/production/Cassa/risorse/Logo.ico new file mode 100644 index 0000000..2828b6c Binary files /dev/null and b/out/production/Cassa/risorse/Logo.ico differ diff --git a/out/production/Cassa/risorse/Menu colazione.jpg b/out/production/Cassa/risorse/Menu colazione.jpg new file mode 100644 index 0000000..0d643b5 Binary files /dev/null and b/out/production/Cassa/risorse/Menu colazione.jpg differ diff --git a/out/production/Cassa/risorse/Menu completo.jpg b/out/production/Cassa/risorse/Menu completo.jpg new file mode 100644 index 0000000..92417af Binary files /dev/null and b/out/production/Cassa/risorse/Menu completo.jpg differ diff --git a/out/production/Cassa/risorse/Menu ridotto.jpg b/out/production/Cassa/risorse/Menu ridotto.jpg new file mode 100644 index 0000000..a696599 Binary files /dev/null and b/out/production/Cassa/risorse/Menu ridotto.jpg differ diff --git a/out/production/Cassa/risorse/Movimenti.jpg b/out/production/Cassa/risorse/Movimenti.jpg new file mode 100644 index 0000000..069bfeb Binary files /dev/null and b/out/production/Cassa/risorse/Movimenti.jpg differ diff --git a/out/production/Cassa/risorse/Movimenti.png b/out/production/Cassa/risorse/Movimenti.png new file mode 100644 index 0000000..6d3773f Binary files /dev/null and b/out/production/Cassa/risorse/Movimenti.png differ diff --git a/out/production/Cassa/risorse/Omelette.jpg b/out/production/Cassa/risorse/Omelette.jpg new file mode 100644 index 0000000..afe6bb4 Binary files /dev/null and b/out/production/Cassa/risorse/Omelette.jpg differ diff --git a/out/production/Cassa/risorse/Pasta al ragu.jpg b/out/production/Cassa/risorse/Pasta al ragu.jpg new file mode 100644 index 0000000..13e469b Binary files /dev/null and b/out/production/Cassa/risorse/Pasta al ragu.jpg differ diff --git a/out/production/Cassa/risorse/Pasta fredda.jpg b/out/production/Cassa/risorse/Pasta fredda.jpg new file mode 100644 index 0000000..8216fae Binary files /dev/null and b/out/production/Cassa/risorse/Pasta fredda.jpg differ diff --git a/out/production/Cassa/risorse/Prosciutto crudo.jpg b/out/production/Cassa/risorse/Prosciutto crudo.jpg new file mode 100644 index 0000000..228779e Binary files /dev/null and b/out/production/Cassa/risorse/Prosciutto crudo.jpg differ diff --git a/out/production/Cassa/risorse/Risotto.jpg b/out/production/Cassa/risorse/Risotto.jpg new file mode 100644 index 0000000..0308f6e Binary files /dev/null and b/out/production/Cassa/risorse/Risotto.jpg differ diff --git a/out/production/Cassa/risorse/Spremuta arancia.jpg b/out/production/Cassa/risorse/Spremuta arancia.jpg new file mode 100644 index 0000000..87593ea Binary files /dev/null and b/out/production/Cassa/risorse/Spremuta arancia.jpg differ diff --git a/out/production/Cassa/risorse/Thumbs.db b/out/production/Cassa/risorse/Thumbs.db new file mode 100644 index 0000000..4ad42a6 Binary files /dev/null and b/out/production/Cassa/risorse/Thumbs.db differ diff --git a/out/production/Cassa/risorse/Tiramisu.jpg b/out/production/Cassa/risorse/Tiramisu.jpg new file mode 100644 index 0000000..db5f013 Binary files /dev/null and b/out/production/Cassa/risorse/Tiramisu.jpg differ diff --git a/out/production/Cassa/risorse/Vetrino.jpg b/out/production/Cassa/risorse/Vetrino.jpg new file mode 100644 index 0000000..eab164e Binary files /dev/null and b/out/production/Cassa/risorse/Vetrino.jpg differ diff --git a/out/production/Cassa/risorse/a scalare.png b/out/production/Cassa/risorse/a scalare.png new file mode 100644 index 0000000..f5400ee Binary files /dev/null and b/out/production/Cassa/risorse/a scalare.png differ diff --git a/out/production/Cassa/risorse/coltello e forchetta.jpg b/out/production/Cassa/risorse/coltello e forchetta.jpg new file mode 100644 index 0000000..235b635 Binary files /dev/null and b/out/production/Cassa/risorse/coltello e forchetta.jpg differ diff --git a/out/production/Cassa/risorse/contanti.png b/out/production/Cassa/risorse/contanti.png new file mode 100644 index 0000000..ad3f601 Binary files /dev/null and b/out/production/Cassa/risorse/contanti.png differ diff --git a/out/production/Cassa/risorse/da asporto.jpg b/out/production/Cassa/risorse/da asporto.jpg new file mode 100644 index 0000000..033b098 Binary files /dev/null and b/out/production/Cassa/risorse/da asporto.jpg differ diff --git a/out/production/Cassa/risorse/db.png b/out/production/Cassa/risorse/db.png new file mode 100644 index 0000000..08708f3 Binary files /dev/null and b/out/production/Cassa/risorse/db.png differ diff --git a/out/production/Cassa/risorse/differito.jpg b/out/production/Cassa/risorse/differito.jpg new file mode 100644 index 0000000..59b3f23 Binary files /dev/null and b/out/production/Cassa/risorse/differito.jpg differ diff --git a/out/production/Cassa/risorse/differito.png b/out/production/Cassa/risorse/differito.png new file mode 100644 index 0000000..902bca9 Binary files /dev/null and b/out/production/Cassa/risorse/differito.png differ diff --git a/out/production/Cassa/risorse/esci.jpg b/out/production/Cassa/risorse/esci.jpg new file mode 100644 index 0000000..69febe7 Binary files /dev/null and b/out/production/Cassa/risorse/esci.jpg differ diff --git a/out/production/Cassa/risorse/esci2.jpg b/out/production/Cassa/risorse/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/out/production/Cassa/risorse/esci2.jpg differ diff --git a/out/production/Cassa/risorse/freccia_down.jpg b/out/production/Cassa/risorse/freccia_down.jpg new file mode 100644 index 0000000..b5a8964 Binary files /dev/null and b/out/production/Cassa/risorse/freccia_down.jpg differ diff --git a/out/production/Cassa/risorse/freccia_dx.jpg b/out/production/Cassa/risorse/freccia_dx.jpg new file mode 100644 index 0000000..a3bfff1 Binary files /dev/null and b/out/production/Cassa/risorse/freccia_dx.jpg differ diff --git a/out/production/Cassa/risorse/freccia_sx.jpg b/out/production/Cassa/risorse/freccia_sx.jpg new file mode 100644 index 0000000..8845cfb Binary files /dev/null and b/out/production/Cassa/risorse/freccia_sx.jpg differ diff --git a/out/production/Cassa/risorse/freccia_up.jpg b/out/production/Cassa/risorse/freccia_up.jpg new file mode 100644 index 0000000..bfbd19a Binary files /dev/null and b/out/production/Cassa/risorse/freccia_up.jpg differ diff --git a/out/production/Cassa/risorse/fulmine.jpg b/out/production/Cassa/risorse/fulmine.jpg new file mode 100644 index 0000000..76a0929 Binary files /dev/null and b/out/production/Cassa/risorse/fulmine.jpg differ diff --git a/out/production/Cassa/risorse/fulmine.png b/out/production/Cassa/risorse/fulmine.png new file mode 100644 index 0000000..d9f3bd6 Binary files /dev/null and b/out/production/Cassa/risorse/fulmine.png differ diff --git a/out/production/Cassa/risorse/giù.png b/out/production/Cassa/risorse/giù.png new file mode 100644 index 0000000..3e35679 Binary files /dev/null and b/out/production/Cassa/risorse/giù.png differ diff --git a/out/production/Cassa/risorse/logo (1).png b/out/production/Cassa/risorse/logo (1).png new file mode 100644 index 0000000..1eea74d Binary files /dev/null and b/out/production/Cassa/risorse/logo (1).png differ diff --git a/out/production/Cassa/risorse/logo.png b/out/production/Cassa/risorse/logo.png new file mode 100644 index 0000000..500ce11 Binary files /dev/null and b/out/production/Cassa/risorse/logo.png differ diff --git a/out/production/Cassa/risorse/logoStampa.jpg b/out/production/Cassa/risorse/logoStampa.jpg new file mode 100644 index 0000000..005ba66 Binary files /dev/null and b/out/production/Cassa/risorse/logoStampa.jpg differ diff --git a/out/production/Cassa/risorse/meteo.png b/out/production/Cassa/risorse/meteo.png new file mode 100644 index 0000000..17ed983 Binary files /dev/null and b/out/production/Cassa/risorse/meteo.png differ diff --git a/out/production/Cassa/risorse/print.png b/out/production/Cassa/risorse/print.png new file mode 100644 index 0000000..42999cc Binary files /dev/null and b/out/production/Cassa/risorse/print.png differ diff --git a/out/production/Cassa/risorse/prodotti.png b/out/production/Cassa/risorse/prodotti.png new file mode 100644 index 0000000..3ba74d2 Binary files /dev/null and b/out/production/Cassa/risorse/prodotti.png differ diff --git a/out/production/Cassa/risorse/puntocassa (2).xml b/out/production/Cassa/risorse/puntocassa (2).xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/out/production/Cassa/risorse/puntocassa (2).xml @@ -0,0 +1,43 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + localhost + 1521 + xe + SIR_CASSA + sir_cassa + + + ..\risorse\ + E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/out/production/Cassa/risorse/puntocassa - Copia.xml b/out/production/Cassa/risorse/puntocassa - Copia.xml new file mode 100644 index 0000000..308d9a4 --- /dev/null +++ b/out/production/Cassa/risorse/puntocassa - Copia.xml @@ -0,0 +1,34 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + marco-nbacer + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + + 123 + diff --git a/out/production/Cassa/risorse/puntocassa.xml b/out/production/Cassa/risorse/puntocassa.xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/out/production/Cassa/risorse/puntocassa.xml @@ -0,0 +1,43 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + localhost + 1521 + xe + SIR_CASSA + sir_cassa + + + ..\risorse\ + E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/out/production/Cassa/risorse/puntocassaGF.xml b/out/production/Cassa/risorse/puntocassaGF.xml new file mode 100644 index 0000000..e5bac86 --- /dev/null +++ b/out/production/Cassa/risorse/puntocassaGF.xml @@ -0,0 +1,37 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + XP_TEST + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + 20 + 150 + 150 + + 1 + diff --git a/out/production/Cassa/risorse/storno.png b/out/production/Cassa/risorse/storno.png new file mode 100644 index 0000000..a7071da Binary files /dev/null and b/out/production/Cassa/risorse/storno.png differ diff --git a/out/production/Cassa/risorse/ticket.png b/out/production/Cassa/risorse/ticket.png new file mode 100644 index 0000000..00b3125 Binary files /dev/null and b/out/production/Cassa/risorse/ticket.png differ diff --git a/out/production/Cassa/risorse/ticket2.png b/out/production/Cassa/risorse/ticket2.png new file mode 100644 index 0000000..f2759b1 Binary files /dev/null and b/out/production/Cassa/risorse/ticket2.png differ diff --git a/out/production/Cassa/risorse/tsn.png b/out/production/Cassa/risorse/tsn.png new file mode 100644 index 0000000..cc35a2e Binary files /dev/null and b/out/production/Cassa/risorse/tsn.png differ diff --git a/risorse/Acqua minerale.jpg b/risorse/Acqua minerale.jpg new file mode 100644 index 0000000..416cc55 Binary files /dev/null and b/risorse/Acqua minerale.jpg differ diff --git a/risorse/Brioche.jpg b/risorse/Brioche.jpg new file mode 100644 index 0000000..df3217e Binary files /dev/null and b/risorse/Brioche.jpg differ diff --git a/risorse/Caffe.jpg b/risorse/Caffe.jpg new file mode 100644 index 0000000..8615520 Binary files /dev/null and b/risorse/Caffe.jpg differ diff --git a/risorse/Cappuccino.jpg b/risorse/Cappuccino.jpg new file mode 100644 index 0000000..89f67f8 Binary files /dev/null and b/risorse/Cappuccino.jpg differ diff --git a/risorse/Coca Cola lattina.jpg b/risorse/Coca Cola lattina.jpg new file mode 100644 index 0000000..2f1da8e Binary files /dev/null and b/risorse/Coca Cola lattina.jpg differ diff --git a/risorse/Frutta fresca.jpg b/risorse/Frutta fresca.jpg new file mode 100644 index 0000000..a303980 Binary files /dev/null and b/risorse/Frutta fresca.jpg differ diff --git a/risorse/Hamburger.jpg b/risorse/Hamburger.jpg new file mode 100644 index 0000000..71e7a92 Binary files /dev/null and b/risorse/Hamburger.jpg differ diff --git a/risorse/Insalata nizzarda.jpg b/risorse/Insalata nizzarda.jpg new file mode 100644 index 0000000..42891cb Binary files /dev/null and b/risorse/Insalata nizzarda.jpg differ diff --git a/risorse/Insalata verde.jpg b/risorse/Insalata verde.jpg new file mode 100644 index 0000000..78fa2b3 Binary files /dev/null and b/risorse/Insalata verde.jpg differ diff --git a/risorse/Logo.ico b/risorse/Logo.ico new file mode 100644 index 0000000..2828b6c Binary files /dev/null and b/risorse/Logo.ico differ diff --git a/risorse/Menu colazione.jpg b/risorse/Menu colazione.jpg new file mode 100644 index 0000000..0d643b5 Binary files /dev/null and b/risorse/Menu colazione.jpg differ diff --git a/risorse/Menu completo.jpg b/risorse/Menu completo.jpg new file mode 100644 index 0000000..92417af Binary files /dev/null and b/risorse/Menu completo.jpg differ diff --git a/risorse/Menu ridotto.jpg b/risorse/Menu ridotto.jpg new file mode 100644 index 0000000..a696599 Binary files /dev/null and b/risorse/Menu ridotto.jpg differ diff --git a/risorse/Movimenti.jpg b/risorse/Movimenti.jpg new file mode 100644 index 0000000..069bfeb Binary files /dev/null and b/risorse/Movimenti.jpg differ diff --git a/risorse/Movimenti.png b/risorse/Movimenti.png new file mode 100644 index 0000000..6d3773f Binary files /dev/null and b/risorse/Movimenti.png differ diff --git a/risorse/Omelette.jpg b/risorse/Omelette.jpg new file mode 100644 index 0000000..afe6bb4 Binary files /dev/null and b/risorse/Omelette.jpg differ diff --git a/risorse/Pasta al ragu.jpg b/risorse/Pasta al ragu.jpg new file mode 100644 index 0000000..13e469b Binary files /dev/null and b/risorse/Pasta al ragu.jpg differ diff --git a/risorse/Pasta fredda.jpg b/risorse/Pasta fredda.jpg new file mode 100644 index 0000000..8216fae Binary files /dev/null and b/risorse/Pasta fredda.jpg differ diff --git a/risorse/Prosciutto crudo.jpg b/risorse/Prosciutto crudo.jpg new file mode 100644 index 0000000..228779e Binary files /dev/null and b/risorse/Prosciutto crudo.jpg differ diff --git a/risorse/Risotto.jpg b/risorse/Risotto.jpg new file mode 100644 index 0000000..0308f6e Binary files /dev/null and b/risorse/Risotto.jpg differ diff --git a/risorse/Spremuta arancia.jpg b/risorse/Spremuta arancia.jpg new file mode 100644 index 0000000..87593ea Binary files /dev/null and b/risorse/Spremuta arancia.jpg differ diff --git a/risorse/Thumbs.db b/risorse/Thumbs.db new file mode 100644 index 0000000..5feb624 Binary files /dev/null and b/risorse/Thumbs.db differ diff --git a/risorse/Tiramisu.jpg b/risorse/Tiramisu.jpg new file mode 100644 index 0000000..db5f013 Binary files /dev/null and b/risorse/Tiramisu.jpg differ diff --git a/risorse/Vetrino.jpg b/risorse/Vetrino.jpg new file mode 100644 index 0000000..eab164e Binary files /dev/null and b/risorse/Vetrino.jpg differ diff --git a/risorse/a scalare.png b/risorse/a scalare.png new file mode 100644 index 0000000..f5400ee Binary files /dev/null and b/risorse/a scalare.png differ diff --git a/risorse/coltello e forchetta.jpg b/risorse/coltello e forchetta.jpg new file mode 100644 index 0000000..235b635 Binary files /dev/null and b/risorse/coltello e forchetta.jpg differ diff --git a/risorse/contanti.png b/risorse/contanti.png new file mode 100644 index 0000000..ad3f601 Binary files /dev/null and b/risorse/contanti.png differ diff --git a/risorse/da asporto.jpg b/risorse/da asporto.jpg new file mode 100644 index 0000000..033b098 Binary files /dev/null and b/risorse/da asporto.jpg differ diff --git a/risorse/db.png b/risorse/db.png new file mode 100644 index 0000000..08708f3 Binary files /dev/null and b/risorse/db.png differ diff --git a/risorse/differito.jpg b/risorse/differito.jpg new file mode 100644 index 0000000..59b3f23 Binary files /dev/null and b/risorse/differito.jpg differ diff --git a/risorse/differito.png b/risorse/differito.png new file mode 100644 index 0000000..902bca9 Binary files /dev/null and b/risorse/differito.png differ diff --git a/risorse/esci.jpg b/risorse/esci.jpg new file mode 100644 index 0000000..69febe7 Binary files /dev/null and b/risorse/esci.jpg differ diff --git a/risorse/esci2.jpg b/risorse/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/risorse/esci2.jpg differ diff --git a/risorse/freccia_down.jpg b/risorse/freccia_down.jpg new file mode 100644 index 0000000..b5a8964 Binary files /dev/null and b/risorse/freccia_down.jpg differ diff --git a/risorse/freccia_dx.jpg b/risorse/freccia_dx.jpg new file mode 100644 index 0000000..a3bfff1 Binary files /dev/null and b/risorse/freccia_dx.jpg differ diff --git a/risorse/freccia_sx.jpg b/risorse/freccia_sx.jpg new file mode 100644 index 0000000..8845cfb Binary files /dev/null and b/risorse/freccia_sx.jpg differ diff --git a/risorse/freccia_up.jpg b/risorse/freccia_up.jpg new file mode 100644 index 0000000..bfbd19a Binary files /dev/null and b/risorse/freccia_up.jpg differ diff --git a/risorse/fulmine.jpg b/risorse/fulmine.jpg new file mode 100644 index 0000000..76a0929 Binary files /dev/null and b/risorse/fulmine.jpg differ diff --git a/risorse/logo (1).png b/risorse/logo (1).png new file mode 100644 index 0000000..1eea74d Binary files /dev/null and b/risorse/logo (1).png differ diff --git a/risorse/logo.png b/risorse/logo.png new file mode 100644 index 0000000..500ce11 Binary files /dev/null and b/risorse/logo.png differ diff --git a/risorse/logoStampa.jpg b/risorse/logoStampa.jpg new file mode 100644 index 0000000..005ba66 Binary files /dev/null and b/risorse/logoStampa.jpg differ diff --git a/risorse/meteo.png b/risorse/meteo.png new file mode 100644 index 0000000..17ed983 Binary files /dev/null and b/risorse/meteo.png differ diff --git a/risorse/print.png b/risorse/print.png new file mode 100644 index 0000000..42999cc Binary files /dev/null and b/risorse/print.png differ diff --git a/risorse/prodotti.png b/risorse/prodotti.png new file mode 100644 index 0000000..3ba74d2 Binary files /dev/null and b/risorse/prodotti.png differ diff --git a/risorse/puntocassa - Copia.xml b/risorse/puntocassa - Copia.xml new file mode 100644 index 0000000..308d9a4 --- /dev/null +++ b/risorse/puntocassa - Copia.xml @@ -0,0 +1,34 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + marco-nbacer + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + + 123 + diff --git a/risorse/puntocassa.xml b/risorse/puntocassa.xml new file mode 100644 index 0000000..cf12655 --- /dev/null +++ b/risorse/puntocassa.xml @@ -0,0 +1,63 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + NO + Oracle + oracle.jdbc.driver.OracleDriver + 192.168.20.170 + 1521 + XE + SIR_CASSA + cGhYYXVGVU0yUVRhckZHZHlsMmM= + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + 192.168.20.101 + 1521 + SIR + SIR_CASSA + cGhYYXVGVU0yUVRhckZHZHlsMmM= + + + NO + Oracle + oracle.jdbc.driver.OracleDriver + 192.168.20.170 + 1521 + XE + SIR_CASSA + cGhYYXVGVU0yUVRhckZHZHlsMmM= + + + ..\risorse\ + E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/risorse/puntocassa2.xml b/risorse/puntocassa2.xml new file mode 100644 index 0000000..dd080fa --- /dev/null +++ b/risorse/puntocassa2.xml @@ -0,0 +1,43 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + localhost + 1521 + xe + SIR_CASSA + sir_cassa + + + ..\risorse\ + G:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/risorse/puntocassaGF.xml b/risorse/puntocassaGF.xml new file mode 100644 index 0000000..e5bac86 --- /dev/null +++ b/risorse/puntocassaGF.xml @@ -0,0 +1,37 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + XP_TEST + 1521 + XE + SIR_CASSA + sir_cassa + + + L:\Lavoro\Goffredo\risorse\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa 123 + + + 1024 + 700 + 20 + 150 + 150 + + 1 + diff --git a/risorse/puntocassaold.xml b/risorse/puntocassaold.xml new file mode 100644 index 0000000..dd89636 --- /dev/null +++ b/risorse/puntocassaold.xml @@ -0,0 +1,44 @@ + + + + NO + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + SI + Oracle + oracle.jdbc.driver.OracleDriver + 192.168.20.101 + 1521 + sir + SIR_CASSA + cGhYYXVGVU0yUVRhckZHZHlsMmM= + + + + ..\risorse\ + g:\Lavoro\Goffredo\Cassa\dist\Cassa.jar + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + + 1024 + 700 + 20 + 150 + 150 + SI + + + NO + + DSU TOSCANA - SIR + diff --git a/risorse/storno.png b/risorse/storno.png new file mode 100644 index 0000000..a7071da Binary files /dev/null and b/risorse/storno.png differ diff --git a/risorse/ticket.png b/risorse/ticket.png new file mode 100644 index 0000000..00b3125 Binary files /dev/null and b/risorse/ticket.png differ diff --git a/risorse/ticket2.png b/risorse/ticket2.png new file mode 100644 index 0000000..f2759b1 Binary files /dev/null and b/risorse/ticket2.png differ diff --git a/risorse/tsn.png b/risorse/tsn.png new file mode 100644 index 0000000..cc35a2e Binary files /dev/null and b/risorse/tsn.png differ diff --git a/risorseOLD/Acqua minerale.jpg b/risorseOLD/Acqua minerale.jpg new file mode 100644 index 0000000..416cc55 Binary files /dev/null and b/risorseOLD/Acqua minerale.jpg differ diff --git a/risorseOLD/Brioche.jpg b/risorseOLD/Brioche.jpg new file mode 100644 index 0000000..62815bf Binary files /dev/null and b/risorseOLD/Brioche.jpg differ diff --git a/risorseOLD/Caffe.jpg b/risorseOLD/Caffe.jpg new file mode 100644 index 0000000..8615520 Binary files /dev/null and b/risorseOLD/Caffe.jpg differ diff --git a/risorseOLD/Cappuccino.jpg b/risorseOLD/Cappuccino.jpg new file mode 100644 index 0000000..89f67f8 Binary files /dev/null and b/risorseOLD/Cappuccino.jpg differ diff --git a/risorseOLD/Coca Cola lattina.jpg b/risorseOLD/Coca Cola lattina.jpg new file mode 100644 index 0000000..2f1da8e Binary files /dev/null and b/risorseOLD/Coca Cola lattina.jpg differ diff --git a/risorseOLD/Frutta fresca.jpg b/risorseOLD/Frutta fresca.jpg new file mode 100644 index 0000000..a303980 Binary files /dev/null and b/risorseOLD/Frutta fresca.jpg differ diff --git a/risorseOLD/Hamburger.jpg b/risorseOLD/Hamburger.jpg new file mode 100644 index 0000000..71e7a92 Binary files /dev/null and b/risorseOLD/Hamburger.jpg differ diff --git a/risorseOLD/Hot dog.jpg b/risorseOLD/Hot dog.jpg new file mode 100644 index 0000000..c814b25 Binary files /dev/null and b/risorseOLD/Hot dog.jpg differ diff --git a/risorseOLD/Insalata nizzarda.jpg b/risorseOLD/Insalata nizzarda.jpg new file mode 100644 index 0000000..42891cb Binary files /dev/null and b/risorseOLD/Insalata nizzarda.jpg differ diff --git a/risorseOLD/Insalata verde.jpg b/risorseOLD/Insalata verde.jpg new file mode 100644 index 0000000..78fa2b3 Binary files /dev/null and b/risorseOLD/Insalata verde.jpg differ diff --git a/risorseOLD/Menu cena.jpg b/risorseOLD/Menu cena.jpg new file mode 100644 index 0000000..a696599 Binary files /dev/null and b/risorseOLD/Menu cena.jpg differ diff --git a/risorseOLD/Menu colazione.jpg b/risorseOLD/Menu colazione.jpg new file mode 100644 index 0000000..0d643b5 Binary files /dev/null and b/risorseOLD/Menu colazione.jpg differ diff --git a/risorseOLD/Menu pranzo.jpg b/risorseOLD/Menu pranzo.jpg new file mode 100644 index 0000000..92417af Binary files /dev/null and b/risorseOLD/Menu pranzo.jpg differ diff --git a/risorseOLD/Omelette.jpg b/risorseOLD/Omelette.jpg new file mode 100644 index 0000000..afe6bb4 Binary files /dev/null and b/risorseOLD/Omelette.jpg differ diff --git a/risorseOLD/Pasta al ragu.jpg b/risorseOLD/Pasta al ragu.jpg new file mode 100644 index 0000000..13e469b Binary files /dev/null and b/risorseOLD/Pasta al ragu.jpg differ diff --git a/risorseOLD/Pasta fredda.jpg b/risorseOLD/Pasta fredda.jpg new file mode 100644 index 0000000..8216fae Binary files /dev/null and b/risorseOLD/Pasta fredda.jpg differ diff --git a/risorseOLD/Pizza margherita.jpg b/risorseOLD/Pizza margherita.jpg new file mode 100644 index 0000000..92e300a Binary files /dev/null and b/risorseOLD/Pizza margherita.jpg differ diff --git a/risorseOLD/Prosciutto crudo.jpg b/risorseOLD/Prosciutto crudo.jpg new file mode 100644 index 0000000..228779e Binary files /dev/null and b/risorseOLD/Prosciutto crudo.jpg differ diff --git a/risorseOLD/Risotto.jpg b/risorseOLD/Risotto.jpg new file mode 100644 index 0000000..0308f6e Binary files /dev/null and b/risorseOLD/Risotto.jpg differ diff --git a/risorseOLD/Spremuta arancia.jpg b/risorseOLD/Spremuta arancia.jpg new file mode 100644 index 0000000..87593ea Binary files /dev/null and b/risorseOLD/Spremuta arancia.jpg differ diff --git a/risorseOLD/Thumbs.db b/risorseOLD/Thumbs.db new file mode 100644 index 0000000..c66e787 Binary files /dev/null and b/risorseOLD/Thumbs.db differ diff --git a/risorseOLD/Tiramisu.jpg b/risorseOLD/Tiramisu.jpg new file mode 100644 index 0000000..db5f013 Binary files /dev/null and b/risorseOLD/Tiramisu.jpg differ diff --git a/risorseOLD/Vetrino.jpg b/risorseOLD/Vetrino.jpg new file mode 100644 index 0000000..eab164e Binary files /dev/null and b/risorseOLD/Vetrino.jpg differ diff --git a/risorseOLD/puntocassa.xml b/risorseOLD/puntocassa.xml new file mode 100644 index 0000000..b4599ff --- /dev/null +++ b/risorseOLD/puntocassa.xml @@ -0,0 +1,33 @@ + + + + SI + MySQL + com.mysql.jdbc.Driver + localhost + 3306 + sir + sir + sir + + + NO + Oracle + oracle.jdbc.driver.OracleDriver + hp630 + 1521 + xe + sir + sir + + + L:\\Lavoro\\Goffredo\\Progetto_Casse_NetBeans\\risorse\\ + + + SIR - Sistema Informativo della Ristorazione: Punto Cassa + + + 800 + 600 + + diff --git a/src/Cassa.jar b/src/Cassa.jar new file mode 100644 index 0000000..69078d1 Binary files /dev/null and b/src/Cassa.jar differ diff --git a/src/SmartCard/APDUCommandBoxing.java b/src/SmartCard/APDUCommandBoxing.java new file mode 100644 index 0000000..d417cf5 --- /dev/null +++ b/src/SmartCard/APDUCommandBoxing.java @@ -0,0 +1,58 @@ + +package SmartCard; + +import javax.smartcardio.CommandAPDU; + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ + public class APDUCommandBoxing{ + private CommandAPDU apdu; + private String mnemonic; + + public APDUCommandBoxing(String iLine){ + String[] arr = iLine.split("\\s+"); + if(arr.length<8) throw new IllegalArgumentException("iLine"); + mnemonic = arr[0]; + int cla= StringUtil.parseHex(arr[1]); + int ins= StringUtil.parseHex(arr[2]); + int p1= StringUtil.parseHex(arr[3]); + int p2= StringUtil.parseHex(arr[4]); + int p3= StringUtil.parseHex(arr[5]); + byte[] data = StringUtil.stringToByteArr(arr[6].replace(',',' ').substring(1, arr[6].length()-1)); + int ne= StringUtil.parseHex(arr[7]); + + apdu = new CommandAPDU(cla,ins,p1,p2,data,0,p3,ne); + } + + + public APDUCommandBoxing(CommandAPDU iApdu,String iMnemonic){ + apdu = iApdu; + mnemonic = iMnemonic; + } + + public String getMnemonic() { + return mnemonic; + } + + public CommandAPDU getAPDU(){ + return apdu; + } + + @Override + public String toString() { + int spaceLen = 16 - mnemonic.length(); + if(spaceLen < 0) spaceLen = 1; + return mnemonic + StringUtil.spaces(spaceLen) + + StringUtil.byteToHex(apdu.getCLA()) + " " + + StringUtil.byteToHex(apdu.getINS()) + " " + + StringUtil.byteToHex(apdu.getP1()) + " " + + StringUtil.byteToHex(apdu.getP2()) + " " + + StringUtil.byteToHex(apdu.getNc()) + " " + + "["+StringUtil.byteArrToString(apdu.getData(),",") + "] " + + StringUtil.byteToHex(apdu.getNe()); + + } + + } \ No newline at end of file diff --git a/src/SmartCard/CardList.java b/src/SmartCard/CardList.java new file mode 100644 index 0000000..9c03117 --- /dev/null +++ b/src/SmartCard/CardList.java @@ -0,0 +1,67 @@ + +package SmartCard; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.Hashtable; +import java.util.Map; +import javax.smartcardio.ATR; + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ +public class CardList { + static Map cards = new Hashtable(); + + static{ + loadCardList(); + } + + public static String lookupByAtr(byte[] iAtr){ + String name = cards.get(new ATR(iAtr)); + if(name == null) + return "Unknown card"; + else + return name; + } + + static void loadCardList(){ + try{ + BufferedReader bi = new BufferedReader(new InputStreamReader(CardList.class.getResourceAsStream("resources/cardlist.txt"))); + String line=""; + + byte[] lastATR=null; + String lastName = ""; + + while((line = bi.readLine())!=null){ + if(line.startsWith("#")) continue; + try{ + if(line.length()<2){ + cards.put(new ATR(lastATR), lastName); + lastATR=null; + }else{ + if(lastATR==null){ + lastATR = StringUtil.stringToByteArr(line); + lastName =""; + } + else{ + line = line.trim(); + if(lastName == null) lastName =""; + if(!lastName.equals("")) lastName+="; "; + lastName += line; + } + } + }catch(Exception ex){} + + } + bi.close(); + //System.out.println(cards.size()+" cards loaded"); + }catch(Exception ex){ + ex.printStackTrace(); + } + } + + +} + diff --git a/src/SmartCard/FrmMain.form b/src/SmartCard/FrmMain.form new file mode 100644 index 0000000..e31335a --- /dev/null +++ b/src/SmartCard/FrmMain.form @@ -0,0 +1,1370 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="30" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="30" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="30" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="30" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="30" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="90" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="editingColumn" type="int" value="0"/> + <Property name="editingRow" type="int" value="0"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[2147483647, 1000]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="null"/> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="tabAPDUMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Class"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="INS"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="P1"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="P2"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Lc"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Data Sent (Hex)"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Le"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="SW"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Data Recv (Hex)"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistClass"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistIns"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistP1"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistP2"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistP3"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistDataIn"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistDataLen"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistSW"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="tbHistDataOut"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e7" green="ea" red="ec" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JTabbedPane" name="tabs"> + <Properties> + <Property name="tabPlacement" type="int" value="3"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription"> + <JSplitPaneConstraints position="right"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="panSendAPDU"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e0" green="dd" red="d5" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="Send APDU"> + <Property name="tabTitle" type="java.lang.String" value="Send APDU"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton1" alignment="1" pref="877" max="32767" attributes="2"/> + <Group type="102" alignment="1" attributes="0"> + <Component id="btWizard" min="-2" pref="57" max="-2" attributes="1"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="tbAPDUClass" linkSize="5" alignment="0" min="-2" pref="30" max="-2" attributes="1"/> + <Component id="jLabel2" linkSize="5" alignment="0" pref="30" max="32767" attributes="1"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" linkSize="6" alignment="0" pref="30" max="32767" attributes="1"/> + <Component id="tbAPDUIns" linkSize="6" alignment="0" min="-2" pref="30" max="-2" attributes="1"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" linkSize="7" alignment="0" pref="30" max="32767" attributes="1"/> + <Component id="tbAPDUP1" linkSize="7" alignment="0" min="-2" pref="30" max="-2" attributes="1"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="tbAPDUP2" linkSize="8" alignment="0" min="-2" pref="30" max="-2" attributes="1"/> + <Component id="jLabel5" linkSize="8" alignment="0" pref="30" max="32767" attributes="1"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel7" linkSize="9" alignment="0" pref="30" max="32767" attributes="1"/> + <Component id="tbAPDUP3" linkSize="9" alignment="0" min="-2" pref="30" max="-2" attributes="1"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel8" pref="575" max="32767" attributes="0"/> + <Component id="tbAPDUDatain" min="-2" pref="575" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel9" pref="46" max="32767" attributes="1"/> + <Component id="tbAPDULe" min="-2" pref="46" max="-2" attributes="1"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel21" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="lbLastStatus" pref="744" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="btWizard" alignment="0" min="-2" pref="46" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="tbAPDUClass" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="tbAPDUIns" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="tbAPDUP1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="tbAPDUP2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="tbAPDUP3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="tbAPDUDatain" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="tbAPDULe" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton1" min="-2" pref="28" max="-2" attributes="0"/> + <EmptySpace pref="72" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lbLastStatus" alignment="3" min="-2" pref="19" max="-2" attributes="0"/> + <Component id="jLabel21" alignment="3" min="-2" pref="19" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JFormattedTextField" name="tbAPDUClass"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="HH" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUClassFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUClassFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JFormattedTextField" name="tbAPDUIns"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="HH" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUInsFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUInsFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JFormattedTextField" name="tbAPDUP1"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="HH" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP1FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP1FocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JFormattedTextField" name="tbAPDUP2"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="HH" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP2FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP2FocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JFormattedTextField" name="tbAPDUP3"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="HH" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="toolTipText" type="java.lang.String" value="Data length"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP3FocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUP3FocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JFormattedTextField" name="tbAPDULe"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor" preCode="try {" postCode="} catch (java.text.ParseException ex) { ex.printStackTrace(); }"> + <Format format="****" subtype="-1" type="5"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDULeFocusGained"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDULeFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Class"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="INS"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="P1"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="P2"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Lc"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Data IN (Hex)"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Le"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> + <BevelBorder bevelType="1"/> + </Border> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="11" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Send"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="btWizard"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/SmartCard/resources/wizard.png"/> + </Property> + <Property name="text" type="java.lang.String" value="..."/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btWizardActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="tbAPDUDatain"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="11" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="tbAPDUDatainMouseClicked"/> + <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tbAPDUDatainFocusLost"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel21"> + <Properties> + <Property name="text" type="java.lang.String" value="Last command status:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lbLastStatus"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="panSavedAPDU"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="Saved APDUs"> + <Property name="tabTitle" type="java.lang.String" value="Saved APDUs"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane2" alignment="0" pref="877" max="32767" attributes="0"/> + <Component id="jLabel19" alignment="0" min="-2" pref="294" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel19" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane2" pref="173" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JList" name="listAPDU"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Monospaced" size="11" style="0"/> + </Property> + <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> + <StringArray count="0"/> + </Property> + <Property name="selectionMode" type="int" value="0"/> + <Property name="toolTipText" type="java.lang.String" value="Double-click to copy into "Send APDU""/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="listAPDUMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel19"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="10" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="66" green="66" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Double-click to copy into "Send APDU""/> + <Property name="verticalAlignment" type="int" value="3"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="panDataView"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="Data view"> + <Property name="tabTitle" type="java.lang.String" value="Data view"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel20" min="-2" max="-2" attributes="0"/> + <Component id="scrollSentData" pref="435" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="scrollRecvData" pref="435" max="32767" attributes="0"/> + <Component id="jLabel22" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel20" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel22" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="scrollRecvData" pref="186" max="32767" attributes="0"/> + <Component id="scrollSentData" alignment="0" pref="186" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel20"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="10" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="66" green="66" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Sent data"/> + <Property name="verticalAlignment" type="int" value="3"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="scrollSentData"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="tbSentData"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="editable" type="boolean" value="false"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Monospaced" size="11" style="0"/> + </Property> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="scrollRecvData"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="tbRecvData"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="columns" type="int" value="20"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Monospaced" size="11" style="0"/> + </Property> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel22"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="10" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="66" green="66" red="66" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Received data"/> + <Property name="verticalAlignment" type="int" value="3"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="panFS"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="FileSystem Data (Experimental)"> + <Property name="tabTitle" type="java.lang.String" value="FileSystem Data (Experimental)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane5" min="-2" pref="274" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="scrollFSData" pref="596" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="scrollFSData" alignment="0" pref="180" max="32767" attributes="0"/> + <Component id="jScrollPane5" alignment="0" pref="180" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane5"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTree" name="treeFS"> + <Properties> + <Property name="model" type="javax.swing.tree.TreeModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="null" type="code"/> + </Property> + <Property name="rootVisible" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="valueChanged" listener="javax.swing.event.TreeSelectionListener" parameters="javax.swing.event.TreeSelectionEvent" handler="treeFSValueChanged"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="scrollFSData"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="tbFSData"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="editable" type="boolean" value="false"/> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Monospaced" size="11" style="0"/> + </Property> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/SmartCard/FrmMain.java b/src/SmartCard/FrmMain.java new file mode 100644 index 0000000..aff7910 --- /dev/null +++ b/src/SmartCard/FrmMain.java @@ -0,0 +1,1513 @@ +/* + * FrmMain.java + * + * Created on 9 luglio 2008, 22.39 + */ + +package SmartCard; + +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.InputStreamReader; +import javax.smartcardio.CardException; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JFileChooser; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JSeparator; +import javax.swing.JTextField; +import javax.swing.table.DefaultTableModel; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; + +/** + * + * @author Administrator + */ +public class FrmMain extends javax.swing.JFrame { + SmartCard SC = new SmartCard(); + DefaultComboBoxModel listAPDUmod = new DefaultComboBoxModel(); + DefaultTreeModel fsTreeData; + + /** Creates new form FrmMain */ + public FrmMain() { + initComponents(); + updateReaderCombo(); + + fsTreeData = new DefaultTreeModel(new DefaultMutableTreeNode("/")); + treeFS.setModel(fsTreeData); + + loadWizards(); + listAPDU.setModel(listAPDUmod); + + } + + private void saveProject(){ + try{ + JFileChooser f = new JFileChooser(); + f.showSaveDialog(this); + File saveFile = f.getSelectedFile(); + if(saveFile == null) return; + + FileWriter w = new FileWriter(saveFile); + for(int i=0; i<listAPDUmod.getSize(); i++){ + APDUCommandBoxing apdu = (APDUCommandBoxing) listAPDUmod.getElementAt(i); + w.write(apdu.toString()); + w.write("\n"); + } + w.close(); + JOptionPane.showMessageDialog(this, "Saved to "+ saveFile.getAbsolutePath()); + }catch(Exception ex){ + reportException(ex); + } + } + + private void loadProject(){ + try{ + JFileChooser f = new JFileChooser(); + f.showOpenDialog(this); + File openFile = f.getSelectedFile(); + if(openFile == null || !openFile.exists()) return; + + BufferedReader r = new BufferedReader(new FileReader(openFile)); + String line=null; + listAPDUmod.removeAllElements(); + ((DefaultTableModel)tabAPDU.getModel()).setRowCount(0); + + while((line = r.readLine())!=null){ + APDUCommandBoxing apdu = new APDUCommandBoxing(line); + listAPDUmod.addElement(apdu); + } + r.close(); + tabs.setSelectedComponent(panSavedAPDU); + }catch(Exception ex){ + reportException(ex); + } + + } + + + private void loadWizards(){ + ActionListener mnuAct = new ActionListener() {public void actionPerformed(ActionEvent e) {mnuSelectActionPerformed(e);}}; + try{ + BufferedReader bi = new BufferedReader(new InputStreamReader(CardList.class.getResourceAsStream("resources/commands.txt"))); + String line = null; + while((line=bi.readLine())!=null){ + String arr[] = line.split("=",2); + if(arr.length!=2) continue; + JMenuItem itm = new JMenuItem(arr[0]); + itm.setToolTipText(arr[1]); //Decoding is done by tool tip text + itm.addActionListener(mnuAct); + mnuWizards.add(itm); + } + mnuWizards.add(new JSeparator()); + bi.close(); + }catch(Exception ex){ + ex.printStackTrace(); + } + } + + private void insertStringData(){ + String str = JOptionPane.showInputDialog(this, "Type ascii data to convert"); + if(str == null) return; + tbAPDUDatain.setText(StringUtil.byteArrToString(str.getBytes(), " ")); + } + + private String getProtocolString(){ + switch(cbProto.getSelectedIndex()){ + case 1: + return "T=0"; + case 0: + return "T=1"; + default: + return "*"; + } + } + private void restoreAPDUFromHistory(){ + if(listAPDU.getSelectedValue() == null) return; + CommandAPDU apdu = ((APDUCommandBoxing)listAPDU.getSelectedValue()).getAPDU(); + + tbAPDUClass.setText(StringUtil.byteToHex(apdu.getCLA())); + tbAPDUIns.setText(StringUtil.byteToHex(apdu.getINS())); + tbAPDUP1.setText(StringUtil.byteToHex(apdu.getP1())); + tbAPDUP2.setText(StringUtil.byteToHex(apdu.getP2())); + tbAPDUP3.setText(StringUtil.byteToHex(apdu.getNc())); + tbAPDUDatain.setText(StringUtil.byteArrToString(apdu.getData()," ")); + tbAPDULe.setText(StringUtil.byteToHex(apdu.getNe())); + tabs.setSelectedIndex(0); + } + + private void mnuSelectActionPerformed(java.awt.event.ActionEvent evt) { + if(!(evt.getSource() instanceof JMenuItem)) + return; + JMenuItem itm = (JMenuItem) evt.getSource(); + String tip = itm.getToolTipText(); + if(tip.length() < 3) return; + tip = tip.substring(1, tip.length()-1); + for(String el : tip.split(",")){ + String[] k = el.trim().split(":"); + if(k.length != 2) continue; + String key = k[0]; + String val = k[1]; + if(key.equals("CLA")) + tbAPDUClass.setText(val); + else if(key.equals("INS")) + tbAPDUIns.setText(val); + else if(key.equals("INS")) + tbAPDUIns.setText(val); + else if(key.equals("P1")) + tbAPDUP1.setText(val); + else if(key.equals("P2")) + tbAPDUP2.setText(val); + else if(key.equals("P3")) + tbAPDUP3.setText(val); + else if(key.equals("DATA")) + tbAPDUDatain.setText(val); + else if(key.equals("LE")) + tbAPDULe.setText(val); + } + } + + void updateSelectedTableRow(){ + int row = tabAPDU.getSelectedRow(); + if(row < 0) return; + + APDUSet apdu = getTableAPDU(); + tbHistClass.setText(StringUtil.byteToHex(apdu.Cmd.getCLA())); + tbHistIns.setText(StringUtil.byteToHex(apdu.Cmd.getINS())); + tbHistP1.setText(StringUtil.byteToHex(apdu.Cmd.getP1())); + tbHistP2.setText(StringUtil.byteToHex(apdu.Cmd.getP2())); + tbHistP3.setText(StringUtil.byteToHex(apdu.Cmd.getNc())); + tbHistDataIn.setText(StringUtil.byteArrToString(apdu.Cmd.getData()," ")); + tbHistDataIn.setToolTipText(StringUtil.byteArrToPrintableString(apdu.Cmd.getData())); + tbHistDataOut.setText(StringUtil.byteArrToString(apdu.Resp.getData()," ")); + tbHistDataOut.setToolTipText(StringUtil.byteArrToPrintableString(apdu.Resp.getData())); + tbHistSW.setText(StringUtil.byteToHex(apdu.Resp.getSW1()) + " " + StringUtil.byteToHex(apdu.Resp.getSW2())); + tbHistSW.setToolTipText(ISO7816Response.getResponseString(apdu.Resp.getSW1(),apdu.Resp.getSW2())); + tbSentData.setText(StringUtil.hexDump(apdu.Cmd.getData(), 16)); + tbRecvData.setText(StringUtil.hexDump(apdu.Resp.getData(), 16)); + + try{ + DefaultMutableTreeNode root = (DefaultMutableTreeNode) fsTreeData.getRoot(); + root.removeAllChildren(); + ISO7816FileSystem.DF fs = ISO7816FileSystem.parseStructure(apdu.Resp.getData(), 0); + + addDFToTreeNode(root,fs); + treeFS.updateUI(); + + }catch(Exception ex){ + + + } + } + + private void addDFToTreeNode(DefaultMutableTreeNode iNode, ISO7816FileSystem.DF iDF){ + DefaultMutableTreeNode curRoot = new DefaultMutableTreeNode(iDF); + iNode.add(curRoot); + + for(ISO7816FileSystem.EF ef : iDF.getSubEFs()) + curRoot.add(new DefaultMutableTreeNode(ef)); + for(ISO7816FileSystem.DF df : iDF.getSubDFs()) + addDFToTreeNode(curRoot, df); + + + } + + APDUSet getTableAPDU(){ + APDUSet outSet = new APDUSet(); + int row =tabAPDU.getSelectedRow(); + if(row < 0 )return null; + DefaultTableModel mod = (DefaultTableModel) tabAPDU.getModel(); + + String Scla = mod.getValueAt(row, 0).toString(); + String Sins = mod.getValueAt(row, 1).toString(); + String Sp1 = mod.getValueAt(row, 2).toString(); + String Sp2 = mod.getValueAt(row, 3).toString(); + String Sp3 = mod.getValueAt(row, 4).toString(); + String Sle = mod.getValueAt(row, 5).toString(); + String Sdata = mod.getValueAt(row, 6).toString(); + String Sdataresp = mod.getValueAt(row, 11).toString(); + + Integer cla = StringUtil.parseHex(Scla); + Integer ins = StringUtil.parseHex(Sins); + Integer p1 = StringUtil.parseHex(Sp1); + Integer p2 = StringUtil.parseHex(Sp2); + Integer p3 = StringUtil.parseHex(Sp3); + Integer le = StringUtil.parseHex(Sle); + + byte[] data = StringUtil.stringToByteArr(Sdata); + byte[] respBytes = StringUtil.stringToByteArr(Sdataresp); + + CommandAPDU apdu=null; + + if(p3==null && Sdata.length()==0 && le==null) + apdu = new CommandAPDU(cla, ins,p1, p2); + else if(p3 == null && le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2, data); + else if(le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2,data,0,p3); + else{ + if(p3 == null) p3 = 0; + apdu = new CommandAPDU(cla, ins ,p1, p2, data,0,p3,le); + } + + ResponseAPDU apdures = new ResponseAPDU(respBytes); + + outSet.Cmd = apdu; + outSet.Resp = apdures; + return outSet; + + } + + void sendAPDU() throws CardException{ + CommandAPDU apdu=null; + + if(!SC.isConnected()){ + this.reportException(new Exception("Please connect first")); + return; + } + + String Sdata = tbAPDUDatain.getText().trim(); + + String Scla = tbAPDUClass.getText().trim(); + String Sins = tbAPDUIns.getText().trim(); + String Sp1 = tbAPDUP1.getText().trim(); + String Sp2 = tbAPDUP2.getText().trim(); + String Sp3 = tbAPDUP3.getText().trim(); + + String Sle = tbAPDULe.getText().trim(); + + Integer cla = StringUtil.parseHex(Scla); + Integer ins = StringUtil.parseHex(Sins); + Integer p1 = StringUtil.parseHex(Sp1); + Integer p2 = StringUtil.parseHex(Sp2); + Integer p3 = StringUtil.parseHex(Sp3); + Integer le = StringUtil.parseHex(Sle); + + if(cla == null){ + this.reportException(new Exception("Invalid value for CLASS")); + return; + } + if(ins == null){ + this.reportException(new Exception("Invalid value for INS")); + return; + } + if(p1 == null || p2 == null){ + this.reportException(new Exception("Invalid value for P1/2")); + return; + } + + byte[] data = StringUtil.stringToByteArr(Sdata); + + if(Sdata.length()==0 && le==null) + apdu = new CommandAPDU(cla, ins,p1, p2); + else if(p3 == null && le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2, data); + else if(le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2,data,0,p3); + else{ + if(p3==null) p3 = data.length; + apdu = new CommandAPDU(cla, ins ,p1, p2, data,0,p3,le); + } + + ResponseAPDU res = SC.getChannel().transmit(apdu); + + String sw = StringUtil.byteToHex(res.getSW1()) + " " + StringUtil.byteToHex(res.getSW2()) ; + ISO7816Response isoResp = new ISO7816Response(res.getSW1(), res.getSW2()); + String status = isoResp.toString(); + + if(isoResp.isGood()) + lbLastStatus.setForeground(Color.GREEN); + else + lbLastStatus.setForeground(Color.RED); + lbLastStatus.setText(status); + + String dataoutHex = StringUtil.byteArrToString(res.getData()," "); + String dataoutStr = StringUtil.byteArrToPrintableString(res.getData()); + String fullResHex = StringUtil.byteArrToString(res.getBytes()," "); + DefaultTableModel table = (DefaultTableModel) tabAPDU.getModel(); + table.addRow(new Object[]{ + Scla, + Sins, + Sp1, + Sp2, + Sp3, + Sle, + Sdata, + sw, + status, + dataoutHex, + dataoutStr, + fullResHex + }); + table.fireTableDataChanged(); + + } + + + + void updateReaderCombo(){ + try{ + cbReader.setModel(new DefaultComboBoxModel(SC.listReaders())); + }catch(Exception ex){ + reportException(ex); + } + } + + void reportException(Exception ex){ + JOptionPane.showMessageDialog(this, ex.getMessage(),"Exception",JOptionPane.ERROR_MESSAGE); + ex.printStackTrace(); + } + + void selectCurrentReader(){ + try{ + if(cbReader.getSelectedItem()!=null) + SC.setReader(cbReader.getSelectedItem()); + }catch(Exception ex){ + reportException(ex); + } + } + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + mnuTable = new javax.swing.JPopupMenu(); + mnuResendAPDU = new javax.swing.JMenuItem(); + mnuSaveAPDU = new javax.swing.JMenuItem(); + jSeparator1 = new javax.swing.JSeparator(); + mnuClearHist = new javax.swing.JMenuItem(); + mnuWizards = new javax.swing.JPopupMenu(); + mnuSavedAPDU = new javax.swing.JPopupMenu(); + mnuResend = new javax.swing.JMenuItem(); + jSeparator2 = new javax.swing.JSeparator(); + mnuDelAPDU = new javax.swing.JMenuItem(); + jPanel1 = new javax.swing.JPanel(); + cbReader = new javax.swing.JComboBox(); + jLabel1 = new javax.swing.JLabel(); + btReloadReaders = new javax.swing.JButton(); + jLabel6 = new javax.swing.JLabel(); + lbStatus = new javax.swing.JTextField(); + btConnect = new javax.swing.JToggleButton(); + cbProto = new javax.swing.JComboBox(); + jLabel23 = new javax.swing.JLabel(); + tbCardATR = new javax.swing.JTextField(); + btLoadProject = new javax.swing.JButton(); + btSaveProject = new javax.swing.JButton(); + splitter = new javax.swing.JSplitPane(); + panHist = new javax.swing.JPanel(); + jScrollPane1 = new javax.swing.JScrollPane(); + tabAPDU = new javax.swing.JTable(); + jLabel10 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); + jLabel16 = new javax.swing.JLabel(); + jLabel17 = new javax.swing.JLabel(); + jLabel18 = new javax.swing.JLabel(); + tbHistClass = new javax.swing.JTextField(); + tbHistIns = new javax.swing.JTextField(); + tbHistP1 = new javax.swing.JTextField(); + tbHistP2 = new javax.swing.JTextField(); + tbHistP3 = new javax.swing.JTextField(); + tbHistDataIn = new javax.swing.JTextField(); + tbHistDataLen = new javax.swing.JTextField(); + tbHistSW = new javax.swing.JTextField(); + tbHistDataOut = new javax.swing.JTextField(); + tabs = new javax.swing.JTabbedPane(); + panSendAPDU = new javax.swing.JPanel(); + tbAPDUClass = new javax.swing.JFormattedTextField(); + tbAPDUIns = new javax.swing.JFormattedTextField(); + tbAPDUP1 = new javax.swing.JFormattedTextField(); + tbAPDUP2 = new javax.swing.JFormattedTextField(); + tbAPDUP3 = new javax.swing.JFormattedTextField(); + tbAPDULe = new javax.swing.JFormattedTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel7 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + btWizard = new javax.swing.JButton(); + tbAPDUDatain = new javax.swing.JTextField(); + jLabel21 = new javax.swing.JLabel(); + lbLastStatus = new javax.swing.JLabel(); + panSavedAPDU = new javax.swing.JPanel(); + jScrollPane2 = new javax.swing.JScrollPane(); + listAPDU = new javax.swing.JList(); + jLabel19 = new javax.swing.JLabel(); + panDataView = new javax.swing.JPanel(); + jLabel20 = new javax.swing.JLabel(); + scrollSentData = new javax.swing.JScrollPane(); + tbSentData = new javax.swing.JTextArea(); + scrollRecvData = new javax.swing.JScrollPane(); + tbRecvData = new javax.swing.JTextArea(); + jLabel22 = new javax.swing.JLabel(); + panFS = new javax.swing.JPanel(); + jScrollPane5 = new javax.swing.JScrollPane(); + treeFS = new javax.swing.JTree(); + scrollFSData = new javax.swing.JScrollPane(); + tbFSData = new javax.swing.JTextArea(); + + mnuResendAPDU.setText("Resend APDU"); + mnuResendAPDU.setEnabled(false); + mnuTable.add(mnuResendAPDU); + + mnuSaveAPDU.setText("Save APDU"); + mnuSaveAPDU.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mnuSaveAPDUActionPerformed(evt); + } + }); + mnuTable.add(mnuSaveAPDU); + mnuTable.add(jSeparator1); + + mnuClearHist.setText("Clear"); + mnuClearHist.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mnuClearHistActionPerformed(evt); + } + }); + mnuTable.add(mnuClearHist); + + mnuResend.setText("Resend"); + mnuResend.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mnuResendActionPerformed(evt); + } + }); + mnuSavedAPDU.add(mnuResend); + mnuSavedAPDU.add(jSeparator2); + + mnuDelAPDU.setText("Remove"); + mnuDelAPDU.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mnuDelAPDUActionPerformed(evt); + } + }); + mnuSavedAPDU.add(mnuDelAPDU); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("JSmartCard Explorer 1.0.4 Primiano Tucci - http://www.primianotucci.com"); + setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Reader Settings")); + + cbReader.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + cbReaderItemStateChanged(evt); + } + }); + + jLabel1.setText("Reader"); + + btReloadReaders.setBackground(new java.awt.Color(204, 255, 204)); + btReloadReaders.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SmartCard/resources/reload.png"))); // NOI18N + btReloadReaders.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btReloadReadersActionPerformed(evt); + } + }); + + jLabel6.setText("Status:"); + + lbStatus.setBackground(java.awt.Color.red); + lbStatus.setEditable(false); + lbStatus.setFont(new java.awt.Font("Verdana", 0, 10)); // NOI18N + lbStatus.setText("Card status"); + lbStatus.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + btConnect.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SmartCard/resources/connect.png"))); // NOI18N + btConnect.setText("Connect"); + btConnect.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btConnectActionPerformed(evt); + } + }); + + cbProto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Protocol: Auto", "T=0", "T=1" })); + + jLabel23.setText("Card ATR:"); + + tbCardATR.setEditable(false); + + btLoadProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SmartCard/resources/open.png"))); // NOI18N + btLoadProject.setText("Load project"); + btLoadProject.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btLoadProjectActionPerformed(evt); + } + }); + + btSaveProject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SmartCard/resources/save.png"))); // NOI18N + btSaveProject.setText("Save project"); + btSaveProject.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btSaveProjectActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(cbReader, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btReloadReaders, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(lbStatus)) + .addGap(28, 28, 28) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(cbProto, 0, 135, Short.MAX_VALUE) + .addComponent(btConnect, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)) + .addGap(52, 52, 52) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel23) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(tbCardATR, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(btLoadProject, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(btSaveProject, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + + jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btLoadProject, btSaveProject}); + + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(btReloadReaders, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE) + .addComponent(cbReader, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(11, 11, 11) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel23) + .addComponent(tbCardATR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(cbProto, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(btSaveProject) + .addComponent(btLoadProject) + .addComponent(btConnect, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap()) + ); + + jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btReloadReaders, cbProto, cbReader, jLabel1}); + + splitter.setBorder(null); + splitter.setDividerLocation(240); + splitter.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); + splitter.setResizeWeight(0.8); + + panHist.setBorder(javax.swing.BorderFactory.createTitledBorder("APDU History")); + + jScrollPane1.setBackground(new java.awt.Color(255, 255, 255)); + + tabAPDU.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "Class", "INS", "P1", "P2", "P3/Lc", "Len", "Data (Hex)", "SW", "Response (verbose)", "Data Out (Hex)", "Data Out (String)", "Full Response (Hex)" + } + ) { + Class[] types = new Class [] { + java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class + }; + boolean[] canEdit = new boolean [] { + false, false, false, false, false, false, false, false, false, false, false, false + }; + + public Class getColumnClass(int columnIndex) { + return types [columnIndex]; + } + + public boolean isCellEditable(int rowIndex, int columnIndex) { + return canEdit [columnIndex]; + } + }); + tabAPDU.setEditingColumn(0); + tabAPDU.setEditingRow(0); + tabAPDU.setMaximumSize(new java.awt.Dimension(2147483647, 1000)); + tabAPDU.setMinimumSize(null); + tabAPDU.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + tabAPDUMouseClicked(evt); + } + }); + jScrollPane1.setViewportView(tabAPDU); + if (tabAPDU.getColumnModel().getColumnCount() > 0) { + tabAPDU.getColumnModel().getColumn(0).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(1).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(2).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(3).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(4).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(5).setMaxWidth(30); + tabAPDU.getColumnModel().getColumn(7).setMaxWidth(90); + } + + jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel10.setText("Class"); + jLabel10.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel11.setText("INS"); + jLabel11.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel12.setText("P1"); + jLabel12.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel13.setText("P2"); + jLabel13.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel14.setText("Lc"); + jLabel14.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel15.setText("Data Sent (Hex)"); + jLabel15.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel16.setText("Le"); + jLabel16.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel17.setText("SW"); + jLabel17.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel18.setText("Data Recv (Hex)"); + jLabel18.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + tbHistClass.setBackground(new java.awt.Color(236, 234, 231)); + tbHistClass.setEditable(false); + tbHistClass.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistClass.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistIns.setBackground(new java.awt.Color(236, 234, 231)); + tbHistIns.setEditable(false); + tbHistIns.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistIns.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistP1.setBackground(new java.awt.Color(236, 234, 231)); + tbHistP1.setEditable(false); + tbHistP1.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistP1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistP2.setBackground(new java.awt.Color(236, 234, 231)); + tbHistP2.setEditable(false); + tbHistP2.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistP2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistP3.setBackground(new java.awt.Color(236, 234, 231)); + tbHistP3.setEditable(false); + tbHistP3.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistP3.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistDataIn.setBackground(new java.awt.Color(236, 234, 231)); + tbHistDataIn.setEditable(false); + tbHistDataIn.setHorizontalAlignment(javax.swing.JTextField.LEFT); + tbHistDataIn.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistDataLen.setBackground(new java.awt.Color(236, 234, 231)); + tbHistDataLen.setEditable(false); + tbHistDataLen.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistDataLen.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistSW.setBackground(new java.awt.Color(236, 234, 231)); + tbHistSW.setEditable(false); + tbHistSW.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbHistSW.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + tbHistDataOut.setBackground(new java.awt.Color(236, 234, 231)); + tbHistDataOut.setEditable(false); + tbHistDataOut.setHorizontalAlignment(javax.swing.JTextField.LEFT); + tbHistDataOut.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + javax.swing.GroupLayout panHistLayout = new javax.swing.GroupLayout(panHist); + panHist.setLayout(panHistLayout); + panHistLayout.setHorizontalGroup( + panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHistLayout.createSequentialGroup() + .addContainerGap() + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 870, Short.MAX_VALUE) + .addGroup(panHistLayout.createSequentialGroup() + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistClass, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) + .addGap(6, 6, 6) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistIns, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistP1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistP2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistP3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) + .addGap(6, 6, 6) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) + .addComponent(tbHistDataIn, javax.swing.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(tbHistDataLen) + .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbHistSW, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE) + .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(tbHistDataOut, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE) + .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)))) + .addContainerGap()) + ); + + panHistLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {tbHistClass, tbHistIns, tbHistP1, tbHistP2, tbHistP3}); + + panHistLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel11, jLabel12, jLabel13, jLabel14}); + + panHistLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel17, tbHistSW}); + + panHistLayout.setVerticalGroup( + panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHistLayout.createSequentialGroup() + .addComponent(jScrollPane1) + .addGap(6, 6, 6) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(panHistLayout.createSequentialGroup() + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panHistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false) + .addComponent(tbHistClass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistIns, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistP1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistP2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistDataIn, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistDataLen, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistDataOut, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbHistSW, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(panHistLayout.createSequentialGroup() + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(tbHistP3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))) + ); + + panHistLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {tbHistClass, tbHistDataIn, tbHistDataLen, tbHistDataOut, tbHistIns, tbHistP1, tbHistP2, tbHistP3, tbHistSW}); + + panHistLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel10, jLabel11, jLabel12, jLabel13, jLabel14, jLabel15, jLabel16, jLabel17, jLabel18}); + + splitter.setLeftComponent(panHist); + + tabs.setTabPlacement(javax.swing.JTabbedPane.BOTTOM); + + panSendAPDU.setBackground(new java.awt.Color(213, 221, 224)); + + try { + tbAPDUClass.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("HH"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDUClass.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDUClass.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDUClass.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDUClassFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUClassFocusLost(evt); + } + }); + + try { + tbAPDUIns.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("HH"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDUIns.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDUIns.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDUIns.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDUInsFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUInsFocusLost(evt); + } + }); + + try { + tbAPDUP1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("HH"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDUP1.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDUP1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDUP1.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDUP1FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUP1FocusLost(evt); + } + }); + + try { + tbAPDUP2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("HH"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDUP2.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDUP2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDUP2.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDUP2FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUP2FocusLost(evt); + } + }); + + try { + tbAPDUP3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("HH"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDUP3.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDUP3.setToolTipText("Data length"); + tbAPDUP3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDUP3.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDUP3FocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUP3FocusLost(evt); + } + }); + + try { + tbAPDULe.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("****"))); + } catch (java.text.ParseException ex) { + ex.printStackTrace(); + } + tbAPDULe.setHorizontalAlignment(javax.swing.JTextField.CENTER); + tbAPDULe.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + tbAPDULe.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + tbAPDULeFocusGained(evt); + } + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDULeFocusLost(evt); + } + }); + + jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel2.setText("Class"); + jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel3.setText("INS"); + jLabel3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel4.setText("P1"); + jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel5.setText("P2"); + jLabel5.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel7.setText("Lc"); + jLabel7.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel8.setText("Data IN (Hex)"); + jLabel8.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel9.setText("Le"); + jLabel9.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); + + jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N + jButton1.setText("Send"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + btWizard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SmartCard/resources/wizard.png"))); // NOI18N + btWizard.setText("..."); + btWizard.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btWizardActionPerformed(evt); + } + }); + + tbAPDUDatain.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N + tbAPDUDatain.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + tbAPDUDatainMouseClicked(evt); + } + }); + tbAPDUDatain.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusLost(java.awt.event.FocusEvent evt) { + tbAPDUDatainFocusLost(evt); + } + }); + + jLabel21.setText("Last command status:"); + + javax.swing.GroupLayout panSendAPDULayout = new javax.swing.GroupLayout(panSendAPDU); + panSendAPDU.setLayout(panSendAPDULayout); + panSendAPDULayout.setHorizontalGroup( + panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panSendAPDULayout.createSequentialGroup() + .addContainerGap() + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 877, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panSendAPDULayout.createSequentialGroup() + .addComponent(btWizard, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbAPDUClass, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) + .addComponent(tbAPDUIns, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) + .addComponent(tbAPDUP1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tbAPDUP2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) + .addComponent(tbAPDUP3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE) + .addComponent(tbAPDUDatain, javax.swing.GroupLayout.PREFERRED_SIZE, 575, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE) + .addComponent(tbAPDULe, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(panSendAPDULayout.createSequentialGroup() + .addComponent(jLabel21) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lbLastStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 744, Short.MAX_VALUE))) + .addContainerGap()) + ); + + panSendAPDULayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel2, tbAPDUClass}); + + panSendAPDULayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel3, tbAPDUIns}); + + panSendAPDULayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel4, tbAPDUP1}); + + panSendAPDULayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel5, tbAPDUP2}); + + panSendAPDULayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel7, tbAPDUP3}); + + panSendAPDULayout.setVerticalGroup( + panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panSendAPDULayout.createSequentialGroup() + .addContainerGap() + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(btWizard, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(panSendAPDULayout.createSequentialGroup() + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(jLabel3) + .addComponent(jLabel4) + .addComponent(jLabel5) + .addComponent(jLabel7)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(tbAPDUClass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbAPDUIns, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbAPDUP1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbAPDUP2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbAPDUP3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tbAPDUDatain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(panSendAPDULayout.createSequentialGroup() + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel9) + .addComponent(jLabel8)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(tbAPDULe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE) + .addGroup(panSendAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lbLastStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + tabs.addTab("Send APDU", panSendAPDU); + + jScrollPane2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + listAPDU.setFont(new java.awt.Font("Monospaced", 0, 11)); // NOI18N + listAPDU.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); + listAPDU.setToolTipText("Double-click to copy into \"Send APDU\""); + listAPDU.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + listAPDUMouseClicked(evt); + } + }); + jScrollPane2.setViewportView(listAPDU); + + jLabel19.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N + jLabel19.setForeground(new java.awt.Color(102, 102, 102)); + jLabel19.setText("Double-click to copy into \"Send APDU\""); + jLabel19.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); + + javax.swing.GroupLayout panSavedAPDULayout = new javax.swing.GroupLayout(panSavedAPDU); + panSavedAPDU.setLayout(panSavedAPDULayout); + panSavedAPDULayout.setHorizontalGroup( + panSavedAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panSavedAPDULayout.createSequentialGroup() + .addContainerGap() + .addGroup(panSavedAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 877, Short.MAX_VALUE) + .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 294, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + panSavedAPDULayout.setVerticalGroup( + panSavedAPDULayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panSavedAPDULayout.createSequentialGroup() + .addComponent(jLabel19) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE) + .addContainerGap()) + ); + + tabs.addTab("Saved APDUs", panSavedAPDU); + + jLabel20.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N + jLabel20.setForeground(new java.awt.Color(102, 102, 102)); + jLabel20.setText("Sent data"); + jLabel20.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); + + tbSentData.setColumns(20); + tbSentData.setEditable(false); + tbSentData.setFont(new java.awt.Font("Monospaced", 0, 11)); // NOI18N + tbSentData.setRows(5); + scrollSentData.setViewportView(tbSentData); + + tbRecvData.setColumns(20); + tbRecvData.setEditable(false); + tbRecvData.setFont(new java.awt.Font("Monospaced", 0, 11)); // NOI18N + tbRecvData.setRows(5); + scrollRecvData.setViewportView(tbRecvData); + + jLabel22.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N + jLabel22.setForeground(new java.awt.Color(102, 102, 102)); + jLabel22.setText("Received data"); + jLabel22.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); + + javax.swing.GroupLayout panDataViewLayout = new javax.swing.GroupLayout(panDataView); + panDataView.setLayout(panDataViewLayout); + panDataViewLayout.setHorizontalGroup( + panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panDataViewLayout.createSequentialGroup() + .addContainerGap() + .addGroup(panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel20) + .addComponent(scrollSentData, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(scrollRecvData, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE) + .addComponent(jLabel22)) + .addContainerGap()) + ); + panDataViewLayout.setVerticalGroup( + panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panDataViewLayout.createSequentialGroup() + .addGroup(panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel20) + .addComponent(jLabel22)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(panDataViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(scrollRecvData, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) + .addComponent(scrollSentData, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))) + ); + + tabs.addTab("Data view", panDataView); + + treeFS.setModel(null); + treeFS.setRootVisible(false); + treeFS.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { + public void valueChanged(javax.swing.event.TreeSelectionEvent evt) { + treeFSValueChanged(evt); + } + }); + jScrollPane5.setViewportView(treeFS); + + tbFSData.setColumns(20); + tbFSData.setEditable(false); + tbFSData.setFont(new java.awt.Font("Monospaced", 0, 11)); // NOI18N + tbFSData.setRows(5); + scrollFSData.setViewportView(tbFSData); + + javax.swing.GroupLayout panFSLayout = new javax.swing.GroupLayout(panFS); + panFS.setLayout(panFSLayout); + panFSLayout.setHorizontalGroup( + panFSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panFSLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(scrollFSData, javax.swing.GroupLayout.DEFAULT_SIZE, 596, Short.MAX_VALUE) + .addContainerGap()) + ); + panFSLayout.setVerticalGroup( + panFSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panFSLayout.createSequentialGroup() + .addContainerGap() + .addGroup(panFSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(scrollFSData, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE) + .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)) + .addContainerGap()) + ); + + tabs.addTab("FileSystem Data (Experimental)", panFS); + + splitter.setRightComponent(tabs); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(splitter, javax.swing.GroupLayout.DEFAULT_SIZE, 906, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(splitter, javax.swing.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + +private void btReloadReadersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btReloadReadersActionPerformed + updateReaderCombo(); +}//GEN-LAST:event_btReloadReadersActionPerformed + +private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + try { + sendAPDU(); + }catch(Exception ex){ + reportException(ex); + } + +}//GEN-LAST:event_jButton1ActionPerformed + +private void btConnectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btConnectActionPerformed + try{ + if(btConnect.isSelected()){ + selectCurrentReader(); + lbStatus.setText(SC.connect(getProtocolString())); + tbCardATR.setText(SC.getCurrentCardATR()); + lbStatus.setBackground(Color.GREEN); + }else{ + SC.disconnect(); + lbStatus.setBackground(Color.RED); + lbStatus.setText("Disconnected"); + } + }catch(Exception ex){ + lbStatus.setBackground(Color.RED); + lbStatus.setText("Error"); + btConnect.setSelected(! btConnect.isSelected()); + reportException(ex); + } +}//GEN-LAST:event_btConnectActionPerformed + +private void cbReaderItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbReaderItemStateChanged + selectCurrentReader(); +}//GEN-LAST:event_cbReaderItemStateChanged + +private void tabAPDUMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabAPDUMouseClicked + updateSelectedTableRow(); + + if(evt.getButton()>1) + mnuTable.show(tabAPDU, evt.getX(),evt.getY()); +}//GEN-LAST:event_tabAPDUMouseClicked + +private void mnuSaveAPDUActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuSaveAPDUActionPerformed + CommandAPDU apdu = getTableAPDU().Cmd; + if(apdu == null) return; + String mnemonic = JOptionPane.showInputDialog("APDU mnemonic"); + if(mnemonic==null) return; + mnemonic = mnemonic.replace(' ','_'); + listAPDUmod.addElement(new APDUCommandBoxing(apdu,mnemonic)); + listAPDU.updateUI(); +}//GEN-LAST:event_mnuSaveAPDUActionPerformed + +private void mnuClearHistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuClearHistActionPerformed + ((DefaultTableModel) tabAPDU.getModel()).setRowCount(0); +}//GEN-LAST:event_mnuClearHistActionPerformed + +private void btWizardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btWizardActionPerformed + mnuWizards.show(btWizard, 0, 0); +}//GEN-LAST:event_btWizardActionPerformed + +private void listAPDUMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_listAPDUMouseClicked + if(evt.getButton() > 1) + mnuSavedAPDU.show(listAPDU,evt.getX(), evt.getY()); + else if(evt.getClickCount() > 1) + restoreAPDUFromHistory(); +}//GEN-LAST:event_listAPDUMouseClicked + +private void selectAll(JTextField iObj){ + iObj.setText(iObj.getText()); + iObj.selectAll(); +} + +private void tbAPDUClassFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUClassFocusGained + selectAll(tbAPDUClass); +}//GEN-LAST:event_tbAPDUClassFocusGained + +private void tbAPDUInsFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUInsFocusGained + selectAll(tbAPDUIns); +}//GEN-LAST:event_tbAPDUInsFocusGained + +private void tbAPDUP1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP1FocusGained + selectAll(tbAPDUP1); +}//GEN-LAST:event_tbAPDUP1FocusGained + +private void tbAPDUP2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP2FocusGained + selectAll(tbAPDUP2); +}//GEN-LAST:event_tbAPDUP2FocusGained + +private void tbAPDUP3FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP3FocusGained + selectAll(tbAPDUP3); +}//GEN-LAST:event_tbAPDUP3FocusGained + +private void tbAPDULeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDULeFocusGained + selectAll(tbAPDULe); +}//GEN-LAST:event_tbAPDULeFocusGained + +private void tbAPDUP3FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP3FocusLost + if(tbAPDUP3.getText().trim().length()==0) + tbAPDUP3.setValue(null); + tbAPDUP3.setBackground(Color.WHITE); +}//GEN-LAST:event_tbAPDUP3FocusLost + +private void tbAPDULeFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDULeFocusLost + if(tbAPDULe.getText().trim().length()==0) + tbAPDULe.setValue(null); +}//GEN-LAST:event_tbAPDULeFocusLost + +private void tbAPDUDatainFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUDatainFocusLost + try{ + byte[] data = StringUtil.stringToByteArr(tbAPDUDatain.getText()); + if(data.length>0){ + tbAPDUP3.setText(StringUtil.byteToHex(data.length)); + tbAPDUP3.setBackground(Color.YELLOW); + } + }catch(Exception ex){} +}//GEN-LAST:event_tbAPDUDatainFocusLost + +private void treeFSValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_treeFSValueChanged + DefaultMutableTreeNode selnode = (DefaultMutableTreeNode) treeFS.getSelectionPath().getLastPathComponent(); + Object sel = selnode.getUserObject(); + if(! (sel instanceof ISO7816FileSystem.EF)) return; + ISO7816FileSystem.EF ef = (ISO7816FileSystem.EF) sel; + tbFSData.setText(StringUtil.hexDump(ef.getData(),16)); + +}//GEN-LAST:event_treeFSValueChanged + +private void btSaveProjectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSaveProjectActionPerformed + saveProject(); +}//GEN-LAST:event_btSaveProjectActionPerformed + +private void btLoadProjectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btLoadProjectActionPerformed + loadProject(); +}//GEN-LAST:event_btLoadProjectActionPerformed + +private void mnuResendActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuResendActionPerformed + restoreAPDUFromHistory(); +}//GEN-LAST:event_mnuResendActionPerformed + +private void mnuDelAPDUActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDelAPDUActionPerformed + if(listAPDU.getSelectedIndex()>=0) + listAPDUmod.removeElementAt(listAPDU.getSelectedIndex()); +}//GEN-LAST:event_mnuDelAPDUActionPerformed + +private void tbAPDUClassFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUClassFocusLost + if(tbAPDUClass.getText().trim().length()==0) + tbAPDUClass.setText("00"); +}//GEN-LAST:event_tbAPDUClassFocusLost + +private void tbAPDUInsFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUInsFocusLost + if(tbAPDUIns.getText().trim().length()==0) + tbAPDUIns.setText("00"); +}//GEN-LAST:event_tbAPDUInsFocusLost + +private void tbAPDUP1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP1FocusLost + if(tbAPDUP1.getText().trim().length()==0) + tbAPDUP1.setText("00"); +}//GEN-LAST:event_tbAPDUP1FocusLost + +private void tbAPDUP2FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tbAPDUP2FocusLost + if(tbAPDUP2.getText().trim().length()==0) + tbAPDUP2.setText("00"); +}//GEN-LAST:event_tbAPDUP2FocusLost + +private void tbAPDUDatainMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbAPDUDatainMouseClicked + if(evt.getClickCount()>1) + insertStringData(); +}//GEN-LAST:event_tbAPDUDatainMouseClicked + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JToggleButton btConnect; + private javax.swing.JButton btLoadProject; + private javax.swing.JButton btReloadReaders; + private javax.swing.JButton btSaveProject; + private javax.swing.JButton btWizard; + private javax.swing.JComboBox cbProto; + private javax.swing.JComboBox cbReader; + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel17; + private javax.swing.JLabel jLabel18; + private javax.swing.JLabel jLabel19; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel20; + private javax.swing.JLabel jLabel21; + private javax.swing.JLabel jLabel22; + private javax.swing.JLabel jLabel23; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JScrollPane jScrollPane5; + private javax.swing.JSeparator jSeparator1; + private javax.swing.JSeparator jSeparator2; + private javax.swing.JLabel lbLastStatus; + private javax.swing.JTextField lbStatus; + private javax.swing.JList listAPDU; + private javax.swing.JMenuItem mnuClearHist; + private javax.swing.JMenuItem mnuDelAPDU; + private javax.swing.JMenuItem mnuResend; + private javax.swing.JMenuItem mnuResendAPDU; + private javax.swing.JMenuItem mnuSaveAPDU; + private javax.swing.JPopupMenu mnuSavedAPDU; + private javax.swing.JPopupMenu mnuTable; + private javax.swing.JPopupMenu mnuWizards; + private javax.swing.JPanel panDataView; + private javax.swing.JPanel panFS; + private javax.swing.JPanel panHist; + private javax.swing.JPanel panSavedAPDU; + private javax.swing.JPanel panSendAPDU; + private javax.swing.JScrollPane scrollFSData; + private javax.swing.JScrollPane scrollRecvData; + private javax.swing.JScrollPane scrollSentData; + private javax.swing.JSplitPane splitter; + private javax.swing.JTable tabAPDU; + private javax.swing.JTabbedPane tabs; + private javax.swing.JFormattedTextField tbAPDUClass; + private javax.swing.JTextField tbAPDUDatain; + private javax.swing.JFormattedTextField tbAPDUIns; + private javax.swing.JFormattedTextField tbAPDULe; + private javax.swing.JFormattedTextField tbAPDUP1; + private javax.swing.JFormattedTextField tbAPDUP2; + private javax.swing.JFormattedTextField tbAPDUP3; + private javax.swing.JTextField tbCardATR; + private javax.swing.JTextArea tbFSData; + private javax.swing.JTextField tbHistClass; + private javax.swing.JTextField tbHistDataIn; + private javax.swing.JTextField tbHistDataLen; + private javax.swing.JTextField tbHistDataOut; + private javax.swing.JTextField tbHistIns; + private javax.swing.JTextField tbHistP1; + private javax.swing.JTextField tbHistP2; + private javax.swing.JTextField tbHistP3; + private javax.swing.JTextField tbHistSW; + private javax.swing.JTextArea tbRecvData; + private javax.swing.JTextArea tbSentData; + private javax.swing.JTree treeFS; + // End of variables declaration//GEN-END:variables + + + + class APDUSet { + public CommandAPDU Cmd; + public ResponseAPDU Resp; + } +} diff --git a/src/SmartCard/ISO7816FileSystem.java b/src/SmartCard/ISO7816FileSystem.java new file mode 100644 index 0000000..29c63dc --- /dev/null +++ b/src/SmartCard/ISO7816FileSystem.java @@ -0,0 +1,207 @@ + +package SmartCard; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collection; +import java.util.TreeMap; + + + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ +public class ISO7816FileSystem { + public static final int MF_ID = 0x3F00; + private DF masterFile; + + + public static ISO7816FileSystem.DF parseStructure(byte[] iData, int iDF) throws IOException{ + ByteArrayInputStream in = new ByteArrayInputStream(iData); + ByteArrayOutputStream buff = new ByteArrayOutputStream(); + + int state = 0; + int curFile = 0; + int readlen = 0; + ISO7816FileSystem.DF DF = new ISO7816FileSystem.DF(iDF); + boolean isConstructedDO = false; + + while(in.available() > 0){ + int b = in.read() & 0xFF; + + switch(state){ + case 0: + /* * B6=0 introduces a primitive data object + * B6=1 introduces a constructed data object + */ + isConstructedDO = ((b & 0x20)!=0); + /*Otherwise (B5-B1 set to 1 in the leading byte), the tag field shall continue on one or more subsequent bytes. */ + if((b & 0x1F) == 0x1F){ + int nextB = in.read() & 0xFF; + b = (b << 8) | nextB; + } + curFile = b; + state = 1; + break; + case 1: + //if B7 is 1, b contains the number of bytes forming the length + if((b & 0x80) == 0x80){ + int bytes = b & 0x7F; + readlen = 0; + while(bytes-- > 0){ + readlen = readlen << 8; + b = in.read() & 0xFF; + readlen |= b; + } + }else{ + readlen = b; + } + + if(isConstructedDO) + state = 3; + else + state = 2; + buff.reset(); + break; + case 2: + buff.write(b); + if(--readlen == 0){ + ISO7816FileSystem.EF ef = new ISO7816FileSystem.EF(curFile); + ef.setData(buff.toByteArray()); + DF.addSubEF(ef); + buff.reset(); + state = 0; + } + break; + case 3: + byte[] subData = new byte[readlen]; + subData[0] = (byte)b; + in.read(subData,1,readlen-1); + ISO7816FileSystem.DF subDF = parseStructure(subData,curFile); + DF.addSubDF(subDF); + state = 0; + break; + } + } + + return DF; + + } + + public ISO7816FileSystem(DF iMasterFile){ + masterFile = iMasterFile; + } + + public DF getMasterFile(){ + return masterFile; + } + + @Override + public String toString() { + return masterFile.toString(); + } + + + public static class EF { + protected int id; + protected byte[] data = new byte[]{}; + + void addByte(byte iByte){ + data = Arrays.copyOf(data, data.length+1); + data[data.length-1] = iByte; + } + + void setData(byte[] iData){ + data = iData; + } + + void clearData(){ + data = new byte[]{}; + } + + public EF(int iId){ + id = iId; + } + + public int getID(){ + return id; + } + + public byte[] getData(){ + return data; + } + + public int getSize(){ + return data.length; + } + + String getString(int iIndent){ + StringBuffer sb = new StringBuffer(); + for(int i=0; i < iIndent; i++) + sb.append(" "); + sb.append(Integer.toHexString(id).toUpperCase() + " ("+getSize()+")"); + return sb.toString(); + } + + @Override + public String toString() { + return getString(0); + } + + + } + + public static class DF extends EF { + TreeMap<Integer,EF> subFiles = new TreeMap<Integer,EF>(); + TreeMap<Integer,DF> subDirs = new TreeMap<Integer,DF>(); + + public DF(int iId){ + super(iId); + } + + void addSubEF(EF iEf){ + subFiles.put(iEf.getID(),iEf); + } + + void addSubDF(DF iDf){ + subDirs.put(iDf.getID(),iDf); + } + + public Collection<EF> getSubEFs(){ + return subFiles.values(); + } + + public Collection<DF> getSubDFs(){ + return subDirs.values(); + } + + public EF getSubEF(int iID){ + return subFiles.get(iID); + } + + public DF getSubDF(int iID){ + return subDirs.get(iID); + } + + + @Override + public int getSize(){ + int size = 0; + for(EF ef : subFiles.values()) + size += ef.getSize(); + for(DF df : subDirs.values()) + size += df.getSize(); + + return size; + } + + @Override + public String toString() { + return getString(0); + } + + } +} diff --git a/src/SmartCard/ISO7816Response.java b/src/SmartCard/ISO7816Response.java new file mode 100644 index 0000000..6e7c2a8 --- /dev/null +++ b/src/SmartCard/ISO7816Response.java @@ -0,0 +1,131 @@ + +package SmartCard; + +import javax.smartcardio.ResponseAPDU; + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ +public class ISO7816Response { + + private int sw1; + private int sw2; + + + public ISO7816Response(int iSW1,int iSW2){ + this.sw1 = iSW1; + this.sw2 = iSW2; + } + + public ISO7816Response(ResponseAPDU iAPDU){ + this(iAPDU.getSW1(), iAPDU.getSW2()); + } + + public boolean isGood(){ + return (sw1 == 0x90 && sw2 == 0x00) || sw1 == 0x61; + } + + @Override + public String toString(){ + return getResponseString(sw1,sw2); + } + + public static String getResponseString(int sw1, int sw2){ + if(sw1 == 0x90 && sw2 == 0x00) + return "No further qualification"; + + else if(sw1 == 0x61) + return "Response bytes still available: " + (int)sw2 + " bytes"; + + else if(sw1 == 0x62 && sw2 == 81) + return "Non-volatile memory unchanged (Part of returned data may be corrupted)"; + else if(sw1 == 0x62 && sw2 == 82) + return "Non-volatile memory unchanged (End of file/record reached before reading Le bytes)"; + else if(sw1 == 0x62 && sw2 == 83) + return "Non-volatile memory unchanged (Selected file invalidated )"; + else if(sw1 == 0x62 && sw2 == 84) + return "Non-volatile memory unchanged (FCI not formatted)"; + else if(sw1 == 0x62) + return "Non-volatile memory unchanged"; + + else if(sw1 == 0x63) + return "Non-volatile memory changed"; + + else if(sw1 == 0x64) + return "Non-volatile memory unchanged"; + + else if(sw1 == 0x65 && sw2 == 0x81) + return "Memory failure"; + else if(sw1 == 0x65) + return "Non-volatile memory changed"; + + else if(sw1 == 0x67 && sw2 == 0x00) + return "Wrong length"; + + else if(sw1 == 0x68 && sw2 == 0x81) + return "Logical channel not supported"; + else if(sw1 == 0x68 && sw2 == 0x82) + return "Secure messaging not supported"; + else if(sw1 == 0x68) + return "Functions in CLA not supported"; + + else if(sw1 == 0x69 && sw2 == 0x81) + return "Command incompatible with file structure"; + else if(sw1 == 0x69 && sw2 == 0x82) + return "Security status not satisfied"; + else if(sw1 == 0x69 && sw2 == 0x83) + return "Authentication method blocked"; + else if(sw1 == 0x69 && sw2 == 0x84) + return "Referenced data invalidated"; + else if(sw1 == 0x69 && sw2 == 0x85) + return "Conditions of use not satisfied"; + else if(sw1 == 0x69 && sw2 == 0x86) + return "Command not allowed (no current EF)"; + else if(sw1 == 0x69 && sw2 == 0x87) + return "Expected SM data objects missing"; + else if(sw1 == 0x69 && sw2 == 0x88) + return "SM data objects incorrect"; + else if(sw1 == 0x69) + return "Command not allowed ("+sw2+")"; + + else if(sw1 == 0x6A && sw2 == 0x80) + return "Incorrect parameters in the data field"; + else if(sw1 == 0x6A && sw2 == 0x81) + return "Function not supported "; + else if(sw1 == 0x6A && sw2 == 0x82) + return "File not found"; + else if(sw1 == 0x6A && sw2 == 0x83) + return "Record not found"; + else if(sw1 == 0x6A && sw2 == 0x84) + return "Not enough memory space in the file"; + else if(sw1 == 0x6A && sw2 == 0x85) + return "Lc inconsistent with TLV structure"; + else if(sw1 == 0x6A && sw2 == 0x86) + return "Incorrect parameters P1-P2"; + else if(sw1 == 0x6A && sw2 == 0x87) + return "Lc inconsistent with P1-P2"; + else if(sw1 == 0x6A && sw2 == 0x88) + return "Referenced data not found "; + else if(sw1 == 0x6A) + return "Wrong parameter(s) P1-P2"; + + else if(sw1 == 0x6B && sw2 == 0x00 ) + return "Wrong parameter(s) P1-P2"; + + else if(sw1 == 0x6C) + return "Wrong length (Correct length: " + (int) sw2+")"; + + else if(sw1 == 0x6D && sw2 == 0x00) + return "Instruction code not supported or invalid"; + + else if(sw1 == 0x6E && sw2 == 0x00) + return "Class not supported"; + + else if(sw1 == 0x6F && sw2 == 0x00) + return "No precise diagnosis"; + + else + return "Unkown response (SW1: " + Integer.toString(sw1, 16)+" SW2:"+ Integer.toString(sw2, 16)+")"; + } +} diff --git a/src/SmartCard/Main.java b/src/SmartCard/Main.java new file mode 100644 index 0000000..81fc5d4 --- /dev/null +++ b/src/SmartCard/Main.java @@ -0,0 +1,25 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package SmartCard; + +/** + * + * @author Administrator + */ +public class Main { + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new FrmMain().setVisible(true); + } + }); + } + +} diff --git a/src/SmartCard/SmartCard.java b/src/SmartCard/SmartCard.java new file mode 100644 index 0000000..a8d4c8e --- /dev/null +++ b/src/SmartCard/SmartCard.java @@ -0,0 +1,85 @@ + +package SmartCard; + +import java.util.List; +import javax.smartcardio.ATR; +import javax.smartcardio.Card; +import javax.smartcardio.CardChannel; +import javax.smartcardio.CardException; +import javax.smartcardio.CardTerminal; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; +import javax.smartcardio.TerminalFactory; + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ +public class SmartCard { + String currentCardATR; + String currentCard; + CardTerminal reader; + Card card; + CardChannel chan; + + public String connect(String iProto) throws CardException{ + card = reader.connect(iProto); + ATR atr = card.getATR(); + + currentCardATR = StringUtil.byteArrToString(atr.getBytes()," "); + currentCard = CardList.lookupByAtr(atr.getBytes()); + chan = card.getBasicChannel(); + + return currentCard; + + } + + public boolean isConnected(){ + return (card!=null); + } + + public void disconnect() throws CardException{ + /*if(chan!=null){ + chan.close(); + chan=null; + }*/ + if(card==null) return; + card.disconnect(true); + card=null; + } + + + public CardChannel getChannel(){ + return chan; + } + + public String setReader(Object iReaderRef) throws CardException{ + reader = objectToReader(iReaderRef); + if(reader == null) return "Null Object ["+iReaderRef+"]"; + if(!reader.isCardPresent()) + return "No card present"; + + return reader.getName(); + } + + + + CardTerminal objectToReader(Object iRef){ + return TerminalFactory.getDefault().terminals().getTerminal(iRef.toString().substring(4)); + } + + public String[] listReaders() throws CardException{ + List<CardTerminal> tlist = TerminalFactory.getDefault().terminals().list(); + String[] outList = new String[tlist.size()]; + for(int i=0; i < tlist.size(); i++) + outList[i] = (tlist.get(i).isCardPresent() ? "[x] " : "[ ] ") + tlist.get(i).getName(); + return outList; + } + + + + + public String getCurrentCardATR(){ + return currentCardATR; + } +} diff --git a/src/SmartCard/StringUtil.java b/src/SmartCard/StringUtil.java new file mode 100644 index 0000000..014833f --- /dev/null +++ b/src/SmartCard/StringUtil.java @@ -0,0 +1,102 @@ + +package SmartCard; + +/** + * + * @author Primiano Tucci - http://www.primianotucci.com/ + */ +public class StringUtil { + public static Integer parseHex(String iStr){ + int mask = 0xFF; + if(iStr.length() > 2) + mask = 0xFFFF; + try{ + return (Integer.parseInt(iStr,16) & mask); + }catch(Exception ex){ + return null; + } + } + + public static String byteArrToString(byte[] iBytes,String iSeparator){ + StringBuffer sb = new StringBuffer(); + for(byte b : iBytes){ + sb.append(byteToHex(b)); + sb.append(iSeparator); + } + + if(iSeparator.length()>0 && sb.length()>=iSeparator.length()) + sb.deleteCharAt(sb.length()-iSeparator.length()); + return sb.toString(); + } + + public static char byteToPrintableChar(byte iB){ + if(iB>= 33 && iB<=126) + return (char)iB; + else + return '.'; + } + + public static String byteArrToPrintableString(byte[] iData){ + StringBuffer sb = new StringBuffer(iData.length); + for(int i=0; i<iData.length; i++) + sb.append(byteToPrintableChar(iData[i])); + return sb.toString(); + } + + public static String hexDump(byte[] iData, int iRowSize){ + StringBuffer sb = new StringBuffer(); + + int rows = (int) Math.ceil((float)iData.length / iRowSize); + for(int row=0; row < rows; row++){ + int offset = iRowSize*row; + StringBuffer hexpart = new StringBuffer(); + StringBuffer strpart = new StringBuffer(); + + for(int i=0; i<iRowSize; i++){ + if(offset + i >= iData.length) + break; + byte b = iData[offset + i]; + hexpart.append(byteToHex(b)); + hexpart.append(" "); + strpart.append(byteToPrintableChar(b)); + } + int expectedLen = iRowSize * 3; + if(hexpart.length() < expectedLen) + hexpart.append(spaces(expectedLen - hexpart.length())); + sb.append(hexpart); + sb.append(" "); + sb.append(strpart); + sb.append("\n"); + } + + + return sb.toString(); + } + + public static String byteToHex(int iVal){ + String hx = Integer.toHexString(((int)iVal)&0xFF).toUpperCase(); + if(hx.length() == 2) + return hx; + else + return "0"+hx; + } + + + public static byte[] stringToByteArr(String iStr){ + iStr = iStr.replace(" ",""); + byte[] outArr = new byte[iStr.length()/2]; + for(int i=0; i<iStr.length(); i+=2){ + String hex = iStr.substring(i, i+2); + byte b = (byte) ((int)Integer.parseInt(hex, 16) & 0xFF); + outArr[i/2] = b; + } + return outArr; + } + + public static String spaces(int iLen){ + StringBuffer buf = new StringBuffer(iLen); + while(iLen-- > 0) + buf.append(" "); + return buf.toString(); + } +} diff --git a/src/puntocassa/ComboItem.java b/src/puntocassa/ComboItem.java new file mode 100644 index 0000000..85d0d4e --- /dev/null +++ b/src/puntocassa/ComboItem.java @@ -0,0 +1,39 @@ +package puntocassa; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Marco + */ +public class ComboItem { + private Long key; + private String value; + + public ComboItem(Long key, String value) + { + this.key = key; + this.value = value; + } + + @Override + public String toString() + { + return value; + } + + public Long getKey() + { + return key; + } + + public String getValue() + { + return value; + } +} + diff --git a/src/puntocassa/DecimalFormatRenderer.java b/src/puntocassa/DecimalFormatRenderer.java new file mode 100644 index 0000000..263e6c8 --- /dev/null +++ b/src/puntocassa/DecimalFormatRenderer.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package puntocassa; + +import java.awt.Component; +import java.text.DecimalFormat; +import javax.swing.JTable; +import javax.swing.table.DefaultTableCellRenderer; + +/** + * + * @author marco + */ +public class DecimalFormatRenderer extends DefaultTableCellRenderer { + + private static final DecimalFormat formatter = new DecimalFormat("#0.00"); + + @Override + public Component getTableCellRendererComponent( + JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + +// First format the cell value as required + value = formatter.format((Number) value); + setHorizontalAlignment( RIGHT ); + +// And pass it on to parent class + return super.getTableCellRendererComponent( + table, value, isSelected, hasFocus, row, column); + + } + +} diff --git a/src/puntocassa/Encoding.java b/src/puntocassa/Encoding.java new file mode 100644 index 0000000..559c324 --- /dev/null +++ b/src/puntocassa/Encoding.java @@ -0,0 +1,36 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import org.bouncycastle.util.encoders.Base64; + +/** + * + * @author Marco + */ +public class Encoding { + + public static String encodeString(String var) { + String varEncode; + + varEncode = new String(Base64.encode(new StringBuffer(new String(Base64.encode(var.getBytes()))).reverse().toString().getBytes())); + + return varEncode; + } + + public static String decodeString(String var) { + String varDecode; + + varDecode = new String(Base64.decode(new StringBuffer(new String(Base64.decode(var.getBytes()))).reverse().toString().getBytes())); + + return varDecode; + } + + public static void main(String[] args) { + + } +} diff --git a/src/puntocassa/JEnhancedOptionPane.java b/src/puntocassa/JEnhancedOptionPane.java new file mode 100644 index 0000000..20f9f42 --- /dev/null +++ b/src/puntocassa/JEnhancedOptionPane.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.HeadlessException; +import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.UIManager; + +/** + * + * @author marco + */ +public class JEnhancedOptionPane extends JOptionPane { + public static String showInputDialog(final Object message, final Object[] options) + throws HeadlessException { + final JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE, + OK_CANCEL_OPTION, null, + options, null); + pane.setWantsInput(true); + pane.setComponentOrientation((getRootFrame()).getComponentOrientation()); + pane.setMessageType(QUESTION_MESSAGE); + pane.selectInitialValue(); + Font f=new Font("Tahoma",0,20); + + + final String title = UIManager.getString("OptionPane.inputDialogTitle", null); + final JDialog dialog = pane.createDialog(null, title); + dialog.setFont(f); + dialog.setVisible(true); + dialog.dispose(); + final Object value = pane.getInputValue(); + return (value == UNINITIALIZED_VALUE) ? null : (String) value; + } +} diff --git a/src/puntocassa/JInternalReport.form b/src/puntocassa/JInternalReport.form new file mode 100644 index 0000000..a7acc73 --- /dev/null +++ b/src/puntocassa/JInternalReport.form @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="400" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="300" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> +</Form> diff --git a/src/puntocassa/JInternalReport.java b/src/puntocassa/JInternalReport.java new file mode 100644 index 0000000..e994b15 --- /dev/null +++ b/src/puntocassa/JInternalReport.java @@ -0,0 +1,287 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; +import static net.sf.dynamicreports.report.builder.DynamicReports.*; +import java.awt.Color; +import java.awt.Cursor; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import net.sf.dynamicreports.examples.complex.dynamicreport.DynamicColumn; +import net.sf.dynamicreports.jasper.builder.JasperReportBuilder; +import net.sf.dynamicreports.jasper.constant.JasperProperty; +import net.sf.dynamicreports.report.builder.column.ColumnBuilder; +import net.sf.dynamicreports.report.builder.column.PercentageColumnBuilder; +import net.sf.dynamicreports.report.builder.column.TextColumnBuilder; +import net.sf.dynamicreports.report.builder.group.GroupBuilders; +import net.sf.dynamicreports.report.builder.style.ReportStyleBuilder; +import net.sf.dynamicreports.report.builder.style.StyleBuilder; +import net.sf.dynamicreports.report.builder.subtotal.AggregationSubtotalBuilder; +import net.sf.dynamicreports.report.constant.HorizontalAlignment; +import net.sf.dynamicreports.report.constant.PageOrientation; +import net.sf.dynamicreports.report.constant.PageType; +import net.sf.dynamicreports.report.datasource.DRDataSource; +import net.sf.dynamicreports.report.exception.DRException; +import net.sf.jasperreports.engine.DefaultJasperReportsContext; +import net.sf.jasperreports.engine.JRDataSource; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.view.JasperViewer; +/** + * + * @author Marco + */ +public class JInternalReport extends javax.swing.JInternalFrame { + MyApplication MyA=new MyApplication(); + public String TitoloReport = "Regione Toscana - Punto Cassa "; + String Ditta="Regione Toscana"; + private StyleBuilder boldStyle; + private TextColumnBuilder<Float> ColonnaPrezzi; + + public void CreaReport(String[] Col, String[] ColType, Object[][] data) { + + + StyleBuilder boldStyle = stl.style().bold(); + //scegliere il size del font + StyleBuilder FontStyle = stl.style().setFontSize(7); + StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.CENTER); + StyleBuilder boldLeftStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.LEFT); + StyleBuilder columnTitleStyle = stl.style(boldCenteredStyle).setBorder(stl.pen1Point()).setBackgroundColor(Color.LIGHT_GRAY); + + ArrayList<TextColumnBuilder> columns = new ArrayList<TextColumnBuilder>(); + + TextColumnBuilder<Float> itemColumn= null; + TextColumnBuilder<Integer> itemPosizione= null; + MyApplication MyA=new MyApplication(); + for (int i = 0; i < Col.length; i++) { + if (Col[i].toString().equalsIgnoreCase("Codice")) { + } else { + + switch (ColType[i]) { + case "text": + TextColumnBuilder<String> textColumn = col.column(Col[i].replace("_", " "), Col[i], type.stringType()); + textColumn.setHorizontalAlignment(HorizontalAlignment.CENTER); + columns.add(textColumn); + + break; + case "integer": + TextColumnBuilder<Integer> integerColumn = col.column(Col[i].replace("_", " "), Col[i], type.integerType()); + + columns.add(integerColumn); + if (Col[i].equalsIgnoreCase(MyA.ReportColonnaGroupBy)){ + itemPosizione=integerColumn; + } + break; + case "boolean": + //TextColumnBuilder<Boolean> booleanColumn = col.column(Col[i], Col[i].replace(" ", "_"), type.booleanType()); + TextColumnBuilder<String> booleanColumn = col.column(Col[i].replace("_", " "), Col[i], type.stringType()); + booleanColumn.setHorizontalAlignment(HorizontalAlignment.CENTER); + columns.add(booleanColumn); + break; + case "float": + TextColumnBuilder<Float> floatColumn = col.column(Col[i].replace("_", " "), Col[i], type.floatType()); + floatColumn.setPattern("#,##0.00"); + columns.add(floatColumn); + + if (Col[i].equalsIgnoreCase(MyA.ReportColonnaSomma)){ + itemColumn=floatColumn; + } + ColonnaPrezzi=floatColumn; + break; + } + } + } + + //TextColumnBuilder<BigDecimal> unitPriceColumn = col.column("Unit price", "unitprice", type.bigDecimalType()); + //price = unitPrice * quantity + //TextColumnBuilder<BigDecimal> priceColumn = unitPriceColumn.multiply(quantityColumn).setTitle("Price"); + //PercentageColumnBuilder pricePercColumn = col.percentageColumn("Price %", priceColumn); + /*TextColumnBuilder<Integer> rowNumberColumn = col.reportRowNumberColumn("No.") + //sets the fixed width of a column, width = 2 * character width + .setFixedColumns(2) + .setHorizontalAlignment(HorizontalAlignment.CENTER);*/ + try { + + JasperReportBuilder myReport; + + myReport = report() + .setColumnTitleStyle(columnTitleStyle) + .highlightDetailEvenRows() + .subtotalsAtSummary(createSubtotal("Totale")) + // .columns() + //.columns(columns) + + // rowNumberColumn, textColumn, integerColumn, floatColumn) + .title(cmp.text(Ditta).setStyle(boldLeftStyle),cmp.text(TitoloReport).setStyle(boldCenteredStyle),cmp.image("..\\risorse\\logoStampa.jpg").setDimension(50,50))//shows report title + //.title(cmp.image("pictures\\logoStampa.jpg").setFixedHeight(50),cmp.text(Ditta).setStyle(boldLeftStyle),cmp.text(TitoloReport).setStyle(boldCenteredStyle))//shows report title + + .pageFooter(cmp.pageXofY().setStyle(boldCenteredStyle))//shows number of page at page footer + //.setDataSource(createDataSource(Col,data))//set datasource + .setPageFormat(PageType.A5, PageOrientation.LANDSCAPE) + //.setPageMargin(margin(20)) + //.groupBy(itemColumn) + + + //assegna la grandezza del font al corpo del report + .setColumnStyle(FontStyle) + + + .setDataSource(createDataSource(Col,ColType, data)); + + for (int i = 0; i < columns.size(); i++) { + columns.get(i).setStretchWithOverflow(true); + columns.get(i).addProperty(JasperProperty.PRINT_KEEP_FULL_TEXT, "true"); + Integer Pos=MyA.ElencoColonneReport.indexOf(";" + i + "|"); + if (Pos>=0){ + Integer PosF=MyA.ElencoColonneReport.indexOf(";",Pos+1); + String T=MyA.ElencoColonneReport.substring(Pos, PosF); + String E[]=T.split("\\|"); + columns.get(i).setFixedWidth(Integer.parseInt(E[1])); + } + myReport.columns(columns.get(i)); + + } + + +// if (MyA.ReportColonnaGroupBy.length()>0){ +// myReport.groupBy(itemPosizione); +// myReport.subtotalsAtSummary(sbt.sum(itemColumn)); +// //myReport.subtotalsAtFirstGroupFooter(sbt.sum(itemPosizione),sbt.sum(itemColumn)); +// } + MyA.ReportColonnaGroupBy="";MyA.ElencoColonneReport=""; + JasperPrint reportPrint = myReport.toJasperPrint(); + JasperViewer reportViewer = new JasperViewer( + DefaultJasperReportsContext.getInstance(), + reportPrint, + false, + null, + null + ); + + reportViewer.setTitle(TitoloReport); + + reportViewer.setVisible(true); + + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + + } catch (DRException e) { + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + e.printStackTrace(); + + } + + } + + private AggregationSubtotalBuilder<Float> createSubtotal(String label) { + boldStyle = stl.style().bold().setHorizontalAlignment(HorizontalAlignment.RIGHT); + + return sbt.sum(ColonnaPrezzi).setLabel(label).setLabelStyle(boldStyle); + + } + + + private JRDataSource createDataSource(String[] Col,String[] ColType, Object[][] data) { + + //DRDataSource dataSource = new DRDataSource("item", "quantity", "unitprice"); + + //dataSource.add("Notebook", 1, new BigDecimal(500)); + if (Col[0].toString().equalsIgnoreCase("Codice")) { + String[] Col2=new String[Col.length-1]; + for(int i=1;i<Col.length;i++){ + Col2[i-1]=Col[i].replace(" ", "_"); + } + DRDataSource dataSource = new DRDataSource(Col2); + for (int r = 0; r < data.length; r++) { + Object[] row = new Object[data[r].length - 1]; + for (int i = 1; i < data[r].length; i++) { + + + if (Col[i].toString().equalsIgnoreCase("Codice")) { + } else { + + switch (ColType[i]) { + case "text": + if(data[r][i]==null){row[i - 1] ="";}else{row[i - 1] = data[r][i].toString();} + + break; + case "integer": + if(data[r][i]==null){}else{row[i - 1] =Integer.parseInt(data[r][i].toString());} + + break; + case "boolean": + if (data[r][i] != null) { + if (data[r][i].toString().equalsIgnoreCase("false")) { + row[i - 1] = "No"; + } else { + row[i - 1] = "Sì"; + } + } +//if(data[r][i]==null){row[i - 1] =false;}else{row[i - 1] =Boolean.parseBoolean(data[r][i].toString());} + + break; + case "float": + if(data[r][i]==null){}else{row[i - 1] =Float.parseFloat(data[r][i].toString());} + + break; + } + } + } + dataSource.add(row); + + + } + return dataSource; + } else { + DRDataSource dataSource = new DRDataSource(Col); +// Double tot= 0.0; + for (int r = 0; r < data.length; r++) { + dataSource.add(data[r]); +// tot=tot + Float.parseFloat(data[r][1].toString()); + } + +// Object[][] RigaTotale=new Object[1][2]; +// RigaTotale[0][0]="Totale"; +// RigaTotale[0][1]=tot; +// dataSource.add(RigaTotale); + return dataSource; + } + } + + /** + * Creates new form JframeReport + */ + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/JPnlPagamenti.form b/src/puntocassa/JPnlPagamenti.form new file mode 100644 index 0000000..1632533 --- /dev/null +++ b/src/puntocassa/JPnlPagamenti.form @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLblTitolo1" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jBtnAggiorna" min="-2" pref="97" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Component id="jLblTitolo" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="67" max="-2" attributes="0"/> + <Component id="jBtnAnnulla" min="-2" pref="97" max="-2" attributes="0"/> + </Group> + <Component id="jCmbCat" alignment="1" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLblTitolo" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLblTitolo1" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jCmbCat" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="13" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jBtnAggiorna" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jBtnAnnulla" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLblTitolo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Saldo insufficiente per l'acquisto!"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLblTitolo1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Modalità pagamento:"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jCmbCat"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="4"> + <StringItem index="0" value="Item 1"/> + <StringItem index="1" value="Item 2"/> + <StringItem index="2" value="Item 3"/> + <StringItem index="3" value="Item 4"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="jBtnAggiorna"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="OK"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="jBtnAnnulla"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Chiudi"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnAnnullaActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + </SubComponents> +</Form> diff --git a/src/puntocassa/JPnlPagamenti.java b/src/puntocassa/JPnlPagamenti.java new file mode 100644 index 0000000..9b9602f --- /dev/null +++ b/src/puntocassa/JPnlPagamenti.java @@ -0,0 +1,109 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +/** + * + * @author Marco + */ +public class JPnlPagamenti extends javax.swing.JPanel { + + /** + * Creates new form JPnlPagamenti + */ + public JPnlPagamenti() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLblTitolo = new javax.swing.JLabel(); + jLblTitolo1 = new javax.swing.JLabel(); + jCmbCat = new javax.swing.JComboBox(); + jBtnAggiorna = new javax.swing.JButton(); + jBtnAnnulla = new javax.swing.JButton(); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Saldo insufficiente per l'acquisto!"); + + jLblTitolo1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jLblTitolo1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo1.setText("Modalità pagamento:"); + + jCmbCat.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jCmbCat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + jBtnAggiorna.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jBtnAggiorna.setText("OK"); + + jBtnAnnulla.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jBtnAnnulla.setText("Chiudi"); + jBtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnAnnullaActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLblTitolo1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jBtnAggiorna, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(67, 67, 67) + .addComponent(jBtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jCmbCat, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLblTitolo1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jCmbCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jBtnAggiorna) + .addComponent(jBtnAnnulla)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + }// </editor-fold>//GEN-END:initComponents + + private void jBtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAnnullaActionPerformed + // TODO add your handling code here: + + }//GEN-LAST:event_jBtnAnnullaActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + public javax.swing.JButton jBtnAggiorna; + public javax.swing.JButton jBtnAnnulla; + public javax.swing.JComboBox jCmbCat; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JLabel jLblTitolo1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/MyApplication.java b/src/puntocassa/MyApplication.java new file mode 100644 index 0000000..04014a3 --- /dev/null +++ b/src/puntocassa/MyApplication.java @@ -0,0 +1,291 @@ +package puntocassa; + + +import SmartCard.ISO7816Response; +import SmartCard.SmartCard; +import SmartCard.StringUtil; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Properties; +import javax.smartcardio.CardException; +import javax.smartcardio.CommandAPDU; +import javax.smartcardio.ResponseAPDU; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Marco + */ +public class MyApplication { + public static String path ="";// System.getProperty("user.dir") + "/db/MyFactoryDB.sqlite"; + public static String ElencoRigheDivisori=""; + public static String ElencoColonneFloat=""; + public static String ElencoColonneReport=""; + public static String ReportColonnaGroupBy=""; + public static String ReportColonnaSomma=""; + public static SmartCard SC = new SmartCard(); + public static String idTesseraA=""; + public static String UltimoTxt=" "; + public static Boolean TastieraVideo=true; + public static Boolean UnaVolta=false; + + public boolean isNumeric(String s) { + return s.matches("[-+]?\\d*\\.?\\d+"); +} + public String NumericMonth(String Month) { + String num=""; + switch (Month) { + case "Jan": + num="01"; + break; + case "Feb": + num="02"; + break; + case "Mar": + num="03"; + break; + case "Apr": + num="04"; + break; + case "May": + num="05"; + break; + case "Jun": + num="06"; + break; + case "Jul": + num="07"; + break; + case "Aug": + num="08"; + break; + case "Sep": + num="09"; + break; + case "Oct": + num="10"; + break; + case "Nov": + num="11"; + break; + case "Dec": + num="12"; + break; + } + return num; + } + + public String MySelect(PuntoCassa frmA, String Query,String Campo) { + String res = ""; + try { + Connection dbConnection = DriverManager.getConnection(frmA.dbStringa, frmA.dbUsername, frmA.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + while (rs.next()) { + + res = rs.getString(Campo); + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + JOptionPane.showMessageDialog(frmA, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + if(res==null){res="";} + return res; + } + public String ExportCSV(Object[][] data, String[] Cols,String[] ColType,int ColInizio) { + StringBuilder s = new StringBuilder(""); + DecimalFormat df = new DecimalFormat("#0.00"); + for (int i = ColInizio; i < Cols.length; i++) { + s.append(Cols[i] + ";"); + } + s.append("\r"); + for (int i = 0; i < data.length; i++) { + for (int c = ColInizio; c < Cols.length; c++) { + if (data[i][c] == null) { + s.append(";"); + } else { + + String field=data[i][c].toString().replace("\r", " "); + + if (ColType[c].toString().equalsIgnoreCase("integer")){ + Integer in=Integer.parseInt(field); + if (in==0){field="";}else{field="" + in;} + + }else if (ColType[c].toString().equalsIgnoreCase("float")){ + Float in=Float.parseFloat(field); + if (in==0){field="";}else{field="" + df.format(in);} + + } else if (ColType[c].toString().equalsIgnoreCase("boolean")){ + Boolean in=Boolean.parseBoolean(field); + if (in==true){field="Si";}else{field="No";} + + } + field=field.replace("\n", " "); + field=field.replace(";", ","); + s.append(field + ";"); + } + } + s.append("\r"); + } + + return s.toString(); + } + public static String sendAPDU(PuntoCassa frmATT, String Sdata,String Scla,String Sins,String Sp1,String Sp2,String Sp3,String Sle) throws CardException{ + CommandAPDU apdu=null; + + if(!SC.isConnected()){ + JOptionPane.showMessageDialog(frmATT, new Exception("Please connect first"),"Exception",JOptionPane.ERROR_MESSAGE); + return ""; + } + + Integer cla = StringUtil.parseHex(Scla); + Integer ins = StringUtil.parseHex(Sins); + Integer p1 = StringUtil.parseHex(Sp1); + Integer p2 = StringUtil.parseHex(Sp2); + Integer p3 = StringUtil.parseHex(Sp3); + Integer le = StringUtil.parseHex(Sle); + + if(cla == null){ + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for CLASS"),"Exception",JOptionPane.ERROR_MESSAGE); + return ""; + } + if(ins == null){ + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for INS"),"Exception",JOptionPane.ERROR_MESSAGE); + return ""; + } + if(p1 == null || p2 == null){ + JOptionPane.showMessageDialog(frmATT, new Exception("Invalid value for P1/2"),"Exception",JOptionPane.ERROR_MESSAGE); + + return ""; + } + + byte[] data = StringUtil.stringToByteArr(Sdata); + + if(Sdata.length()==0 && le==null) + apdu = new CommandAPDU(cla, ins,p1, p2); + else if(p3 == null && le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2, data); + else if(le == null) + apdu = new CommandAPDU(cla, ins ,p1, p2,data,0,p3); + else{ + if(p3==null) p3 = data.length; + apdu = new CommandAPDU(cla, ins ,p1, p2, data,0,p3,le); + } + + ResponseAPDU res = SC.getChannel().transmit(apdu); + + String sw = StringUtil.byteToHex(res.getSW1()) + " " + StringUtil.byteToHex(res.getSW2()) ; + ISO7816Response isoResp = new ISO7816Response(res.getSW1(), res.getSW2()); + String status = isoResp.toString(); + + /*if(isoResp.isGood()) + lbLastStatus.setForeground(Color.GREEN); + else + lbLastStatus.setForeground(Color.RED); + lbLastStatus.setText(status);*/ + + /*String dataoutHex = StringUtil.byteArrToString(res.getData()," "); + String dataoutStr = StringUtil.byteArrToPrintableString(res.getData()); + String fullResHex = StringUtil.byteArrToString(res.getBytes()," ");*/ + String CF="",DS=""; + //jtxtDati.setText(StringUtil.hexDump(res.getBytes(), 16)); + if (Sle.length()>0 && Integer.parseInt(Sle)==140 ) { + String Dati = StringUtil.byteArrToPrintableString(res.getBytes()); + if (Dati.length() >= 47) { +// jtxtDati.append(Dati+ "\n"); +// StringBuilder S = new StringBuilder(); +// S.append(Dati.substring(12, 26) + "\n"); + idTesseraA = Dati.substring(12, 26).replace(".", ""); + CF = Dati.substring(31, 47); + DS = TrovaScadenza(Dati);//Dati.substring(188, 196);//data scadenza + CF = CF + "|" + DS; +// S.append(Dati.substring(31, 47) + "\n");//CF +// jtxtCF.setText(Dati.substring(31, 47)); +// S.append(Dati.substring(47, 74) + "\n"); +// S.append(Dati.substring(75, 83) + "\n"); +// S.append(Dati.substring(99, 133) + "\n"); +// jtxtDati.append(S.toString()); + } + return CF; + } + if (Sle.length()>0 && Integer.parseInt(Sle)==14) { + String Dati = StringUtil.byteArrToPrintableString(res.getBytes()); +// jtxtDati.append(Dati+ "\n"); + StringBuilder S = new StringBuilder(); + if (Dati.length() >= 16) { + S.append(Dati.substring(4, 16) + "\n"); + idTesseraA = idTesseraA + Dati.substring(4, 13) + Luhn(idTesseraA + Dati.substring(4, 13)); + } +// jtxtIDT.setText(IdTesseraA); +// jtxtDati.append(S.toString()); + + + } + + return idTesseraA; + + } + private static String TrovaScadenza(String Testo) { + String Scadenza = ""; + String Tag = "#"; + Integer PI = Testo.lastIndexOf(Tag); + if (PI > 0) { + Scadenza=Testo.substring(PI-9, PI-1); + } + + return Scadenza; + } + public String AggiustaDateTessera(String data){ + String Data=""; + if(data.length()>=8){ + String m="",d="",a=""; + m=data.substring(4, 6); + d=data.substring(6, 8); + a=data.substring(0, 4); + Data= d + "/" + m + "/" + a; + + } + + return Data; + + } + static String Luhn(String Dati){ + + + Integer s=0; + for (Integer i=0;i<Dati.length(); i++){ + Integer d= Integer.parseInt(Dati.substring(i, i+1)); + if (i % 2 ==0 ){ + Integer doppio=d*2; + if (doppio>=10){doppio=1+(doppio%10);} + s=s+doppio; + }else{ + s=s+d; + } + } + Integer resto=s%10; + if (resto == 0) { + return "0"; + } else { + Integer ris=10 - resto; + return "" + ris; + } + + + } +} diff --git a/src/puntocassa/MyDialog.java b/src/puntocassa/MyDialog.java new file mode 100644 index 0000000..60393a1 --- /dev/null +++ b/src/puntocassa/MyDialog.java @@ -0,0 +1,109 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import org.apache.poi.poifs.property.Parent; + +/** + * + * @author Marco + */ +public class MyDialog extends JDialog{ + PuntoCassa frmPuntoCassa; + JPnlPagamenti panel=new JPnlPagamenti(); + public MyDialog(){ + super(); +// JPnlPagamenti panel=new JPnlPagamenti(); +// //panel.add(new JLabel("Hello dialog")); +// this.getContentPane().add(panel); + } + + public MyDialog(PuntoCassa PuntoC,String title,boolean modal){ + super(PuntoC,title,modal); + frmPuntoCassa=PuntoC; + //this.setSize(300,200); + + //panel.add(new JLabel("Hello dialog")); + this.getContentPane().add(panel); + //this.setVisible(true); + + CaricaCombo("Select nome,id from tipi_pagamenti where id<>0 order by nome", "nome", "id", panel.jCmbCat); + + + + JButton btn=panel.jBtnAggiorna; + btn.addActionListener(new ActionListener(){ + public void actionPerformed(ActionEvent e) { + ComboItem c = new ComboItem(null, null); + c = (ComboItem) panel.jCmbCat.getSelectedItem(); + + + frmPuntoCassa.idModoPagamento=c.getKey(); + frmPuntoCassa.ClickModoPagamento(c.getValue().toString()); +// if (c.getKey()==0){frmPuntoCassa.ClickCarta();} +// if (c.getKey()==1){frmPuntoCassa.ClickContanti();} +// if (c.getKey()==2){frmPuntoCassa.ClickTicket();} + + MyDialog.this.dispose(); + + } + }); + + JButton jBtnAnnulla=panel.jBtnAnnulla; + jBtnAnnulla.addActionListener(new ActionListener(){ + public void actionPerformed(ActionEvent e) { + frmPuntoCassa.ClickCarta(); + MyDialog.this.dispose(); + + } + }); + + } + public void AssegnaPagamento(){ + + } + + private void CaricaCombo (String Query, String itemValue, String itemId, JComboBox cmb) { + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Connection c = dbConnection; + Statement stmt = null; + cmb.removeAllItems(); + stmt = c.createStatement(); + ResultSet rs = stmt.executeQuery(Query); + int r = 0; + while (rs.next()) { + + ComboItem row=new ComboItem(rs.getLong(itemId), rs.getString(itemValue)) ; + cmb.addItem(row); + + r++; + + } + rs.close(); + stmt.close(); + dbConnection.close(); + + } catch (SQLException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } + + } +} + diff --git a/src/puntocassa/MyKeyBoard.form b/src/puntocassa/MyKeyBoard.form new file mode 100644 index 0000000..773bfba --- /dev/null +++ b/src/puntocassa/MyKeyBoard.form @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jPanel3" max="32767" attributes="0"/> + <Component id="jPanel2" max="32767" attributes="0"/> + <Component id="jPanel4" alignment="1" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jBtnSpazio" pref="642" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="14" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jBtnCanc" alignment="0" max="32767" attributes="0"/> + <Component id="jBtnInvio" alignment="0" pref="90" max="32767" attributes="0"/> + <Component id="jBtnShift" alignment="0" pref="0" max="32767" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel1" pref="57" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jPanel2" pref="59" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jPanel3" pref="57" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jPanel4" pref="58" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> + <Component id="jBtnSpazio" min="-2" pref="38" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jBtnCanc" min="-2" pref="67" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jBtnInvio" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jBtnShift" min="-2" pref="64" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="0"/> + <Property name="rows" type="int" value="1"/> + </Layout> + </Container> + <Component class="javax.swing.JButton" name="jBtnCanc"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Canc"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnCancActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnInvio"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Invio"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnInvioActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="0"/> + <Property name="rows" type="int" value="1"/> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="jPanel4"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="0"/> + <Property name="rows" type="int" value="1"/> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="jPanel3"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="0"/> + <Property name="rows" type="int" value="1"/> + </Layout> + </Container> + <Component class="javax.swing.JButton" name="jBtnSpazio"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnSpazioActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jBtnShift"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Maiuscolo"/> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/src/puntocassa/MyKeyBoard.java b/src/puntocassa/MyKeyBoard.java new file mode 100644 index 0000000..e8b0c21 --- /dev/null +++ b/src/puntocassa/MyKeyBoard.java @@ -0,0 +1,290 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Desktop; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextField; + +/** + * + * @author Marco + */ +public class MyKeyBoard extends javax.swing.JFrame { + public JTextField txt; + public JFrame Parent; + Process proc; + Boolean FormCerca=false; + /** + * Creates new form MyKeyBoard + */ + public MyKeyBoard(JFrame parent,Boolean Ricerca) { + initComponents(); + CreaPulsanti(); + Parent=parent; + FormCerca=Ricerca; + Parent.setEnabled(false); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + } + + private void CreaPulsanti(){ + String [] Tasti={"1","2","3","4","5","6","7","8","9","0","/","ì"}; + Crea(Tasti,jPanel1); + String [] Tasti2={"q","w","e","r","t","y","u","i","o","p","è","é"}; + Crea(Tasti2,jPanel2); + String [] Tasti3={"a","s","d","f","g","h","j","k","l","ò","à","ù"}; + Crea(Tasti3,jPanel3); + String [] Tasti4={"z","x","c","v","b","n","m",",",".",":","-","'"}; + Crea(Tasti4,jPanel4); + } + private void Crea(String [] Tasti,JPanel pnl){ + ActionListener listenerBottoni = new ListenerPulsanti(); + for (int i=0;i<Tasti.length;i++){ + JButton btn=new JButton(Tasti[i]); + btn.setFont(new java.awt.Font("Tahoma", 1, 12)); + pnl.add(btn); + btn.addActionListener(listenerBottoni); + + } + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jBtnCanc = new javax.swing.JButton(); + jBtnInvio = new javax.swing.JButton(); + jPanel2 = new javax.swing.JPanel(); + jPanel4 = new javax.swing.JPanel(); + jPanel3 = new javax.swing.JPanel(); + jBtnSpazio = new javax.swing.JButton(); + jBtnShift = new javax.swing.JToggleButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent evt) { + formWindowClosing(evt); + } + }); + + jPanel1.setLayout(new java.awt.GridLayout(1, 0)); + + jBtnCanc.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + jBtnCanc.setText("Canc"); + jBtnCanc.setToolTipText(""); + jBtnCanc.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnCancActionPerformed(evt); + } + }); + + jBtnInvio.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + jBtnInvio.setText("Invio"); + jBtnInvio.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnInvioActionPerformed(evt); + } + }); + + jPanel2.setLayout(new java.awt.GridLayout(1, 0)); + + jPanel4.setLayout(new java.awt.GridLayout(1, 0)); + + jPanel3.setLayout(new java.awt.GridLayout(1, 0)); + + jBtnSpazio.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnSpazioActionPerformed(evt); + } + }); + + jBtnShift.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + jBtnShift.setText("Maiuscolo"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(6, 6, 6)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jBtnSpazio, javax.swing.GroupLayout.DEFAULT_SIZE, 642, Short.MAX_VALUE) + .addGap(14, 14, 14))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jBtnCanc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jBtnInvio, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE) + .addComponent(jBtnShift, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) + .addGap(0, 0, 0)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 59, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE) + .addGap(5, 5, 5) + .addComponent(jBtnSpazio, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addComponent(jBtnCanc, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnInvio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnShift, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jBtnCancActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCancActionPerformed + // TODO add your handling code here: + try{ +// Desktop desktop = null; +// if (Desktop.isDesktopSupported()) { +// desktop = Desktop.getDesktop(); +// } +// String sysroot = System.getenv("SystemRoot"); +// desktop.open(new File(sysroot + "/system32/osk.exe")); +// proc = Runtime.getRuntime().exec( "cmd /c c:/windows/system32/osk.exe"); +// proc =Runtime.getRuntime().exec("osk"); + int d = txt.getText().length(); + if (d>0){ + txt.setText(txt.getText().substring(0, d-1)); + + } + + + }catch(Exception e){} + }//GEN-LAST:event_jBtnCancActionPerformed + + private void jBtnInvioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnInvioActionPerformed + + if (FormCerca) { + frmCerca frm; + frm = (frmCerca) Parent; + frm.Cerca(); + } + + Parent.setEnabled(true); + this.dispose(); + }//GEN-LAST:event_jBtnInvioActionPerformed + + private void jBtnSpazioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnSpazioActionPerformed + // TODO add your handling code here: + txt.setText(txt.getText()+ " "); + }//GEN-LAST:event_jBtnSpazioActionPerformed + + private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing + // TODO add your handling code here: + Parent.setEnabled(true); + + this.dispose(); + }//GEN-LAST:event_formWindowClosing + private class ListenerPulsanti implements ActionListener + { + public void actionPerformed(ActionEvent ev) + { + JButton pressed = (JButton) ev.getSource(); + String c = pressed.getText(); + if(jBtnShift.isSelected()){c=c.toUpperCase();} + txt.setText(txt.getText()+c); + /*if (c!="Canc" && c!="Maiuscolo" && c!="Spazio") + { + mainFrame.inserisciCarattere(c); + } + else if (c=="Canc") + { + mainFrame.inserisciCanc(c); + } + else if(c=="Maiuscolo") + { + mainFrame.inserisciMaiuscolo(c); + } + else if(c=="Spazio") + { + mainFrame.inserisciCarattere(" "); + }*/ + } + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(MyKeyBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(MyKeyBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(MyKeyBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(MyKeyBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new MyKeyBoard(null,false).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnCanc; + private javax.swing.JButton jBtnInvio; + private javax.swing.JToggleButton jBtnShift; + private javax.swing.JButton jBtnSpazio; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/MyTableModel.java b/src/puntocassa/MyTableModel.java new file mode 100644 index 0000000..569cd7d --- /dev/null +++ b/src/puntocassa/MyTableModel.java @@ -0,0 +1,227 @@ +package puntocassa; + + +import java.util.ArrayList; +import java.util.Vector; +import javax.swing.table.AbstractTableModel; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Marco + */ + public class MyTableModel extends AbstractTableModel{ + private String[] columnNames ; + private Object[][] data; + private Boolean editable=false; + private Boolean modificato=false; + private int[] colModificabile; + private int[] colBoolean; + private Object[]row; + + public Double Somma(int col) { + Double tot = 0.0; + if (data != null) { + for (int i = 0; i < data.length; i++) { + if (data[i][col] != null) { + tot = tot + Double.parseDouble(data[i][col].toString()); + } + } + } + return tot; + } + + public int SommaInt(int col) { + int tot = 0; + if (data != null) { + for (int i = 0; i < data.length; i++) { + if (data[i][col] != null) { + tot = tot + (int) data[i][col]; + } + } + } + return tot; + } + + public Object[] getRow(int Row) { + row=data[Row]; + return row; + } + + public void addRow(Object[] rowData) { + Object[][] data2=null; + if (data != null) { + data2 = new Object[data.length+1][]; + int r = 0; + for (int i = 0; i < data.length; i++) { + data2[r] = data[i]; + r++; + } + data2[r] = rowData; + }else{ + data2=new Object[1][]; + data2[0] = rowData; + } + + this.data = data2; +// fireTableRowsInserted(data2.length, data2.length); + fireTableDataChanged(); + + } + + public void setRow(Object[] row) { + Object[][] data2; + try { + data2 = new Object[data.length + 1][]; + for (int i = 0; i < data.length; i++) { + data2[i] = data[i]; + } + data2[data.length] = row; + this.data = data2; + } catch (Exception ex) { + } + + } + public void deleteRow(int row) { + if (data.length > 0) { + Object[][] data2; + data2 = new Object[data.length - 1][]; + int r=0; + for (int i = 0; i < data.length; i++) { + if (i != row) { + data2[r] = data[i]; + r++; + } + } + + this.data = data2; + this.fireTableDataChanged(); + } + } + public int[] isColBoolean() { + return colBoolean; + } + + public void setColBoolean(int[] colBoolean) { + this.colBoolean = colBoolean; + } + + public int[] getColModificabile() { + return colModificabile; + } + + public void setColModificabile(int[] colModificabile) { + this.colModificabile = colModificabile; + } + + public Boolean isModificato() { + return modificato; + } + + public void setModificato(Boolean modificato) { + this.modificato = modificato; + } + + public Boolean isEditable() { + return editable; + } + + public void setEditable(Boolean editable) { + this.editable = editable; + } + + public void setColumname(String[] colnames){ + columnNames=colnames; + } + + public void setData(Object[][] rowdata){ + data=rowdata; + } + + public int getColumnCount() { + return columnNames.length; + } + + public int getRowCount() { + int rows=0; + try{rows=data.length;}catch(Exception ex){} + return rows; + } + + public String getColumnName(int col) { + return columnNames[col]; + } + + public Object getValueAt(int row, int col) { + try{ + return data[row][col]; + + }catch(Exception ex){ + return ""; + } + + } + + public Class getColumnClass(int c) { + return getValueAt(0, c).getClass(); + } + + @Override + public void setValueAt(Object value, int row, int col) { + if (colBoolean != null) { + for (int i = 0; i < colBoolean.length; i++) { + if (colBoolean[i] == col) { + //data[row][col] = value; + //fireTableCellUpdated(row, col); + return; + } + } + } + if (colModificabile != null) { + for (int i = 0; i < colModificabile.length; i++) { + if (colModificabile[i] == col) { + data[row][col] = value; + fireTableCellUpdated(row, col); + return; + } + } + } else { + data[row][col] = value; + fireTableCellUpdated(row, col); + return; + + } + + } + + + @Override + public boolean isCellEditable(int row, int col) { + if (editable) { + boolean M = false; + for (int i = 0; i < colModificabile.length; i++) { + if (col == colModificabile[i]) { + if (data[row][col].toString().equalsIgnoreCase("true") || data[row][col].toString().equalsIgnoreCase("false")) { + data[row][col] = !(Boolean) data[row][col]; + + } else { + + } + M = true; + } + } + modificato = M; + return M; + } else { + return false; + } + + } + + +} diff --git a/src/puntocassa/PuntoCassa.form b/src/puntocassa/PuntoCassa.form new file mode 100644 index 0000000..9612a29 --- /dev/null +++ b/src/puntocassa/PuntoCassa.form @@ -0,0 +1,1251 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.2" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="0"/> + <Property name="title" type="java.lang.String" value="Prova di titolo"/> + <Property name="name" type="java.lang.String" value="frmPrincipale" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="frmPrincipale"/> + <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/> + <Property name="AccessibleContext.accessibleParent" type="javax.accessibility.Accessible" editor="org.netbeans.modules.form.ComponentChooserEditor"> + <ComponentRef name="Form"/> + </Property> + </AccessibilityProperties> + <SyntheticProperties> + <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,19,0,0,3,89"/> + <SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/> + <SyntheticProperty name="formSizePolicy" type="int" value="0"/> + <SyntheticProperty name="generatePosition" type="boolean" value="true"/> + <SyntheticProperty name="generateSize" type="boolean" value="true"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="componentResized" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="resizeRules"/> + <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/> + <EventHandler event="windowDeiconified" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowDeiconified"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnlErrore"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblMessaggioErrore"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="lblMessaggioErrore"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="horizontalTextPosition" type="int" value="0"/> + <Property name="name" type="java.lang.String" value="lblMessaggioErrore" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="96" y="24" width="600" height="240"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlTop"> + <Properties> + <Property name="name" type="java.lang.String" value="pnlTop" noResource="true"/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="pnlTop"/> + <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/> + </AccessibilityProperties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="4"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="188" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnlCliente"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Cliente"/> + <Property name="AccessibleContext.accessibleParent" type="javax.accessibility.Accessible" editor="org.netbeans.modules.form.ComponentChooserEditor"> + <ComponentRef name="pnlCliente"/> + </Property> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="660" height="140"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" max="32767" attributes="0"/> + <Component id="jPanel2" alignment="1" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Tessera"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="lblCodice2" max="32767" attributes="0"/> + <Component id="lblCodice1" pref="104" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblPunti" max="32767" attributes="0"/> + <Component id="lblSaldo" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="lblCodice3" max="32767" attributes="0"/> + <Component id="lblCodice4" max="32767" attributes="0"/> + <Component id="lblCodice5" alignment="1" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="lblResiduo" pref="140" max="32767" attributes="0"/> + <Component id="lblTipoPagamento" max="32767" attributes="0"/> + <Component id="lblGratuità" alignment="0" pref="140" max="32767" attributes="0"/> + </Group> + </Group> + <Component id="btnImpostaCliente" alignment="0" pref="252" max="32767" attributes="0"/> + <Component id="jTxtTessera" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="48" max="-2" attributes="0"/> + <Component id="jBtnReadCard" min="-2" pref="154" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jcmbSC" min="-2" pref="32" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jcmbSC" min="-2" pref="3" max="-2" attributes="0"/> + <Component id="jBtnReadCard" pref="0" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jTxtTessera" min="-2" pref="30" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="btnImpostaCliente" min="-2" pref="34" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblSaldo" min="-2" max="-2" attributes="0"/> + <Component id="lblCodice1" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblPunti" min="-2" max="-2" attributes="0"/> + <Component id="lblCodice2" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblTipoPagamento" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="lblCodice3" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblResiduo" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="lblCodice4" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblCodice5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblGratuità" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblCodice1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Saldo:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblSaldo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCodice2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Punti:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblPunti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTxtTessera"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jTxtTesseraFocusGained"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="btnImpostaCliente"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Imposta"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnImpostaClienteActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="jBtnReadCard"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Leggi Tessera"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnReadCardActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JComboBox" name="jcmbSC"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="4"> + <StringItem index="0" value="Item 1"/> + <StringItem index="1" value="Item 2"/> + <StringItem index="2" value="Item 3"/> + <StringItem index="3" value="Item 4"/> + </StringArray> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCodice3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Tipo Pagamento:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblTipoPagamento"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCodice4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Residuo:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblResiduo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCodice5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Gratuità Residue:"/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Gtratuità Residue:"/> + </AccessibilityProperties> + </Component> + <Component class="javax.swing.JLabel" name="lblGratuità"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Cliente"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="lblOrganizzazione5" alignment="0" max="32767" attributes="0"/> + <Component id="lblOrganizzazione4" alignment="0" max="32767" attributes="0"/> + <Component id="lblOrganizzazione3" alignment="0" max="32767" attributes="0"/> + <Component id="lblOrganizzazione2" alignment="0" max="32767" attributes="0"/> + <Component id="lblCodice" alignment="1" max="32767" attributes="0"/> + <Component id="lblDenominazione" max="32767" attributes="0"/> + <Component id="lblOrganizzazione" max="32767" attributes="0"/> + <Component id="lblOrganizzazione1" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="lblConvenzione" alignment="0" pref="262" max="32767" attributes="0"/> + <Component id="lblAzienda" alignment="0" max="32767" attributes="0"/> + <Component id="lblScadTessera" alignment="0" max="32767" attributes="0"/> + <Component id="lblNascita" alignment="0" max="32767" attributes="0"/> + <Component id="lblNome" alignment="0" max="32767" attributes="0"/> + <Component id="lblCognome" alignment="0" max="32767" attributes="0"/> + <Component id="lblCategoria" max="32767" attributes="0"/> + <Component id="lblFascia" max="32767" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblCodice" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblCategoria" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblDenominazione" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblCognome" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblNome" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblOrganizzazione" 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="lblOrganizzazione1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblNascita" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblOrganizzazione3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblAzienda" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblOrganizzazione4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblConvenzione" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblOrganizzazione5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblFascia" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblOrganizzazione2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblScadTessera" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblCodice"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Categoria:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCategoria"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblDenominazione"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Cognome:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCognome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Nome:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblNome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Data Nascita:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblNascita"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Bonus Residui:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblScadTessera"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Azienda:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblAzienda"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Convenzione:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblConvenzione"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblOrganizzazione5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Fascia:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblFascia"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="[...]"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlCategorie"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="ff" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Categoria"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="1"/> + <Property name="horizontalGap" type="int" value="1"/> + <Property name="rows" type="int" value="10"/> + <Property name="verticalGap" type="int" value="1"/> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="pnlConto"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Conto"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="286" y="150" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="0"/> + <Property name="horizontalGap" type="int" value="2"/> + <Property name="rows" type="int" value="3"/> + <Property name="verticalGap" type="int" value="2"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jbtnDuplica"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="f0" green="f0" red="8c" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="enabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnDuplicaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnElimina"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="f0" green="f0" red="8c" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnEliminaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnAnnulla"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="f0" green="f0" red="8c" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Annulla"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAnnullaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnSu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnGiu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnGiuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="txtTotaleCassa"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="20" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="f2" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="€ 0,00"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtTotaleCassaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnChiudi"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="ff" red="33" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Chiudi"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnChiudiActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnStampa"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnStampaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="txtTotalePunti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Punti 0"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtTotalePuntiActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlAzioni"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="ff" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Azioni"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="153" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="6"/> + <Property name="horizontalGap" type="int" value="2"/> + <Property name="rows" type="int" value="2"/> + <Property name="verticalGap" type="int" value="2"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jBtnStorno"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Storno"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 2, 2, 2]"/> + </Property> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnStornoActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jBtnAsporto"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Modalità"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnAsportoActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnprodotti"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Prodotti"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 2, 2, 2]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnprodottiActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnMovimenti"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Ultimi movimenti"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 2, 2, 2]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnMovimentiActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnBuoni"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value=""/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 2, 2, 2]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnBuoniActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jTBP0"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="A Scalare"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTBP0ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jTBP1"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Contanti"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTBP1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jTBP2"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Ticket"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTBP2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JToggleButton" name="jTBP3"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="Differito"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTBP3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnEsci"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Esci"/> + <Property name="toolTipText" type="java.lang.String" value="Esci"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnEsciActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlLista"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="ff" red="cc" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Lista"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="288" y="0" width="140" height="144"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="scpLista"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="PuntoCassa_scpLista"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="tblLista"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + <Property name="name" type="java.lang.String" value="jtbl" noResource="true"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlProdotti"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="ff" red="cc" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Prodotto"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> + <Property name="columns" type="int" value="2"/> + <Property name="horizontalGap" type="int" value="2"/> + <Property name="rows" type="int" value="6"/> + <Property name="verticalGap" type="int" value="2"/> + </Layout> + </Container> + <Container class="javax.swing.JPanel" name="pnlLista1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="ff" red="cc" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Lista"/> + </Border> + </Property> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Lista1"/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="288" y="0" width="140" height="144"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="scpLista1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="PuntoCassa_scpLista"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="tblLista1"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + <Property name="name" type="java.lang.String" value="jtbl" noResource="true"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="pnlLogin"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Accesso al sistema"> + <Font PropertyName="font" name="Tahoma" size="14" style="1"/> + </TitledBorder> + </Border> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="pnlLogin"/> + <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="70" width="360" height="220"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="lblPassword" max="32767" attributes="0"/> + <Component id="lblUsername" pref="62" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="txtPassword" max="32767" attributes="0"/> + <Component id="txtUsername" max="32767" attributes="0"/> + <Component id="btnLogin" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jChLogin" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Component id="jBtnDB1" max="32767" attributes="0"/> + <Component id="btnTermina" alignment="1" pref="262" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jChLogin" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtUsername" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblUsername" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtPassword" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblPassword" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="btnLogin" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jBtnDB1" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="btnTermina" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="btnLogin"> + <Properties> + <Property name="text" type="java.lang.String" value="Login"/> + <Property name="enabled" type="boolean" value="false"/> + <Property name="horizontalTextPosition" type="int" value="0"/> + <Property name="name" type="java.lang.String" value="btnLogin" noResource="true"/> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoginActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="txtUsername"> + <Properties> + <Property name="enabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtUsernameFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="txtUsernameMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="lblUsername"> + <Properties> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Username"/> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblPassword"> + <Properties> + <Property name="horizontalAlignment" type="int" value="4"/> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JPasswordField" name="txtPassword"> + <Properties> + <Property name="enabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtPasswordFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="txtPasswordMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="btnTermina"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/puntocassa/esci2.jpg"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="horizontalTextPosition" type="int" value="4"/> + <Property name="label" type="java.lang.String" value=" Termina Programma"/> + <Property name="name" type="java.lang.String" value="btnTermina" noResource="true"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnTerminaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JCheckBox" name="jChLogin"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="selected" type="boolean" value="true"/> + <Property name="text" type="java.lang.String" value="Login con tessera"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jChLoginActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnDB1"> + <Properties> + <Property name="toolTipText" type="java.lang.String" value="DB"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 2, 2, 2]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnDB1ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="lblUtenteLoggato"> + <Properties> + <Property name="text" type="java.lang.String" value="[Nessun utente connesso]"/> + <Property name="verticalAlignment" type="int" value="1"/> + <Property name="alignmentY" type="float" value="0.0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="310" width="130" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblStatoConnessione"> + <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="[Nessuna connessione]"/> + <Property name="verticalAlignment" type="int" value="1"/> + <Property name="alignmentY" type="float" value="0.0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="425" y="340" width="120" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblInfo"> + <Properties> + <Property name="text" type="java.lang.String" value="[Info Turno]"/> + <Property name="verticalAlignment" type="int" value="1"/> + <Property name="alignmentY" type="float" value="0.0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="180" y="340" width="130" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblInfo2"> + <Properties> + <Property name="text" type="java.lang.String" value="[Info Incassi]"/> + <Property name="verticalAlignment" type="int" value="1"/> + <Property name="alignmentY" type="float" value="0.0"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + <Property name="verticalTextPosition" type="int" value="1"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="160" y="310" width="130" height="20"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblDB"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="33" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="DB"/> + <Property name="opaque" type="boolean" value="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="604" y="360" width="20" height="20"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/src/puntocassa/PuntoCassa.java b/src/puntocassa/PuntoCassa.java new file mode 100644 index 0000000..9781c35 --- /dev/null +++ b/src/puntocassa/PuntoCassa.java @@ -0,0 +1,6797 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package puntocassa; + +//import javax.swing.JDialog; +//import java.beans.*; +import java.awt.*; +import java.awt.event.*; +import java.io.ByteArrayInputStream; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import java.sql.*; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.Properties; +import java.util.Timer; +import java.util.TimerTask; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.swing.BorderFactory; +import javax.swing.ButtonModel; +import javax.swing.DefaultComboBoxModel; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JRootPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JToggleButton; +import javax.swing.ListSelectionModel; +import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import javax.swing.plaf.FontUIResource; +import javax.swing.table.DefaultTableModel; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import jssc.SerialPort; +import jssc.SerialPortException; +import jxl.write.DateTime; +import oracle.jdbc.*; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import static puntocassa.MyApplication.path; + + +//****************************************************************************** +// * +// * @author Master +// * +//****************************************************************************** +public class PuntoCassa extends JFrame implements ActionListener { + + // ========================================================================== + // *** Variabili globali relative alle connessioni + // ========================================================================== + public static String Versione="2.4"; + public static String dbStringa = ""; + private String dbTipo = ""; + private String dbDriver = ""; + public static String dbUsername = ""; + public static String dbPassword = ""; + //public static Connection dbConnection; + //private Integer statoConnessione = 0; + private String utenteLoggato = ""; + private String imgPath = "";// "L:\\Lavoro\\Goffredo\\risorse\\"; +// private String Path_Aggiornamento=""; + private int displayWidth = 1024; + private int displayHeight = 768; + private Long Progressivo = 0L; + private Long ProgressivoTurno = 0L; + private Long ProgressivoGiorno = 0L; + private Double ProgressivoScalare = 0.0; + private Double ProgressivoContanti = 0.0; + private Double ProgressivoTicket = 0.0; + private Double ProgressivoDifferito = 0.0; + private Double SaldoMinimoStop = 0.0; + private Long idTurno = 0L; + private String NomeTurno = ""; + private Long idTurnoAttuale = 0L; + private String NomeTurnoAttuale = ""; + + private int ColImporto = 1; + private int ColPunti = 2; + private int ColIDProdotto = 3; + private int ColImporto2 = 4; + private int ColCategoria = 5; + public Long idPuntoCassa = 0L; + private Boolean ConsentiCredito = false; + private Long idProfiloTariffario = 0L; + private Long idProfiloTariffarioDefault = 0L; + public static Long idModoPagamento = 0L; + public static String ModoPagamentoDefault = "A scalare"; + public static Integer FLAG_BONUS = 0; + private Long idTessera = 0L; + private Long idPrenotazione = 0L; + private Boolean CassaAperta = false; + private Long idAccount = 0L; + Timer timerCard; + private int NumeroCategorie = 0; + + private Boolean StatoCardLettore = false; + StringBuilder TestoSwipCard = new StringBuilder(); + StringBuilder TestoRFIDCard = new StringBuilder(); + StringBuilder LogTestoTessera = new StringBuilder(); + String LogNumeroTessera = "", LogIDTessera = "", LogTesseraErrore = ""; +// StringBuilder TestoCarteCF=new StringBuilder(); +// private String TesseraCartaCF=""; + + private Boolean UnSoloTipoPagamento = false; + private Boolean MenùGiornoPresente = false, MessaggioSaldoUnaVolta = false; + private Boolean FlagMostraDataDiNascita = true; + private Boolean StoCalcolando = false; + private Boolean FlagEsegueStorni = true; + //private Boolean MessaggioFlagExtraUnaVolta = false; + +// private Boolean TesseraCFLetta=false; + //private String idComposizione="",cmdComposizione=""; + private void VerificaAggiornamentoDB() { + //FlagProponiAggiornamentoDB + String FlagProponiAggiornamentoDB = MySelect("Select Valore from Parametri where chiave='FlagProponiAggiornamentoDB' ", "Valore"); + if (FlagProponiAggiornamentoDB.equals("NO")) { + return; + } + + Long Agg = MySelectInteger("Select DB_locale_aggiornato as Agg from dual", "Agg"); + if (FlagProponiAggiornamentoDB.equals("SI")) { + + if (Agg == 0) { + //jBtnDBActionPerformed(null); + AggiornaDB(true); + } + } else { + if (Agg == 0) { + //jBtnDBActionPerformed(null); + AggiornaDB(false); + } + + } + + } + + private void VerificaModoPagamento() { + String FlagImpostaTipoPagamento = MySelect("Select Valore from Parametri where chiave='FlagImpostaTipoPagamento' ", "Valore"); + if (FlagImpostaTipoPagamento.equals("NO")) { +// jBtnTicket.setEnabled(false); + UnSoloTipoPagamento = true; + } else { +// jBtnTicket.setEnabled(true); + UnSoloTipoPagamento = false; + } + + } + + private void LogTessera() { + try { + if (LogIDTessera == "" && LogNumeroTessera == "" && LogTestoTessera.toString().length() <= 0) { + } else { + MyInsert("Insert into LETTURE_TESSERE (STRINGA_LETTA,NUMERO_TESSERA,ID_TESSERA,ERRORE) values ('" + LogTestoTessera.toString().replace("'", "''") + "','" + LogNumeroTessera + "','" + LogIDTessera + "','" + LogTesseraErrore.replace("'", "''") + "')"); + LogIDTessera = ""; + LogNumeroTessera = ""; + LogTestoTessera = new StringBuilder(); + } + } catch (Exception ex) { + } + } + + enum statiCarta { + Assente, Inserita, Tolta + } + public statiCarta StatoCarta; + public Boolean CartaLetta = false; + public static KeyEventDispatcher keyDispatcher; + + public int HFont = 15; + private int AltControlli = 100; + private int LargControlli = 100; + private int AltRigaGriglia = 0; + +// private Object[][] Completi; +// private Object[] CompletiDett; + + public frmProgress MyProgress; + public frmMeteo MyMeteo; + private int Gratuita_Residue = 0; + //private int Gratuita_ResidueProg=0; + private int Bonus_Residui = 0; + //private int Bonus_ResiduiProg=0; + private StringBuilder ModiPagamento = new StringBuilder(""); + private static Boolean KeyDespatcherAttivo = false; + public Boolean PassaggioTessera = false; + private Boolean PassaggiEsauritiNoComposizione = false; + private static Boolean Visualizza_Messaggi_Display = true; + private static String Message_Display = ""; + public static Boolean FlagExtra = false; + public static Boolean FlagRicevuta = false; + Timer timerDisplay = new Timer(); + private static Integer DelaySwipCard = 100; + private static Boolean BottoneImposta = true; + private static Boolean Asporto = false; + private static Boolean FlagPrecaricaLista = false; + + // ========================================================================== + // *** Metodo per identificare la classe esterna dall'interno dei membri classe + // ========================================================================== + public PuntoCassa getOuter() { + return PuntoCassa.this; + } + + // ========================================================================== + // *** Sottoclasse per la gestione degli eventi a timer + // ========================================================================== + public class TimerDBConn extends java.util.TimerTask { + + // ======================================================================= + // ** Implementazione del riferimento alla classe contenitore + // ======================================================================= + private PuntoCassa pc; + Connection dbConnection; + + TimerDBConn(PuntoCassa pc) { + this.pc = pc; + } + + PuntoCassa getPuntoCassa() { + return pc; + } + + // ======================================================================= + // ** Contiene il processo da eseguire in background + // ======================================================================= + public void run() { + + String sql; + Statement st = null; + ResultSet rs; + + // ==================================================================== + // * Se non c'è connessione al DB prova a connettersi + // ==================================================================== + //if (this.pc.statoConnessione == 0) { + try { + Class.forName(dbDriver); + + dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + //this.pc.statoConnessione = 1; + } catch (Exception ex) { + //this.pc.statoConnessione = 0; + this.pc.utenteLoggato = ""; + this.pc.lblStatoConnessione.setText("Errore di connessione al db"); + } + //} + + // ==================================================================== + // * Se c'è connessione + // ==================================================================== + //if (this.pc.statoConnessione == 1) { + // ----------------------------------------------------------------- + // *** Verifica lo stato di attività della connessione + // ----------------------------------------------------------------- + if (dbTipo.equals("Oracle")) { +// sql = "SELECT to_char(sysdate, 'hh24:mi') AS now FROM dual"; + sql = "Select Valore as now from Parametri where chiave='UltimoAggTabelle'"; + } else { + sql = "SELECT now() AS now FROM dual"; + } + try { + + st = dbConnection.createStatement(); + rs = st.executeQuery(sql); + while (rs.next()) { + String strRiga = rs.getString("now"); + this.pc.lblStatoConnessione.setText(strRiga + " Vers. " + Versione); + + } + + // -------------------------------------------------------------- + // ** Verifica se c'è un utente loggato + // -------------------------------------------------------------- + this.pc.pnlErrore.setVisible(false); + + // -------------------------------------------------------------- + // ** Verifica se c'è un utente loggato + // -------------------------------------------------------------- + if (this.pc.utenteLoggato == "") { + this.pc.pnlLogin.setVisible(true); + } else { + this.pc.pnlLogin.setVisible(false); + } + + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException e) { + this.pc.pnlErrore.setVisible(true); + this.pc.lblMessaggioErrore.setText("Errore di connessione al database!");//Errore query " + sql); + } + + // ================================================================= + // * Altrimenti ... + // ================================================================= + /*} else { + this.pc.lblStatoConnessione.setText("Errore di connessione al database"); + }*/ + } + } + + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + // ========================================================================== + // *** Sottoclasse per i button categoria + // ========================================================================== + + public class ButtonCategoria extends javax.swing.JButton { + } + + // ========================================================================== + // *** Sottoclasse per i button prodotto + // ========================================================================== + public class ButtonProdotto extends javax.swing.JButton { + } + + // ========================================================================== + // *** Constructor della classe PuntoCassa + // ========================================================================== + public PuntoCassa() { + + // ----------------------------------------------------------------------- + // *** Esegue le impostazioni di base + // ----------------------------------------------------------------------- + initComponents(); + + // ----------------------------------------------------------------------- + // *** Legge la configurazione dal file XML + // ----------------------------------------------------------------------- + try { + DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = documentFactory.newDocumentBuilder(); + //Document document = builder.parse(new File("../risorse/puntocassa.xml")); + String startDir = System.getProperty("user.dir"); + Document document = builder.parse(new File(startDir + "/risorse/puntocassa.xml")); + + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + // -------------------------------------------------------------------- + // ** Accesso al database + // -------------------------------------------------------------------- + NodeList database = document.getElementsByTagName("database"); + for (int i = 0; i < database.getLength(); i++) { + Node nodo = database.item(i); + + if (nodo.getNodeType() == Node.ELEMENT_NODE) { + Element db = (Element) nodo; + String attivo = db.getElementsByTagName("attivo").item(0).getFirstChild().getNodeValue(); + String tipo = db.getElementsByTagName("tipo").item(0).getFirstChild().getNodeValue(); + String driver = db.getElementsByTagName("driver").item(0).getFirstChild().getNodeValue(); + String server = db.getElementsByTagName("server").item(0).getFirstChild().getNodeValue(); + String porta = db.getElementsByTagName("porta").item(0).getFirstChild().getNodeValue(); + String istanza = db.getElementsByTagName("istanza").item(0).getFirstChild().getNodeValue(); + String username = db.getElementsByTagName("username").item(0).getFirstChild().getNodeValue(); + String password = db.getElementsByTagName("password").item(0).getFirstChild().getNodeValue(); + + if (attivo.equals("SI")) { + Encoding en = new Encoding(); + dbUsername = username; + dbPassword = en.decodeString(password); + dbTipo = tipo; + dbDriver = driver; + if (tipo.equals("MySQL")) { + dbStringa = "jdbc:mysql://" + server + ":" + porta + "/" + istanza; + } else if (tipo.equals("Oracle")) { + dbStringa = "jdbc:oracle:thin:@" + server + ":" + porta + ":" + istanza; + } + } + } + } + + // -------------------------------------------------------------------- + // ** Path + // -------------------------------------------------------------------- + NodeList paths = document.getElementsByTagName("path"); + for (int i = 0; i < paths.getLength(); i++) { + Node path = paths.item(i); + if (path.getNodeType() == Node.ELEMENT_NODE) { + Element p = (Element) path; + imgPath = p.getElementsByTagName("img_path").item(0).getFirstChild().getNodeValue(); + if (imgPath.equalsIgnoreCase("..\\risorse\\")) { + imgPath = startDir + "/risorse/"; + } +// Path_Aggiornamento= p.getElementsByTagName("Aggiornamento").item(0).getFirstChild().getNodeValue(); +// Path_Aggiornamento=Path_Aggiornamento.replaceAll(Pattern.quote("\\"), Matcher.quoteReplacement("/")); + } + } + + // -------------------------------------------------------------------- + // ** Etichette + // -------------------------------------------------------------------- + NodeList etichette = document.getElementsByTagName("etichette"); + String Titolo = ""; + MyApplication MyA = new MyApplication(); + for (int i = 0; i < paths.getLength(); i++) { + Node etichetta = etichette.item(i); + if (etichetta.getNodeType() == Node.ELEMENT_NODE) { + Element p = (Element) etichetta; + Titolo = p.getElementsByTagName("titolo").item(0).getFirstChild().getNodeValue(); + idPuntoCassa = Long.parseLong(MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'IdPuntoCassa'", "valore")); + + String Credito = MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagIgnoraSaldoStop'", "valore"); + if (Credito.equalsIgnoreCase("SI")) { + ConsentiCredito = true; + } + + Titolo = Titolo + " " + idPuntoCassa; + this.setTitle(Titolo); + //Aggiornamento 14-01-2019 + //String P=MyA.MySelect(this,"select tp.id || '|' || tp.nome as valore from tipi_pagamenti tp, punti_distribuzione pd, punti_cassa pc where pc.id_punto_distribuzione = pd.id and pd.id_tipo_paga_default = tp.id and pc.id =" + idPuntoCassa, "valore"); + String P = MyA.MySelect(this, "select tp.id || '|' || tp.nome || '|' || pd.flag_bonus || '|' || pd.flag_extra as valore from punti_cassa pc inner join punti_distribuzione pd on pc.id_punto_distribuzione = pd.id inner join tipi_pagamenti tp on pd.id_tipo_paga_default = tp.id where pc.id=" + idPuntoCassa, "valore"); + + String[] El = P.split("\\|",-1); + if (El.length >= 2) { + idModoPagamento = Long.parseLong(El[0]); + ModoPagamentoDefault = El[1]; + lblTipoPagamento.setText(El[1]); + //Aggiornamento 14-01-2019 + FLAG_BONUS = Integer.parseInt(El[2]); + FlagExtra=false; + if (El[3].equalsIgnoreCase("1")){ + FlagExtra=true; + } + PulsantiModoPagamento(); + } + } + } + + // -------------------------------------------------------------------- + // ** display + // -------------------------------------------------------------------- + NodeList disp = document.getElementsByTagName("display"); + for (int i = 0; i < disp.getLength(); i++) { + Node display = disp.item(i); + if (display.getNodeType() == Node.ELEMENT_NODE) { + Element p = (Element) display; + displayWidth = Integer.parseInt(p.getElementsByTagName("larghezza").item(0).getFirstChild().getNodeValue()); + displayHeight = Integer.parseInt(p.getElementsByTagName("altezza").item(0).getFirstChild().getNodeValue()); + HFont = Integer.parseInt(p.getElementsByTagName("fontSize").item(0).getFirstChild().getNodeValue()); + AltControlli = Integer.parseInt(p.getElementsByTagName("altezzaControlli").item(0).getFirstChild().getNodeValue()); + LargControlli = Integer.parseInt(p.getElementsByTagName("larghezzaControlli").item(0).getFirstChild().getNodeValue()); + String tastiera = p.getElementsByTagName("TastieraVideo").item(0).getFirstChild().getNodeValue(); +// MyApplication MyA=new MyApplication(); + if (tastiera.equals("NO")) { + + MyA.TastieraVideo = false; + } else { + MyA.TastieraVideo = true; + + } + + } + } + + //jPB.setVisible(false); + //adatto panel login + Font f = new Font("Tahoma", 0, HFont); + UIManager.put( + "OptionPane.messageFont", + new FontUIResource(new Font("Tahoma", Font.BOLD, HFont)) + ); + UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Tahoma", Font.BOLD, 25))); + btnLogin.setFont(f); + pnlLogin.setSize(CalcolaLarghezzaAltezza(pnlLogin.getWidth(), LargControlli), CalcolaLarghezzaAltezza(pnlLogin.getHeight(), AltControlli)); + lblPassword.setFont(f); + lblUsername.setFont(f); + txtUsername.setFont(f); + txtPassword.setFont(f); + jTxtTessera.setFont(f); + jChLogin.setFont(f); + jBtnReadCard.setVisible(false); + // -------------------------------------------------------------------- + // ** ID_PUNTO_CASSA + // -------------------------------------------------------------------- +// if(idPuntoCassa<=0L){ +// idPuntoCassa = Long.parseLong(document.getElementsByTagName("ID_Punto_Cassa").item(0).getFirstChild().getNodeValue()); +// } + jcmbSC.setVisible(false); + + String VMD = document.getElementsByTagName("Visualizza_Messaggi_Display").item(0).getFirstChild().getNodeValue(); + if (VMD.equalsIgnoreCase("SI")) { + Visualizza_Messaggi_Display = true; + } else { + Visualizza_Messaggi_Display = false; + } + Message_Display = document.getElementsByTagName("Messaggio_Display").item(0).getFirstChild().getNodeValue(); + + updateReaderCombo(); + + String UltimiMovimenti = MyA.MySelect(this, "SELECT valore FROM parametri WHERE chiave = 'FlagVisualizzaUltimiPassaggi'", "valore"); + if (UltimiMovimenti.equalsIgnoreCase("NO")) { + jBtnMovimenti.setEnabled(false); + } + + timerCard = new java.util.Timer(); + timerCard.schedule(new CardTask(this), 0, 1 * 1000); + + StatoAttivoNonLoggato(); + +// String flagExtra = MySelect("Select Valore from Parametri where Chiave='FlagExtra'", "Valore"); +// if (flagExtra.equalsIgnoreCase("NO")) { +// FlagExtra = false; +// } else { +// FlagExtra = true; +// } + String flagRicevuta = MySelect("Select Valore from Parametri where Chiave='FlagRicevuta'", "Valore"); + if (flagRicevuta.equalsIgnoreCase("NO")) { + FlagRicevuta = false; + //jbtnStampa.setEnabled(false); + } else { + FlagRicevuta = true; + } + + String flagDataNascita = MySelect("Select Valore from Parametri where Chiave='FlagMostraDataDiNascita'", "Valore"); + if (flagDataNascita.equalsIgnoreCase("NO")) { + FlagMostraDataDiNascita = false; + } else { + FlagMostraDataDiNascita = true; + } + + String flagEsegueStorni = MySelect("Select Valore from Parametri where Chiave='FlagEsegueStorni'", "Valore"); + if (flagEsegueStorni.equalsIgnoreCase("NO")){ + FlagEsegueStorni = false; + } else { + FlagEsegueStorni = true; + } + + String TimeoutSwipCard = MySelect("Select Valore from Parametri where Chiave='TimeoutSwipCard'", "Valore"); + if (MyA.isNumeric(TimeoutSwipCard)) { + DelaySwipCard = Integer.parseInt(TimeoutSwipCard); + } + + MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); + + String asporto = MySelect("Select Valore from Parametri where Chiave='FlagDefaultAsporto'", "Valore"); + if (asporto.equalsIgnoreCase("SI")) { + Asporto = true; + } + + String flagPrecarica = MySelect("Select Valore from Parametri where Chiave='FlagPrecaricaLista'", "Valore"); + if (flagPrecarica.equalsIgnoreCase("NO")) { + FlagPrecaricaLista = false; + } else { + FlagPrecaricaLista = true; + } + +// KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); +// manager.addKeyEventDispatcher(new KeyEventDispatcher() { +// +// +// @Override +// public boolean dispatchKeyEvent(KeyEvent e) { +// +// int id = e.getID(); +// int keyCode = e.getKeyCode(); +// if (id == KeyEvent.KEY_RELEASED) { +// if (keyCode != 144 && keyCode!=16) { +// char tasto=e.getKeyChar(); +// PuntoCassa.this.TestoSwipCard.append(tasto); +// System.out.println(TestoSwipCard.toString()); +// } +// } +// return true; +// } +// +// } +// ); + keyDispatcher = new KeyEventDispatcher() { + Boolean Swip = false; + Boolean SpiaAltreCarte = false; + Boolean TimerUnaVolta = false; + MyApplication MyP = new MyApplication(); + + public boolean dispatchKeyEvent(KeyEvent e) { + int id = e.getID(); + + if (jbtnChiudi.isEnabled() && pnlLogin.isVisible() == false && jTxtTessera.getText().length() > 0) { + e.consume(); + if (MyP.UnaVolta == false) { + MyP.UnaVolta = true; +// JOptionPane.showOptionDialog(PuntoCassa.this, "Chiudere la transazione!", "Attenzione", +// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + } + return false; + } + MyP.UnaVolta = false; + int keyCode = e.getKeyCode(); + if (id == KeyEvent.KEY_RELEASED) { + String tasto = "" + e.getKeyChar(); + System.out.println(keyCode + " - " + tasto); + + LogTestoTessera.append(e.getKeyChar()); + +// if (keyCode != 16){ +// TestoCarteCF.append(tasto); +// } + if (tasto.equalsIgnoreCase("ò")) { //144 + Swip = true; + } + //05-12-2017 + if (keyCode == 16 || keyCode == 45 || tasto.equalsIgnoreCase("ò")) { + SpiaAltreCarte = true; + } + + if (tasto.equalsIgnoreCase("ò") == false && keyCode != 16 && keyCode != 45 && Swip) { //keyCode != 144 && keyCode != 17 + + TestoSwipCard.append(tasto); + System.out.println(TestoSwipCard.toString()); + + } + if (keyCode == 45 && Swip) { //keyCode != 144 + Swip = false; + System.out.println(TestoSwipCard.toString()); + + warn(); + } + + //30-11-2017 modifica per rfid + if (keyCode != 16) { + TestoRFIDCard.append(tasto); + } + if (keyCode == 10 && Swip == false && SpiaAltreCarte == false) { //keyCode != 144 + + System.out.println(TestoRFIDCard.toString()); + TestoSwipCard = TestoRFIDCard; + TestoRFIDCard = new StringBuilder(); + warn(); + } + + //29-10-18------------------------------------------------------ + if (TimerUnaVolta == false) { + TimerUnaVolta = true; + final Timer timer = new Timer(); + final TimerTask task = new TimerTask() { + @Override + public void run() { + + if (TestoRFIDCard.toString().length() > 2) { + System.out.println("Timer: " + TestoRFIDCard.toString()); + TestoSwipCard = TestoRFIDCard; + TestoRFIDCard = new StringBuilder(); + warn(); + } + + timer.cancel(); + timer.purge(); + TimerUnaVolta = false; + } + }; + + timer.schedule(task, 5000); + } + //fine 29-10-18------------------------------------------------------ + +// char tasto = e.getKeyChar(); +// if (keyCode == 144){Swip=true;} +// if (keyCode != 144 && keyCode != 16 && keyCode != 17) { +// +// TestoSwipCard.append(tasto); +// System.out.println(TestoSwipCard.toString()); +// warn(); +// } +// if (Swip == false) { +// AddRemoveKeyDispatcher(false); +// if (keyCode != 16 && keyCode != 17 && keyCode != 8 && keyCode != 127) { +// txtUsername.setText(txtUsername.getText() + tasto); +// } +// } + } + + return true; + } + +// private Boolean VerificaCF(String Testo) { +// Boolean ok = false; +// String El[] = Testo.split("_"); +// if (El[0].substring(0, 1).equalsIgnoreCase("%")) { +// if (El[0].length() == 17) { +// TesseraCartaCF=El[0]; +//// final Timer timer = new Timer(); +//// final TimerTask task = new TimerTask() { +//// @Override +//// public void run() { +// String CF = TesseraCartaCF.substring(1, 17); +// String Q = "select * from(SELECT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue AS ris " +// + "FROM tessere t " +// + "INNER JOIN utenti u on t.id_utente = u.id " +// + "INNER JOIN categorie_utenti c on u.id_categoria = c.id " +// + "INNER JOIN aziende a on c.id_azienda = a.id " +// + "INNER JOIN categorie_utenti_fasce cf on cf.id_categoria_utenti = c.id " +// + "INNER JOIN fasce f on cf.id_fascia = f.id " +// + "WHERE u.codice_fiscale = '" + CF + "' " +// + "AND t.id_stato = 1 " +// + "ORDER BY t.data_scadenza desc, t.data_emissione desc) where ROWNUM=1"; +// String Q2 = "select * from(SELECT t.Numero AS ris " +// + "FROM tessere t " +// + "INNER JOIN utenti u on t.id_utente = u.id " +// + "INNER JOIN categorie_utenti c on u.id_categoria = c.id " +// + "INNER JOIN aziende a on c.id_azienda = a.id " +// + "INNER JOIN categorie_utenti_fasce cf on cf.id_categoria_utenti = c.id " +// + "INNER JOIN fasce f on cf.id_fascia = f.id " +// + "WHERE u.codice_fiscale = '" + CF + "' " +// + "AND t.id_stato = 1 " +// + "ORDER BY t.data_scadenza desc, t.data_emissione desc) where ROWNUM=1"; +// String Tessera = MySelect(Q2, "ris"); +// jTxtTessera.setText(Tessera); +// PassaggioTessera = true; +// ok=true; +// CercaTessera(Q); +// +//// timer.cancel(); +//// timer.purge(); +// StatoCardLettore = false; +// +//// } +//// }; +//// +//// timer.schedule(task, DelaySwipCard); +// +// } +// } +// +// return ok; +// } + public void warn() { + if (StatoCardLettore) { + return; + } +// System.out.println("TestoCarteCF: " + TestoCarteCF.toString()); +// if(TesseraCFLetta){ +// System.out.println("TestoCarteCF letta "); +// +// return; +// } + //29-10-2018 + TestoRFIDCard = new StringBuilder(); + //fine 29-10-2018 + +// Boolean èCF = false; +// TesseraCartaCF=""; +// if (TestoCarteCF.toString().length() > 0) { +// +// èCF=VerificaCF(TestoCarteCF.toString().replaceAll("\n", "")); +// TesseraCFLetta=èCF; +// TestoCarteCF=new StringBuilder(); +// +// } + if (TestoSwipCard.toString().length() > 0) {// && èCF==false) { + StatoCardLettore = true; + + final Timer timer = new Timer(); + + final TimerTask task = new TimerTask() { + @Override + public void run() { + String Tessera = ""; + //per tessere tipo 8 e 9 + if (TestoSwipCard.toString().indexOf("ì") >= 0) { + String[] txt = TestoSwipCard.toString().split("ì"); + + // per tessera MASTERCARD CARDHOLDER + if (TestoSwipCard.toString().length() > 30) { + + Tessera = txt[0].trim().replace("_", ""); + } else { + Tessera = txt[1].trim().replace("_", ""); + } + } else if (TestoSwipCard.toString().indexOf("&") >= 0) { + // per tessera MASTERCARD CARDHOLDER + String[] txt = TestoSwipCard.toString().split("&"); + + Tessera = txt[0].trim().replace("%B", ""); + + } else { + Tessera = TestoSwipCard.toString().trim().replace("_", ""); + } + + //per tessera tipo 3 + if (Tessera.length() >= 17 && Tessera.length() <= 19) { + Tessera = Tessera.substring(0, 7); + } + + //per tessere tipo 6 e 7 + if (Tessera.length() == 21) { + Tessera = Tessera.substring(0, 10); + int PosI = 0; + for (int i = 0; i <= Tessera.length(); i++) { + if (Tessera.substring(i, i + 1).equalsIgnoreCase("0") == false) { + PosI = i; + break; + } + } + + Tessera = Tessera.substring(PosI); + } + + SpiaAltreCarte = false; + Swip = false; + if (pnlLogin.isVisible()) { + ControllaLogInCarta(Tessera); +// Swip = false; + } else { + //05/11/2018 le nuove tessere con CF a volte leggono solo la matricola +// if (TestoCarteCF.toString().equalsIgnoreCase("%E_ò" + Tessera + "_") || (TestoCarteCF.toString().length()>1 && TestoCarteCF.toString().length()<=8 )) { +// System.out.println("intrappolato:" + TestoCarteCF.toString()); +// TesseraCFLetta=false; +// TestoCarteCF=new StringBuilder(); +// Azzera(); +// } else { + jTxtTessera.setText(Tessera); + PassaggioTessera = true; + LogNumeroTessera = Tessera; + CercaTessera(); +// } + } + + TestoSwipCard = new StringBuilder(); + +// String[] txt = TestoSwipCard.toString().split("ò"); +// if (txt.length > 1) { +// String Tessera = txt[1].trim().replace("_", ""); +// if (pnlLogin.isVisible()) { +// ControllaLogInCarta(Tessera); +// Swip=false; +// } else { +// jTxtTessera.setText(Tessera); +// CercaTessera(); +// +// } +// TestoSwipCard = new StringBuilder(); +// StatoCardLettore = false; +// System.out.println(Tessera); +// } + timer.cancel(); + timer.purge(); + StatoCardLettore = false; + + } + }; + + timer.schedule(task, DelaySwipCard); + + } + } + + }; + +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { + KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); + KeyDespatcherAttivo = true; +// } + + VerificaDB(); + + + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); +// KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher( +// new KeyEventDispatcher() { +// +// public boolean dispatchKeyEvent(KeyEvent e) { +// int id = e.getID(); +// int keyCode = e.getKeyCode(); +// if (id == KeyEvent.KEY_RELEASED) { +// if (keyCode != 144 && keyCode != 16 && keyCode != 17) { +// char tasto = e.getKeyChar(); +// TestoSwipCard.append(tasto); +// System.out.println(TestoSwipCard.toString()); +// warn(); +// } +// } +// +// return true; +// } +// +// public void warn() { +// if(StatoCardLettore){return;} +// if (TestoSwipCard.toString().length()>0 ){ +// StatoCardLettore=true; +// +// final Timer timer = new Timer(); +// +// final TimerTask task = new TimerTask() { +// @Override +// public void run() { +// String[] txt=TestoSwipCard.toString().split("ò"); +// if (txt.length>0){ +// String Tessera=txt[1].trim().replace("_", ""); +// jTxtTessera.setText(Tessera); +// CercaTessera(); +// TestoSwipCard=new StringBuilder(); +// StatoCardLettore=false; +// System.out.println(Tessera); +// } +// +// +// timer.cancel(); +// timer.purge(); +// StatoCardLettore=false; +// +// } +// }; +// timer.schedule(task, 1000); +// +// +// } +// } +// }); + } catch (Exception e) { + e.printStackTrace(); + + } + + // ----------------------------------------------------------------------- + // *** Aggiunge un timer con relativa schedulazione a 5 secondi + // ----------------------------------------------------------------------- + TimerDBConn mt = new TimerDBConn(this); + java.util.Timer timer = new java.util.Timer(); + timer.schedule(mt, 0, 5000); + + VerificaAggiornamentiJAR(); + //Display(Message_Display," "," "); + + } + + private void VerificaAggiornamentiJAR() { + try { + String PathURL_Aggiornamento = MySelect("Select Valore from Parametri where chiave='UrlJAR' ", "Valore"); + + if (PathURL_Aggiornamento.length() > 0) { + String startDir = System.getProperty("user.dir"); + URL url = new URL(PathURL_Aggiornamento); + HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); + +// File fileAgg = new File(Path_Aggiornamento); + Date d = new Date(httpCon.getLastModified()); + System.out.println(' ' + d.toString()); + + File fileAttuale = new File(startDir + "/Cassa.jar"); +// File fileAgg = new File(startDir + "/Cassa.jar"); + Date dA = new Date(fileAttuale.lastModified()); + if (d.after(dA)) { + if (JOptionPane.showConfirmDialog(null, "Aggiornamento disponibile. Aggiornare?", "Aggiornamento", + JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + System.out.print("Aggiorna............."); + + Process proc = Runtime.getRuntime().exec("java -jar " + startDir + "/Aggiornamento.jar " + startDir + " " + PathURL_Aggiornamento); + System.exit(0); + + } + + } + + } + } catch (IOException ex) { + //Logger.getLogger(PuntoCassa.class.getName()).log(Level.SEVERE, null, ex); + } + } + + private void updateReaderCombo() { + try { + MyApplication MyA = new MyApplication(); + jcmbSC.setModel(new DefaultComboBoxModel(MyA.SC.listReaders())); + + } catch (Exception ex) { + //JOptionPane.showMessageDialog(this, "Card Reader non collegato!", "Update Reader Combo", JOptionPane.ERROR_MESSAGE); + } + } + + private void ScaricaImmagini() { + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + try { + Statement st; + ResultSet rs; + String sql = "SELECT distinct prodotti.id FROM prodotti inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE prodotti.nome IS NOT NULL and CATALOGO_PUNTI_CASSA.id_Punto_Cassa=" + idPuntoCassa; + //Integer nr=MySelectInteger("SELECT distinct count(*) as tot FROM prodotti inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_PUNTO_CASSA WHERE prodotti.nome IS NOT NULL and CATALOGO_PUNTI_CASSA.idPunto_Cassa=" + idPuntoCassa, "tot"); + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(); + rs = st.executeQuery(sql); + //InputStream gifdata = null; + //Integer row=1; + while (rs.next()) { + getImage(rs.getString("id")); + + /*String FullName = imgPath + rs.getString("id") + ".jpg"; + + gifdata = rs.getBinaryStream(1); + + File giffile = new File(FullName); + + FileOutputStream file = new FileOutputStream(giffile); + int chunk = 0; + + while ((chunk = gifdata.read()) != -1) { + + file.write(chunk); + + } + file.flush(); + file.close(); + + /*Integer val=(100/nr)*row; + jPB.setValue(val);*/ + // row++; + } + + st.close(); + rs.close(); + dbConnection.close(); + } catch (Exception e) { + JOptionPane.showMessageDialog(this, "Errore Scarico Immagini " + e.getMessage(), "ScaricaImmagini", JOptionPane.ERROR_MESSAGE); + } + + this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + + private Integer CalcolaLarghezzaAltezza(Integer LarControllo, Integer Percentuale) { + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnlErrore = new javax.swing.JPanel(); + lblMessaggioErrore = new javax.swing.JLabel(); + pnlTop = new javax.swing.JPanel(); + pnlCliente = new javax.swing.JPanel(); + jPanel1 = new javax.swing.JPanel(); + lblCodice1 = new javax.swing.JLabel(); + lblSaldo = new javax.swing.JLabel(); + lblCodice2 = new javax.swing.JLabel(); + lblPunti = new javax.swing.JLabel(); + jTxtTessera = new javax.swing.JTextField(); + btnImpostaCliente = new javax.swing.JButton(); + jBtnReadCard = new javax.swing.JButton(); + jcmbSC = new javax.swing.JComboBox(); + lblCodice3 = new javax.swing.JLabel(); + lblTipoPagamento = new javax.swing.JLabel(); + lblCodice4 = new javax.swing.JLabel(); + lblResiduo = new javax.swing.JLabel(); + lblCodice5 = new javax.swing.JLabel(); + lblGratuità = new javax.swing.JLabel(); + jPanel2 = new javax.swing.JPanel(); + lblCodice = new javax.swing.JLabel(); + lblCategoria = new javax.swing.JLabel(); + lblDenominazione = new javax.swing.JLabel(); + lblCognome = new javax.swing.JLabel(); + lblOrganizzazione = new javax.swing.JLabel(); + lblNome = new javax.swing.JLabel(); + lblOrganizzazione1 = new javax.swing.JLabel(); + lblNascita = new javax.swing.JLabel(); + lblOrganizzazione2 = new javax.swing.JLabel(); + lblScadTessera = new javax.swing.JLabel(); + lblOrganizzazione3 = new javax.swing.JLabel(); + lblAzienda = new javax.swing.JLabel(); + lblOrganizzazione4 = new javax.swing.JLabel(); + lblConvenzione = new javax.swing.JLabel(); + lblOrganizzazione5 = new javax.swing.JLabel(); + lblFascia = new javax.swing.JLabel(); + pnlCategorie = new javax.swing.JPanel(); + pnlConto = new javax.swing.JPanel(); + jbtnDuplica = new javax.swing.JButton(); + jbtnElimina = new javax.swing.JButton(); + jbtnAnnulla = new javax.swing.JButton(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + txtTotaleCassa = new javax.swing.JTextField(); + jbtnChiudi = new javax.swing.JButton(); + jbtnStampa = new javax.swing.JButton(); + txtTotalePunti = new javax.swing.JTextField(); + pnlAzioni = new javax.swing.JPanel(); + jBtnStorno = new javax.swing.JButton(); + jBtnAsporto = new javax.swing.JToggleButton(); + jBtnprodotti = new javax.swing.JButton(); + jBtnMovimenti = new javax.swing.JButton(); + jBtnBuoni = new javax.swing.JButton(); + jTBP0 = new javax.swing.JToggleButton(); + jTBP1 = new javax.swing.JToggleButton(); + jTBP2 = new javax.swing.JToggleButton(); + jTBP3 = new javax.swing.JToggleButton(); + jbtnEsci = new javax.swing.JButton(); + pnlLista = new javax.swing.JPanel(); + scpLista = new javax.swing.JScrollPane(); + tblLista = new javax.swing.JTable(); + pnlProdotti = new javax.swing.JPanel(); + pnlLista1 = new javax.swing.JPanel(); + scpLista1 = new javax.swing.JScrollPane(); + tblLista1 = new javax.swing.JTable(); + pnlLogin = new javax.swing.JPanel(); + btnLogin = new javax.swing.JButton(); + txtUsername = new javax.swing.JTextField(); + lblUsername = new javax.swing.JLabel(); + lblPassword = new javax.swing.JLabel(); + txtPassword = new javax.swing.JPasswordField(); + btnTermina = new javax.swing.JButton(); + jChLogin = new javax.swing.JCheckBox(); + jBtnDB1 = new javax.swing.JButton(); + lblUtenteLoggato = new javax.swing.JLabel(); + lblStatoConnessione = new javax.swing.JLabel(); + lblInfo = new javax.swing.JLabel(); + lblInfo2 = new javax.swing.JLabel(); + lblDB = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); + setTitle("Prova di titolo"); + setName("frmPrincipale"); // NOI18N + setResizable(false); + addComponentListener(new java.awt.event.ComponentAdapter() { + public void componentResized(java.awt.event.ComponentEvent evt) { + resizeRules(evt); + } + }); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent evt) { + exitForm(evt); + } + public void windowDeiconified(java.awt.event.WindowEvent evt) { + formWindowDeiconified(evt); + } + }); + getContentPane().setLayout(null); + + pnlErrore.setBackground(new java.awt.Color(255, 255, 153)); + pnlErrore.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); + pnlErrore.setLayout(null); + + lblMessaggioErrore.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + lblMessaggioErrore.setText("lblMessaggioErrore"); + lblMessaggioErrore.setToolTipText(""); + lblMessaggioErrore.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + lblMessaggioErrore.setName("lblMessaggioErrore"); // NOI18N + pnlErrore.add(lblMessaggioErrore); + lblMessaggioErrore.setBounds(96, 24, 600, 240); + + getContentPane().add(pnlErrore); + pnlErrore.setBounds(0, 0, 0, 0); + + pnlTop.setName("pnlTop"); // NOI18N + pnlTop.setLayout(null); + + pnlCliente.setToolTipText(""); + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Tessera")); + + lblCodice1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblCodice1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice1.setText("Saldo:"); + + lblSaldo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblSaldo.setText("[...]"); + + lblCodice2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblCodice2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice2.setText("Punti:"); + + lblPunti.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblPunti.setText("[...]"); + + jTxtTessera.setToolTipText(""); + jTxtTessera.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jTxtTesseraFocusGained(evt); + } + }); + + btnImpostaCliente.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + btnImpostaCliente.setText("Imposta"); + btnImpostaCliente.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnImpostaClienteActionPerformed(evt); + } + }); + + jBtnReadCard.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jBtnReadCard.setText("Leggi Tessera"); + jBtnReadCard.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnReadCardActionPerformed(evt); + } + }); + + jcmbSC.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + lblCodice3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblCodice3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice3.setText("Tipo Pagamento:"); + + lblTipoPagamento.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblTipoPagamento.setText("[...]"); + + lblCodice4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblCodice4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice4.setText("Residuo:"); + + lblResiduo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblResiduo.setText("[...]"); + + lblCodice5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblCodice5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice5.setText("Gratuità Residue:"); + + lblGratuità.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblGratuità.setText("[...]"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lblCodice2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCodice1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)) + .addGap(8, 8, 8) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblPunti, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblSaldo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lblCodice3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCodice4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCodice5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lblResiduo, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE) + .addComponent(lblTipoPagamento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblGratuità, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))) + .addComponent(btnImpostaCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE) + .addComponent(jTxtTessera))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(48, 48, 48) + .addComponent(jBtnReadCard, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jcmbSC, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jcmbSC, javax.swing.GroupLayout.PREFERRED_SIZE, 3, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jBtnReadCard, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jTxtTessera, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnImpostaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblSaldo) + .addComponent(lblCodice1, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblPunti) + .addComponent(lblCodice2)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblTipoPagamento) + .addComponent(lblCodice3)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblResiduo) + .addComponent(lblCodice4, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCodice5) + .addComponent(lblGratuità))) + ); + + lblCodice5.getAccessibleContext().setAccessibleName("Gtratuità Residue:"); + + jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Cliente")); + + lblCodice.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblCodice.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblCodice.setText("Categoria:"); + + lblCategoria.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblCategoria.setText("[...]"); + + lblDenominazione.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblDenominazione.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblDenominazione.setText("Cognome:"); + + lblCognome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblCognome.setText("[...]"); + + lblOrganizzazione.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblOrganizzazione.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione.setText("Nome:"); + + lblNome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblNome.setText("[...]"); + + lblOrganizzazione1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblOrganizzazione1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione1.setText("Data Nascita:"); + + lblNascita.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblNascita.setText("[...]"); + + lblOrganizzazione2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblOrganizzazione2.setForeground(new java.awt.Color(255, 0, 0)); + lblOrganizzazione2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione2.setText("Bonus Residui:"); + + lblScadTessera.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblScadTessera.setForeground(new java.awt.Color(255, 0, 0)); + lblScadTessera.setText("[...]"); + + lblOrganizzazione3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblOrganizzazione3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione3.setText("Azienda:"); + + lblAzienda.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblAzienda.setText("[...]"); + + lblOrganizzazione4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblOrganizzazione4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione4.setText("Convenzione:"); + + lblConvenzione.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N + lblConvenzione.setText("[...]"); + + lblOrganizzazione5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblOrganizzazione5.setForeground(new java.awt.Color(255, 0, 0)); + lblOrganizzazione5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblOrganizzazione5.setText("Fascia:"); + + lblFascia.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lblFascia.setForeground(new java.awt.Color(255, 0, 0)); + lblFascia.setText("[...]"); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(lblOrganizzazione5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCodice, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblDenominazione, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblOrganizzazione1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lblConvenzione, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE) + .addComponent(lblAzienda, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblScadTessera, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblNascita, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblNome, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCognome, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblCategoria, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblFascia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, 0)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCodice) + .addComponent(lblCategoria)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblDenominazione) + .addComponent(lblCognome)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblNome) + .addComponent(lblOrganizzazione)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblOrganizzazione1) + .addComponent(lblNascita)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblOrganizzazione3) + .addComponent(lblAzienda)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblOrganizzazione4) + .addComponent(lblConvenzione)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblOrganizzazione5) + .addComponent(lblFascia)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblOrganizzazione2) + .addComponent(lblScadTessera)) + .addGap(6, 6, 6)) + ); + + javax.swing.GroupLayout pnlClienteLayout = new javax.swing.GroupLayout(pnlCliente); + pnlCliente.setLayout(pnlClienteLayout); + pnlClienteLayout.setHorizontalGroup( + pnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnlClienteLayout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + pnlClienteLayout.setVerticalGroup( + pnlClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pnlTop.add(pnlCliente); + pnlCliente.setBounds(0, 0, 660, 140); + pnlCliente.getAccessibleContext().setAccessibleDescription("Cliente"); + pnlCliente.getAccessibleContext().setAccessibleParent(pnlCliente); + + pnlCategorie.setBackground(new java.awt.Color(255, 204, 204)); + pnlCategorie.setBorder(javax.swing.BorderFactory.createTitledBorder("Categoria")); + pnlCategorie.setLayout(new java.awt.GridLayout(10, 1, 1, 1)); + pnlTop.add(pnlCategorie); + pnlCategorie.setBounds(0, 0, 11, 32); + + pnlConto.setBackground(new java.awt.Color(255, 255, 153)); + pnlConto.setBorder(javax.swing.BorderFactory.createTitledBorder("Conto")); + pnlConto.setLayout(new java.awt.GridLayout(3, 0, 2, 2)); + + jbtnDuplica.setBackground(new java.awt.Color(140, 240, 240)); + jbtnDuplica.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + jbtnDuplica.setEnabled(false); + jbtnDuplica.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnDuplicaActionPerformed(evt); + } + }); + pnlConto.add(jbtnDuplica); + + jbtnElimina.setBackground(new java.awt.Color(140, 240, 240)); + jbtnElimina.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + jbtnElimina.setToolTipText(""); + jbtnElimina.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnEliminaActionPerformed(evt); + } + }); + pnlConto.add(jbtnElimina); + + jbtnAnnulla.setBackground(new java.awt.Color(140, 240, 240)); + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + pnlConto.add(jbtnAnnulla); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + pnlConto.add(jbtnSu); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + pnlConto.add(jbtnGiu); + + txtTotaleCassa.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N + txtTotaleCassa.setForeground(new java.awt.Color(242, 0, 0)); + txtTotaleCassa.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTotaleCassa.setText("? 0,00"); + txtTotaleCassa.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTotaleCassaActionPerformed(evt); + } + }); + pnlConto.add(txtTotaleCassa); + + jbtnChiudi.setBackground(new java.awt.Color(51, 255, 51)); + jbtnChiudi.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jbtnChiudi.setText("Chiudi"); + jbtnChiudi.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnChiudiActionPerformed(evt); + } + }); + pnlConto.add(jbtnChiudi); + + jbtnStampa.setBackground(new java.awt.Color(255, 255, 255)); + jbtnStampa.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnStampaActionPerformed(evt); + } + }); + pnlConto.add(jbtnStampa); + + txtTotalePunti.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + txtTotalePunti.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTotalePunti.setText("Punti 0"); + txtTotalePunti.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTotalePuntiActionPerformed(evt); + } + }); + pnlConto.add(txtTotalePunti); + + pnlTop.add(pnlConto); + pnlConto.setBounds(286, 150, 265, 120); + + pnlAzioni.setBackground(new java.awt.Color(255, 204, 204)); + pnlAzioni.setBorder(javax.swing.BorderFactory.createTitledBorder("Azioni")); + pnlAzioni.setLayout(new java.awt.GridLayout(2, 6, 2, 2)); + + jBtnStorno.setToolTipText("Storno"); + jBtnStorno.setMargin(new java.awt.Insets(2, 2, 2, 2)); + jBtnStorno.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + jBtnStorno.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnStornoActionPerformed(evt); + } + }); + pnlAzioni.add(jBtnStorno); + + jBtnAsporto.setToolTipText("Modalità"); + jBtnAsporto.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnAsportoActionPerformed(evt); + } + }); + pnlAzioni.add(jBtnAsporto); + + jBtnprodotti.setToolTipText("Prodotti"); + jBtnprodotti.setMargin(new java.awt.Insets(2, 2, 2, 2)); + jBtnprodotti.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnprodottiActionPerformed(evt); + } + }); + pnlAzioni.add(jBtnprodotti); + + jBtnMovimenti.setToolTipText("Ultimi movimenti"); + jBtnMovimenti.setMargin(new java.awt.Insets(2, 2, 2, 2)); + jBtnMovimenti.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnMovimentiActionPerformed(evt); + } + }); + pnlAzioni.add(jBtnMovimenti); + + jBtnBuoni.setToolTipText(""); + jBtnBuoni.setMargin(new java.awt.Insets(2, 2, 2, 2)); + jBtnBuoni.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnBuoniActionPerformed(evt); + } + }); + pnlAzioni.add(jBtnBuoni); + + jTBP0.setToolTipText("A Scalare"); + jTBP0.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTBP0ActionPerformed(evt); + } + }); + pnlAzioni.add(jTBP0); + + jTBP1.setToolTipText("Contanti"); + jTBP1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTBP1ActionPerformed(evt); + } + }); + pnlAzioni.add(jTBP1); + + jTBP2.setToolTipText("Ticket"); + jTBP2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTBP2ActionPerformed(evt); + } + }); + pnlAzioni.add(jTBP2); + + jTBP3.setToolTipText("Differito"); + jTBP3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTBP3ActionPerformed(evt); + } + }); + pnlAzioni.add(jTBP3); + + jbtnEsci.setBackground(new java.awt.Color(255, 255, 0)); + jbtnEsci.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jbtnEsci.setText("Esci"); + jbtnEsci.setToolTipText("Esci"); + jbtnEsci.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnEsciActionPerformed(evt); + } + }); + pnlAzioni.add(jbtnEsci); + + pnlTop.add(pnlAzioni); + pnlAzioni.setBounds(0, 153, 315, 75); + + pnlLista.setBackground(new java.awt.Color(204, 255, 204)); + pnlLista.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista")); + pnlLista.setLayout(new javax.swing.BoxLayout(pnlLista, javax.swing.BoxLayout.LINE_AXIS)); + + scpLista.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + + tblLista.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + tblLista.setName("jtbl"); // NOI18N + scpLista.setViewportView(tblLista); + + pnlLista.add(scpLista); + + pnlTop.add(pnlLista); + pnlLista.setBounds(288, 0, 140, 144); + + pnlProdotti.setBackground(new java.awt.Color(204, 255, 204)); + pnlProdotti.setBorder(javax.swing.BorderFactory.createTitledBorder("Prodotto")); + pnlProdotti.setLayout(new java.awt.GridLayout(6, 2, 2, 2)); + pnlTop.add(pnlProdotti); + pnlProdotti.setBounds(0, 0, 10, 33); + + pnlLista1.setBackground(new java.awt.Color(204, 255, 204)); + pnlLista1.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista")); + pnlLista1.setLayout(new javax.swing.BoxLayout(pnlLista1, javax.swing.BoxLayout.LINE_AXIS)); + + scpLista1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + + tblLista1.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + tblLista1.setName("jtbl"); // NOI18N + scpLista1.setViewportView(tblLista1); + + pnlLista1.add(scpLista1); + + pnlTop.add(pnlLista1); + pnlLista1.setBounds(288, 0, 140, 144); + pnlLista1.getAccessibleContext().setAccessibleName("Lista1"); + + getContentPane().add(pnlTop); + pnlTop.setBounds(0, 188, 0, 0); + pnlTop.getAccessibleContext().setAccessibleName("pnlTop"); + pnlTop.getAccessibleContext().setAccessibleDescription(""); + + pnlLogin.setBackground(new java.awt.Color(255, 255, 153)); + pnlLogin.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Accesso al sistema", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N + pnlLogin.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + + btnLogin.setText("Login"); + btnLogin.setEnabled(false); + btnLogin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnLogin.setName("btnLogin"); // NOI18N + btnLogin.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + btnLogin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnLoginActionPerformed(evt); + } + }); + + txtUsername.setEnabled(false); + txtUsername.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtUsernameFocusGained(evt); + } + }); + txtUsername.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + txtUsernameMouseClicked(evt); + } + }); + + lblUsername.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblUsername.setText("Username"); + lblUsername.setToolTipText(""); + + lblPassword.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + lblPassword.setText("Password"); + + txtPassword.setEnabled(false); + txtPassword.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtPasswordFocusGained(evt); + } + }); + txtPassword.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + txtPasswordMouseClicked(evt); + } + }); + + btnTermina.setIcon(new javax.swing.ImageIcon(getClass().getResource("/puntocassa/esci2.jpg"))); // NOI18N + btnTermina.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + btnTermina.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); + btnTermina.setLabel(" Termina Programma"); + btnTermina.setName("btnTermina"); // NOI18N + btnTermina.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnTerminaActionPerformed(evt); + } + }); + + jChLogin.setBackground(new java.awt.Color(255, 255, 153)); + jChLogin.setSelected(true); + jChLogin.setText("Login con tessera"); + jChLogin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jChLoginActionPerformed(evt); + } + }); + + jBtnDB1.setToolTipText("DB"); + jBtnDB1.setMargin(new java.awt.Insets(2, 2, 2, 2)); + jBtnDB1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnDB1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnlLoginLayout = new javax.swing.GroupLayout(pnlLogin); + pnlLogin.setLayout(pnlLoginLayout); + pnlLoginLayout.setHorizontalGroup( + pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnlLoginLayout.createSequentialGroup() + .addContainerGap() + .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(lblPassword, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblUsername, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtPassword) + .addComponent(txtUsername) + .addComponent(btnLogin, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(pnlLoginLayout.createSequentialGroup() + .addComponent(jChLogin) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(jBtnDB1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnTermina, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)) + .addContainerGap()) + ); + pnlLoginLayout.setVerticalGroup( + pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnlLoginLayout.createSequentialGroup() + .addComponent(jChLogin) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblUsername)) + .addGap(10, 10, 10) + .addGroup(pnlLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblPassword)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnDB1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnTermina, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + getContentPane().add(pnlLogin); + pnlLogin.setBounds(0, 70, 360, 220); + pnlLogin.getAccessibleContext().setAccessibleName("pnlLogin"); + pnlLogin.getAccessibleContext().setAccessibleDescription(""); + + lblUtenteLoggato.setText("[Nessun utente connesso]"); + lblUtenteLoggato.setVerticalAlignment(javax.swing.SwingConstants.TOP); + lblUtenteLoggato.setAlignmentY(0.0F); + lblUtenteLoggato.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + lblUtenteLoggato.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + getContentPane().add(lblUtenteLoggato); + lblUtenteLoggato.setBounds(20, 310, 130, 20); + + lblStatoConnessione.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + lblStatoConnessione.setText("[Nessuna connessione]"); + lblStatoConnessione.setVerticalAlignment(javax.swing.SwingConstants.TOP); + lblStatoConnessione.setAlignmentY(0.0F); + lblStatoConnessione.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + lblStatoConnessione.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + getContentPane().add(lblStatoConnessione); + lblStatoConnessione.setBounds(425, 340, 120, 20); + + lblInfo.setText("[Info Turno]"); + lblInfo.setVerticalAlignment(javax.swing.SwingConstants.TOP); + lblInfo.setAlignmentY(0.0F); + lblInfo.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + lblInfo.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + getContentPane().add(lblInfo); + lblInfo.setBounds(180, 340, 130, 20); + + lblInfo2.setText("[Info Incassi]"); + lblInfo2.setVerticalAlignment(javax.swing.SwingConstants.TOP); + lblInfo2.setAlignmentY(0.0F); + lblInfo2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + lblInfo2.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + getContentPane().add(lblInfo2); + lblInfo2.setBounds(160, 310, 130, 20); + + lblDB.setBackground(new java.awt.Color(51, 255, 0)); + lblDB.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + lblDB.setText("DB"); + lblDB.setOpaque(true); + getContentPane().add(lblDB); + lblDB.setBounds(604, 360, 20, 20); + + getAccessibleContext().setAccessibleName("frmPrincipale"); + getAccessibleContext().setAccessibleDescription(""); + getAccessibleContext().setAccessibleParent(this); + + setBounds(0, 0, 857, 531); + }// </editor-fold>//GEN-END:initComponents + + // ========================================================================== + // ** Imposta dimensioni e posizione dei panel + // ========================================================================== + private void resize() { + int x, y, w, h, tw, th, ptw, pth; + + // ----------------------------------------------------------------------- + // *** Dimensioni del frame + // ----------------------------------------------------------------------- + this.setSize(displayWidth, displayHeight); + tw = this.getWidth(); + th = this.getHeight(); + + // ----------------------------------------------------------------------- + // *** Posizione della status bar + // ----------------------------------------------------------------------- + x = 0; + y = th - 50; + w = (tw / 8); + h = 50; + lblUtenteLoggato.setLocation(x, y); + lblUtenteLoggato.setSize(w, h); + lblInfo.setLocation(w, y); + lblInfo.setSize(w * 2 + 60 -lblDB.getWidth(), h); + + lblInfo2.setLocation(w * 3 + 60-lblDB.getWidth(), y); +// lblInfo2.setSize(tw - (w * 2 + 10) - 131, h); + int larg=tw - (w * 2 + 10) - 359; + lblInfo2.setSize(larg, h); + + lblStatoConnessione.setLocation(tw - 181-lblDB.getWidth(), y); + lblStatoConnessione.setSize(175, h); + + lblDB.setLocation(tw - 181-lblDB.getWidth()+lblStatoConnessione.getWidth(), y); + +// txtUtenteLoggato.setLocation(0, 0); +// txtStatoConnessione.setLocation(w - txtStatoConnessione.getWidth(), 0); + // ----------------------------------------------------------------------- + // *** Posizione del panel Errore + // ----------------------------------------------------------------------- + x = 0; + y = 0; + w = tw; + h = th - lblUtenteLoggato.getHeight(); + pnlErrore.setLocation(x, y); + pnlErrore.setSize(w, h); + + // ----------------------------------------------------------------------- + // *** Posizione del panel Login + // ----------------------------------------------------------------------- + x = 0; + y = 0; + w = pnlLogin.getWidth(); + h = pnlLogin.getHeight(); + pnlLogin.setLocation((int) (tw - w) / 2, (int) (th - h) / 2); + pnlLogin.setSize(w, h); + + // ----------------------------------------------------------------------- + // *** Posizione del panel Top (operativo) + // ----------------------------------------------------------------------- + x = 0; + y = 0; + w = tw + 5; + h = th - lblUtenteLoggato.getHeight(); + pnlTop.setLocation(x, y); + pnlTop.setSize(w, h); + + // ----------------------------------------------------------------------- + // *** Posizionamento degli oggetti nel panel Top (operativo) + // ----------------------------------------------------------------------- + tw = pnlTop.getWidth(); + th = pnlTop.getHeight(); + + // ----------------------------------------------------------------------- + // ** Panel Categorie + // ----------------------------------------------------------------------- + x = 0; + y = 0; + w = (int) (13 * tw / 100); + h = (int) (68 * th / 100); + pnlCategorie.setLocation(x, y); + pnlCategorie.setSize(w, h); + + // ----------------------------------------------------------------------- + // ** Panel Prodotti + // ----------------------------------------------------------------------- + x = w; + y = 0; + w = (int) (57 * tw / 100); + h = (int) (68 * th / 100); + pnlProdotti.setLocation(x, y); + pnlProdotti.setSize(w, h); + + // ----------------------------------------------------------------------- + // ** Panel Lista + // ----------------------------------------------------------------------- + x = x + w; + y = 0; + w = tw - x - 10; + h = (int) (25 * th / 100); + pnlLista.setLocation(x, y); + pnlLista.setSize(w, h); + scpLista.setLocation(0, 0); + scpLista.setSize(w, h); + scpLista.setBackground(Color.BLUE); + tblLista.setLocation(0, 0); + tblLista.setSize(w, h); + tblLista.setShowGrid(true); + + int Col1 = (w / 100) * 80; + MyTableModel model = new MyTableModel(); + String[] Col = {"Prodotto", "Prezzo", "Punti"}; + model.setColumname(Col); + Object[][] data = null; + model.setRow(data); + + tblLista.setModel(model); + tblLista.getColumnModel().getColumn(0).setPreferredWidth(Col1); + tblLista.getColumnModel().getColumn(1).setPreferredWidth(50); + tblLista.getColumnModel().getColumn(1).setCellRenderer(new DecimalFormatRenderer()); + + tblLista.getColumnModel().getColumn(2).setPreferredWidth(50); +// tblLista.getColumnModel().getColumn(3).setPreferredWidth(0); +// tblLista.getColumnModel().getColumn(3).setMaxWidth(0); +// tblLista.getColumnModel().getColumn(3).setMinWidth(0); +// tblLista.getColumnModel().getColumn(3).setResizable(false); + tblLista.setVisible(true); + + // ----------------------------------------------------------------------- + // ** Panel Lista1 + // ----------------------------------------------------------------------- +// x = x + w; + y = h; +// w = tw - x - 10; +// h = (int) (50 * th / 100)/2; + pnlLista1.setBorder(javax.swing.BorderFactory.createTitledBorder("Composizione")); + pnlLista1.setLocation(x, y); + pnlLista1.setSize(w, 70); + scpLista1.setLocation(0, 0); + scpLista1.setSize(w, h); + scpLista1.setBackground(Color.BLUE); + tblLista1.setLocation(0, 0); + tblLista1.setSize(w, h); + tblLista1.setShowGrid(true); + + MyTableModel model1 = new MyTableModel(); + String[] ColVassoio = {"Vassoio", "Prezzo"}; + model1.setColumname(ColVassoio); + Object[][] data1 = null; + model1.setRow(data1); + + tblLista1.setModel(model1); + tblLista1.getColumnModel().getColumn(0).setPreferredWidth(Col1); + tblLista1.getColumnModel().getColumn(1).setPreferredWidth(50); + + tblLista1.setVisible(true); + + // ----------------------------------------------------------------------- + // ** Panel Cliente + // ----------------------------------------------------------------------- + x = 0; + y = pnlCategorie.getHeight(); + w = pnlCategorie.getWidth() + pnlProdotti.getWidth() - 120; + //h = pnlConto.getHeight(); + h = th - pnlProdotti.getHeight(); + pnlCliente.setLocation(x, y); + pnlCliente.setSize(w, h); + + // ----------------------------------------------------------------------- + // ** Panel Conto + // ----------------------------------------------------------------------- + x = pnlLista.getX();//pnlAzioni.getWidth(); + y = pnlLista.getHeight() + pnlLista1.getHeight(); + w = pnlLista.getWidth(); + + h = 220;//th-y; + pnlConto.setLocation(x, y); + pnlConto.setSize(w, h - 10); + ImageIcon icon = new ImageIcon(imgPath + "freccia_down.jpg"); + Image img = icon.getImage(); + Image newimg = img.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath + "freccia_up.jpg"); + Image img2 = icon2.getImage(); + Image newimg2 = img2.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + + ImageIcon icon3 = new ImageIcon(imgPath + "ticket2.png"); + Image img3 = icon3.getImage(); + Image newimg3 = img3.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); + icon3 = new ImageIcon(newimg3); + jBtnBuoni.setIcon(icon3); + + ImageIcon iconFulmine = new ImageIcon(imgPath + "fulmine.jpg"); + Image imgF = iconFulmine.getImage(); + Image newimgF = imgF.getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH); + iconFulmine = new ImageIcon(newimgF); + jbtnStampa.setIcon(iconFulmine); + + // ----------------------------------------------------------------------- + // ** Panel Azioni + // ----------------------------------------------------------------------- + //x = 0; + x = pnlLista.getX() - 120; + y = pnlConto.getY() + pnlConto.getHeight();//pnlProdotti.getHeight() + pnlCliente.getHeight(); + w = pnlLista.getWidth() + 120; //pnlCategorie.getWidth() + pnlProdotti.getWidth(); + h = th - (pnlLista.getHeight() + pnlLista1.getHeight() + pnlConto.getHeight()); //th-y; + pnlAzioni.setLocation(x, y); + pnlAzioni.setSize(w, h); + + // ----------------------------------------------------------------------- + // *** Refresh dell'interfaccia + // ----------------------------------------------------------------------- + this.revalidate(); + this.repaint(); + + } + + // ========================================================================== + // *** Metodo per gestire gli eventi sui button dinamici + // ========================================================================== + public void actionPerformed(ActionEvent e) { + String cmd = e.getActionCommand(); + String tipo; + String id; + String sql = ""; + Statement st; + ResultSet rs; + int i, j, k; +// JButton b; + + i = cmd.indexOf("["); + j = cmd.indexOf("]"); + id = cmd.substring(i + 1, j); + tipo = cmd.substring(0, i); + + switch (tipo) { + case "CATEGORIA": + PulsantiCategoria(id, cmd); +// for (k = this.pnlProdotti.getComponentCount(); k > 0; k--) { +// this.pnlProdotti.remove(k - 1); +// } +// this.caricaDati("PRODOTTI", id); +// //spengo altri togglebutton +// for (Integer y =0;y<this.pnlCategorie.getComponentCount();y++) { +// JToggleButton bt=(JToggleButton)this.pnlCategorie.getComponent(y); +// if (bt.getActionCommand()!=cmd){ +// bt.setSelected(false); +// }else{ +// if(bt.isSelected()==false){ +// this.caricaDati("PRODOTTI", "-1"); +// } +// +// } +// +// } + + break; + + case "PRODOTTO": + if (CassaAperta) { + sql = "SELECT prodotti.id as idProdotto,prodotti.nome, prodotti.prezzo_base,tariffe.Punti as Punti_Base,tariffe.prezzo as Prezzo,tariffe.punti as Punti,prodotti.id_Categoria FROM prodotti left join tariffe on prodotti.id=tariffe.id_prodotto where prodotti.id = " + id + " and Tariffe.id_fascia=" + idProfiloTariffario; + try { + + //spengo altri togglebutton + for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { + JToggleButton bt = (JToggleButton) this.pnlProdotti.getComponent(y); + if (bt.getActionCommand() != cmd) { + bt.setSelected(false); + } + + } + + jbtnSu.setEnabled(true); + jbtnGiu.setEnabled(true); + jbtnElimina.setEnabled(true); + jbtnAnnulla.setEnabled(true); +// if (FlagRicevuta) { +// jbtnStampa.setEnabled(true); +// } +// jbtnDuplica.setEnabled(true); + + doLayout(); + + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(); + rs = st.executeQuery(sql); + MyTableModel model = (MyTableModel) tblLista.getModel(); + + //cerco numero composizioni + /*Integer Composizioni=0; + for (Integer y=0;y<model.getRowCount();y++){ + Object[]rows=model.getRow(y); + if (Long.parseLong(rows[5].toString())==0L){ + Composizioni++; + } + } + if (tblLista1.getRowCount()>0){ + Composizioni++; + }*/ +// Double SaldoTessera=0.0;Double TotAcquisto=0.0; +// SaldoTessera=Double.parseDouble(lblSaldo.getText().replace("? ", "").replace(",", ".")); +// TotAcquisto=Double.parseDouble(txtTotaleCassa.getText().replace("? ", "").replace(",", ".")); + while (rs.next()) { + //System.out.println("Punti " + rs.getInt("Punti")); + Double Prezzo = 0.0; + Integer Punti = 0; + + if (rs.getDouble("Prezzo") > 0) { + Prezzo = rs.getDouble("Prezzo"); + } else { + Prezzo = rs.getDouble("prezzo_base"); + } + + if (rs.getDouble("Punti") > 0) { + Punti = rs.getInt("Punti"); + } else { + Punti = rs.getInt("Punti_Base"); + } + //14-01-2019 + if (model.getRowCount() > 0) { + //è una coposizione non la metto + if (rs.getLong("id_Categoria") == 0L) { + JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + return; + } + + } + /* + if(Composizioni>0 && rs.getLong("id_Categoria")==0L){ + JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + return; + }*/ + + //if ((SaldoTessera < (TotAcquisto + Prezzo)) && idModoPagamento==0L) { + //if (SaldoAcquisti(Prezzo)==false && idModoPagamento==0L) { + //14-01-19<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + if (Gratuita_Residue > 0 || (FLAG_BONUS == 1 && Bonus_Residui > 0)) { + //Prezzo=0.0; + } + //21-12-8<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + + /* + //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + if (jbtnChiudi.isEnabled()) { + if (SaldoAcquisti(Prezzo) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && Gratuita_Residue <= 0 && ConsentiCredito == false) { + JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + return; + } else { + //model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + + //modificare<<<<<<<<<<<<<<<<<<<<< + if (SaldoAcquisti(Prezzo) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && ConsentiCredito) { + if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + MessaggioSaldoUnaVolta=true; + } else { + return; + } + } else { + model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + + } + + } + }else{ + model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + if (idTessera!=0L){jbtnChiudi.setEnabled(true);} + }*/ + } + if (model.getRowCount() > 0) { + tblLista.setRowSelectionInterval(model.getRowCount() - 1, model.getRowCount() - 1); + } + tblLista.setModel(model); + + ControllaCompleti(model); + ControllaExtra(model); + SommaColonne(model); + + //inizio 21-12-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + if (jbtnChiudi.isEnabled()) { + if (SaldoAcquisti(0.0) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && Gratuita_Residue <= 0 && (Bonus_Residui <= 0 || FLAG_BONUS == 0) && ConsentiCredito == false) { + JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + jbtnEliminaActionPerformed(null); + return; + } else { + //model.addRow(new Object[]{rs.getString("nome"), Prezzo, Punti, rs.getLong("idProdotto"), Prezzo, rs.getLong("id_Categoria")}); + //04-02-2019 + /* + if (SaldoAcquisti(0.0) == false && CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && ConsentiCredito) { + if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); + MessaggioSaldoUnaVolta=true; + } else { + jbtnEliminaActionPerformed(null); + return; + } + } else { + //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); + + } + */ + + } + } else { + //model.addRow(new Object[]{rs.getString("nome"), UltimoPrezzo, UltimiPunti, rs.getLong("idProdotto"), UltimoPrezzo, rs.getLong("id_Categoria")}); + if (idTessera != 0L) { + jbtnChiudi.setEnabled(true); + } + } + //fine 21-12-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + //stessa procedura in Cercates + //prendo l'ultimo valore della griglia + if (model.getRowCount() > 0) { +// Double UP = Double.parseDouble(model.getValueAt(model.getRowCount() - 1, ColImporto).toString()); +// String UProd = model.getValueAt(model.getRowCount() - 1, 0).toString(); +// DecimalFormat df2 = new DecimalFormat("##0.00"); +// String PrezzoDisplay = ("E " + df2.format(UP)); +// String fa = "FASCIA " + lblFascia.getText().replaceAll("Fascia", "").trim(); +// if (fa.length() >= 10) { +// fa = fa.substring(fa.length() - 10, fa.length()); +// } else { +// fa = SpaziBianchi(fa, 10, true); +// } +// +// if (UProd.length() > 20) { +// UProd = UProd.substring(0, 20); +// } else { +// UProd = SpaziBianchi(UProd, 20, true); +// } +// Display(UProd + fa, PrezzoDisplay);//fa+uprod + + Double TotAcquisto = 0.0; + try { + + if (txtTotaleCassa.getText().length() > 0) { + String Saldo = txtTotaleCassa.getText().replace("? ", "").replace(".", ""); + Saldo = Saldo.replace(",", "."); + TotAcquisto = Double.parseDouble(Saldo); + } + } catch (Exception ex) { + } + DecimalFormat df2 = new DecimalFormat("##0.00"); + String PrezzoDisplay = ("E " + df2.format(TotAcquisto)); + String fa = "FASCIA " + lblFascia.getText().replaceAll("Fascia", "").trim(); + if (fa.length() >= 10) { + fa = fa.substring(fa.length() - 10, fa.length()); + } else { + fa = SpaziBianchi(fa, 10, true); + } + + String UProd = SpaziBianchi("Totale ", 20, true); + //Aggiornamento12-04-2019 + //Display(UProd + fa, PrezzoDisplay);//fa+uprod + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (Exception ex) { + System.out.println(ex.getMessage()); + } + } + break; + + default: + break; + } + } + + private void PulsantiCategoria(String id, String cmd) { + + for (Integer k = this.pnlProdotti.getComponentCount(); k > 0; k--) { + this.pnlProdotti.remove(k - 1); + } + this.caricaDati("PRODOTTI", id); + //spengo altri togglebutton + if (this.pnlCategorie.getComponentCount()>2){ + for (Integer y = 0; y < this.pnlCategorie.getComponentCount(); y++) { + JToggleButton bt = (JToggleButton) this.pnlCategorie.getComponent(y); + if (bt.getActionCommand() != cmd) { + bt.setSelected(false); + } else { + if (bt.isSelected() == false) { + //this.caricaDati("PRODOTTI", "-1"); + this.caricaPannello(); + } + + } + + } + } + } + + private Boolean SaldoAcquisti(Double Prezzo) { + Boolean OK = false; + Double SaldoTessera = 0.0; + Double TotAcquisto = 0.0; + try { + if (lblSaldo.getText().length() > 0) { + String Saldo = lblSaldo.getText().replace("? ", "").trim().replace(".", ""); + Saldo = Saldo.replace("[", ""); + Saldo = Saldo.replace("]", ""); + Saldo = Saldo.replace(",", "."); + if (Saldo.length() > 0) { + SaldoTessera = Double.parseDouble(Saldo); + } + + } + if (txtTotaleCassa.getText().length() > 0) { + String Saldo = txtTotaleCassa.getText().replace("? ", "").replace(".", ""); + Saldo = Saldo.replace(",", "."); + TotAcquisto = Double.parseDouble(Saldo); + } + } catch (Exception e) { + } + Double S = SaldoTessera - (TotAcquisto + Prezzo); + if (S >= SaldoMinimoStop) { + OK = true; + } +// if (SaldoTessera >= (TotAcquisto + Prezzo)) { +// OK = true; +// } + return OK; + } + + private void SommaColonne(MyTableModel model) { + Double T = model.Somma(ColImporto); + MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + if (model2.getRowCount() > 0) { + T = T + model2.Somma(1); + } + + DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); + txtTotaleCassa.setText("? " + df2.format(T)); + + int P = model.SommaInt(2); + txtTotalePunti.setText("Punti " + P); + + //if(idModoPagamento==0L){ + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + Double SaldoCarta = 0.0; + if (lblSaldo.getText().trim().length() > 0) { + String Saldo = lblSaldo.getText().replace("? ", "").trim().replace(".", ""); + Saldo = Saldo.replace("[", ""); + Saldo = Saldo.replace("]", ""); + Saldo = Saldo.replace(",", "."); + if (Saldo.length() > 0) { + SaldoCarta = Double.parseDouble(Saldo); + } + + //SaldoCarta=Double.parseDouble(lblSaldo.getText().trim().replace("? ", "").replace(",", ".")); + } + SaldoCarta = SaldoCarta - T; + lblResiduo.setText("? " + df2.format(SaldoCarta)); + + } + } + +// private void CaricaCompleti() { +//// String Query="Select co.id_vassoio, co.id_categoria_prodotti, pr2.id as id_Prodotto, co.quantita, ta.prezzo, ta.punti "; +//// String From=" FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " + +//// " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " + +//// " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario + +//// " AND pr.id_categoria = 0 " + +//// " ORDER BY ta.prezzo, co.id_vassoio, co.id_categoria_prodotti, pr2.id"; +// String Query = "Select distinct co.id_vassoio, co.id_categoria_prodotti, co.quantita, ta.prezzo, ta.punti"; +// String From = " FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " +// + " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " +// + " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario +// + " AND pr.id_categoria = 0 " +// + " ORDER BY ta.prezzo, co.id_vassoio, co.id_categoria_prodotti"; +// +// String Query2 = "Select distinct co.id_vassoio, co.id_categoria_prodotti, co.quantita, ta.prezzo, ta.punti, " +// + "(select count (*) from composizioni where id_vassoio=co.id_vassoio) as nr"; +// String From2 = " FROM composizioni co,tariffe ta,prodotti pr,prodotti pr2 " +// + " WHERE pr.id_vassoio = co.id_vassoio AND co.id_categoria_prodotti = pr2.id_categoria " +// + " AND ta.id_prodotto = pr.id AND ta.id_fascia =" + idProfiloTariffario +// + " AND pr.id_categoria = 0 " +// + " ORDER BY ta.prezzo, nr, co.id_vassoio, co.id_categoria_prodotti"; +// System.out.println(Query + From); +// System.out.println(Query2 + From2); +// try { +// +// Integer Size = Integer.parseInt(MySelect("Select count(distinct co.id_vassoio) as nrows " + From, "nrows")); +// Integer SizeDett = Integer.parseInt(MySelect("Select count(*) as nrows from (" + Query + From + ")", "nrows")); +// Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); +// +// Statement st = dbConnection.createStatement(); +// +// Completi = new Object[Size][3]; +// CompletiDett = new Object[SizeDett]; +// +// Integer r = 0; +// Integer rr = -1; +// ResultSet rs = st.executeQuery(Query2 + From2); +// Long idVassoio = -10L; +// while (rs.next()) { +// Object[] Campi = new Object[6]; +// Campi[0] = rs.getLong("id_vassoio"); +// Campi[1] = rs.getLong("id_categoria_prodotti"); +// Campi[2] = rs.getLong("quantita"); +// //Campi[3]=rs.getLong("id_Prodotto"); +// Campi[3] = rs.getDouble("prezzo"); +// Campi[4] = rs.getLong("punti"); +// Campi[5] = 0.0;//pezzi scelti +// CompletiDett[r] = Campi; +// if (idVassoio != Long.parseLong(Campi[0].toString())) { +// idVassoio = Long.parseLong(Campi[0].toString()); +// rr++; +// } +// +//// System.out.println("rr: " + rr); +// try { +// Completi[rr][0] = Campi[0]; +// Completi[rr][1] = rs.getDouble("prezzo"); +// Completi[rr][2] = 0.0; +// } catch (Exception e) { +// JOptionPane.showMessageDialog(this, "Errore: dati disallineati nelle tariffe prodotto!"); +// } +// r++; +// } +// rs.close(); +// st.close(); +// dbConnection.close(); +// } catch (SQLException e) { +// JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); +// +// } +// } + + private void ControllaExtra(MyTableModel model) { + //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + //jbtnChiudi.setEnabled(true); + +// if (FlagRicevuta) { +// jbtnStampa.setEnabled(true); +// } + if (FlagExtra == false) { + for (int i = 0; i < model.getRowCount(); i++) { + Object row[] = model.getRow(i); + Double p = Double.parseDouble(row[ColImporto].toString()); + if (p != 0) { + //if (MessaggioFlagExtraUnaVolta == false) { + JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); + // MessaggioFlagExtraUnaVolta = true; + //} + //16-10-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +// jbtnChiudi.setEnabled(false); +// jbtnStampa.setEnabled(false); + + jbtnEliminaActionPerformed(null); + + break; + } + } + } else { + for (int i = 0; i < model.getRowCount(); i++) { + Object row[] = model.getRow(i); + Double p = Double.parseDouble(row[ColImporto].toString()); + if (p != 0) { + JOptionPane.showMessageDialog(this, "Nella lista sono presenti degli extra!"); + break; + } + + } + + } + } + + + //02/09/2021 + private void ControllaCompleti(MyTableModel model) { + if (PassaggiEsauritiNoComposizione == true) { + return; + } + + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); + ClearTable(model1); + //pulisco lista +// MyTableModel model1 = (MyTableModel) tblLista1.getModel(); +// for (int y = 0; y < model1.getRowCount(); y++) { +// model1.deleteRow(y); +// doLayout(); +// } + + + Boolean ComposizionePresente = false; + StringBuilder sb=new StringBuilder(); + //verifico se sono presenti composizioni + for (int i = 0; i < model.getRowCount(); i++) { + Object row[] = model.getRow(i); + Double p = Double.parseDouble(row[4].toString()); + model.setValueAt(p, i, ColImporto); + sb.append(model.getValueAt(i, 3)); + sb.append(","); + if (Long.parseLong(row[5].toString()) == 0L) { + ComposizionePresente = true; + if (Gratuita_Residue > 0) {//Gratuita_ResidueProg + ClearTable(model1); + //Gratuita_ResidueProg--; + model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); + } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { + ClearTable(model1); + //Bonus_ResiduiProg--; + model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); + } else { + ClearTable(model1); + model1.addRow(new Object[]{model.getValueAt(i, 0), model.getValueAt(i, 1), model.getValueAt(i, 3)}); + } + + model.setValueAt(0.0, i, ColImporto); + } + + } + + doLayout(); + + if (ComposizionePresente == false && sb.toString().length()>0) { + //aggiorno array Completi +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +//// if (Long.parseLong(Campi[2].toString()) <= Long.parseLong(Campi[5].toString())) { +// if (Long.parseLong(Campi[5].toString()) > 0) { +// //cerco id_vassoio e aggiorno +// for (int i = 0; i < Completi.length; i++) { +// if (Long.parseLong(Campi[0].toString()) == Long.parseLong(Completi[i][0].toString())) { +// //12-1-18 +// //Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + 1; +// Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + Long.parseLong(Campi[5].toString()); +// } +// } +// } +// } + //trovo il completo giusto +// Long idVassoio = 0L, max = 0L; +// Double Prezzo = 0.0; +// for (int i = 0; i < Completi.length; i++) { +// Long NPezzi = Long.parseLong(Completi[i][2].toString()); +//// Double Prezzo2=Double.parseDouble(Completi[i][1].toString()); +// +// if (NPezzi > 0 && NPezzi > max) { +// max = Long.parseLong(Completi[i][2].toString()); +// idVassoio = Long.parseLong(Completi[i][0].toString()); +// Prezzo = Double.parseDouble(Completi[i][1].toString()); +// } +// +// } + +// if (Long.parseLong(idVassoio.toString()) > 0) { +// //MyTableModel model1 = (MyTableModel) tblLista1.getModel(); +// //if(model1.getRowCount()>0){model1.deleteRow(0);} +// //cancello dalla lista prodotti i prezzi della composizione +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +// if (idVassoio == Long.parseLong(Campi[0].toString())) { +// for (int i = 0; i < model.getRowCount(); i++) { +// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(i, ColCategoria).toString())) { +// Double p = 0.00; +// model.setValueAt(p, i, ColImporto); +// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +// // se la quantità per la stessa categoria è >1 devo azzerare tutti i successivi +// int qtà = Integer.parseInt(Campi[2].toString()) - 1; +// if (qtà > 0) { +// for (int j = i + 1; j < model.getRowCount(); j++) { +// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(j, ColCategoria).toString())) { +// model.setValueAt(p, j, ColImporto); +// qtà--; +// if (qtà <= 0) { +// break; +// } +// } +// } +// } +// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +// break; +// } +// } +// } +// } + + //azzero prezzi dei componenti della composizione + //23-09-22 + //for (int i = 0; i < model.getRowCount()-1; i++) { + for (int i = 0; i < model.getRowCount(); i++) { + model.setValueAt(0.00, i, ColImporto); + } + + String idVassoio = MySelect("SELECT seleziona_composizione('" + sb.toString().substring(0,sb.toString().length()-1) + "') as idCompleto from dual", "idCompleto"); + if (Long.parseLong(idVassoio)!=-1) + { + String Completo = MySelect("Select nome from vassoi where id=" + idVassoio, "nome"); + String Prezzo = MySelect("Select prezzo from tariffe where id_fascia=" + idProfiloTariffario + " and id_prodotto=" + idVassoio, "prezzo"); + + if (Gratuita_Residue > 0) {//Gratuita_ResidueProg + ClearTable(model1); + //Gratuita_ResidueProg--; + model1.addRow(new Object[]{Completo, 0.00, idVassoio}); + } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { + ClearTable(model1); + //Bonus_ResiduiProg--; + model1.addRow(new Object[]{Completo, 0.00, idVassoio}); + } else { + ClearTable(model1); + model1.addRow(new Object[]{Completo, Prezzo, idVassoio}); + } + + //azzero elemento appena inserito se fa parte di una composizione + model.setValueAt(0.00, model.getRowCount()-1, ColImporto); + doLayout(); + }else{ + JOptionPane.showMessageDialog(this, "Composizione errata, questo prodotto sarà eliminato!"); + jbtnEliminaActionPerformed(null); + } +// } + } + + if (ComposizionePresente == true && sb.toString().length()>0 && model.getRowCount()>1) { + JOptionPane.showMessageDialog(this, "Composizione presente, questo prodotto sarà eliminato!"); + jbtnEliminaActionPerformed(null); + } + + } +// private void ControllaCompleti(MyTableModel model) { +// if (PassaggiEsauritiNoComposizione == true) { +// return; +// } +// +// //pulisco lista +// MyTableModel model1 = (MyTableModel) tblLista1.getModel(); +// //Gratuita_ResidueProg=Gratuita_Residue; +// //Bonus_ResiduiProg=Bonus_Residui; +// for (int y = 0; y < model1.getRowCount(); y++) { +// model1.deleteRow(y); +// doLayout(); +// } +//// if (model1.getRowCount() > 0) { +//// model1.deleteRow(0); +//// doLayout(); +//// } +// +// //ripulisco array scelte +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +// Campi[5] = 0L; +// CompletiDett[y] = Campi; +// } +// for (int y = 0; y < Completi.length; y++) { +// Completi[y][2] = 0L; +// } +// //cerco id_categoria +// for (int i = 0; i < model.getRowCount(); i++) { +// Object row[] = model.getRow(i); +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +// //12-1-18 +// //if (Long.parseLong(Campi[1].toString()) == Long.parseLong(row[ColCategoria].toString())) { +// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(row[ColCategoria].toString()) && Long.parseLong(Campi[5].toString()) < Long.parseLong(Campi[2].toString())) { +// Campi[5] = Long.parseLong(Campi[5].toString()) + 1; +// CompletiDett[y] = Campi; +// System.out.println("idVassoio: " + Campi[0].toString() + " - pz scelti per cat: " + Campi[5].toString() + " - max cat: " + Campi[2].toString()); +// +// ////break; +// } +// } +// +// } +// +// Boolean ComposizionePresente = false; +// //verifico se sono presenti composizioni +// for (int i = 0; i < model.getRowCount(); i++) { +// Object row[] = model.getRow(i); +// Double p = Double.parseDouble(row[4].toString()); +// model.setValueAt(p, i, ColImporto); +// if (Long.parseLong(row[5].toString()) == 0L) { +// ComposizionePresente = true; +// if (Gratuita_Residue > 0) {//Gratuita_ResidueProg +// //Gratuita_ResidueProg--; +// model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); +// } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { +// //Bonus_ResiduiProg--; +// model1.addRow(new Object[]{model.getValueAt(i, 0), 0.00, model.getValueAt(i, 3)}); +// } else { +// model1.addRow(new Object[]{model.getValueAt(i, 0), model.getValueAt(i, 1), model.getValueAt(i, 3)}); +// } +// +// model.setValueAt(0.0, i, ColImporto); +// } +// +// } +// +// if (ComposizionePresente == false) { +// //aggiorno array Completi +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +//// if (Long.parseLong(Campi[2].toString()) <= Long.parseLong(Campi[5].toString())) { +// if (Long.parseLong(Campi[5].toString()) > 0) { +// //cerco id_vassoio e aggiorno +// for (int i = 0; i < Completi.length; i++) { +// if (Long.parseLong(Campi[0].toString()) == Long.parseLong(Completi[i][0].toString())) { +// //12-1-18 +// //Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + 1; +// Completi[i][2] = Long.parseLong(Completi[i][2].toString()) + Long.parseLong(Campi[5].toString()); +// } +// } +// } +// } +// //trovo il completo giusto +// Long idVassoio = 0L, max = 0L; +// Double Prezzo = 0.0; +// for (int i = 0; i < Completi.length; i++) { +// Long NPezzi = Long.parseLong(Completi[i][2].toString()); +//// Double Prezzo2=Double.parseDouble(Completi[i][1].toString()); +// +// if (NPezzi > 0 && NPezzi > max) { +// max = Long.parseLong(Completi[i][2].toString()); +// idVassoio = Long.parseLong(Completi[i][0].toString()); +// Prezzo = Double.parseDouble(Completi[i][1].toString()); +// } +// +// } +// +// if (Long.parseLong(idVassoio.toString()) > 0) { +// //MyTableModel model1 = (MyTableModel) tblLista1.getModel(); +// //if(model1.getRowCount()>0){model1.deleteRow(0);} +// //cancello dalla lista prodotti i prezzi della composizione +// for (int y = 0; y < CompletiDett.length; y++) { +// Object[] Campi = new Object[6]; +// Campi = (Object[]) CompletiDett[y]; +// if (idVassoio == Long.parseLong(Campi[0].toString())) { +// for (int i = 0; i < model.getRowCount(); i++) { +// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(i, ColCategoria).toString())) { +// Double p = 0.00; +// model.setValueAt(p, i, ColImporto); +// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +// // se la quantità per la stessa categoria è >1 devo azzerare tutti i successivi +// int qtà = Integer.parseInt(Campi[2].toString()) - 1; +// if (qtà > 0) { +// for (int j = i + 1; j < model.getRowCount(); j++) { +// if (Long.parseLong(Campi[1].toString()) == Long.parseLong(model.getValueAt(j, ColCategoria).toString())) { +// model.setValueAt(p, j, ColImporto); +// qtà--; +// if (qtà <= 0) { +// break; +// } +// } +// } +// } +// //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +// break; +// } +// } +// } +// } +// +// String Completo = MySelect("Select nome from vassoi where id=" + idVassoio, "nome"); +// if (Gratuita_Residue > 0) {//Gratuita_ResidueProg +// //Gratuita_ResidueProg--; +// model1.addRow(new Object[]{Completo, 0.00, idVassoio}); +// } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { +// //Bonus_ResiduiProg--; +// model1.addRow(new Object[]{Completo, 0.00, idVassoio}); +// } else { +// model1.addRow(new Object[]{Completo, Prezzo, idVassoio}); +// } +// +// } +// } +// +// } + + // ======================Com==================================================== + // ** Carica i dati di base per la maschera principale + // ========================================================================== + public void caricaDati(String tipo, String id) { + String sql = ""; + String azione = ""; + String nome = ""; + Statement st; + ResultSet rs; + JToggleButton b; +// this.pnlCategorie.setLayout(new GridLayout(2,1,1,1)); + JPanel pnl = this.pnlCategorie; + + switch (tipo) { + case "CATEGORIE": + //sql = "SELECT id, nome FROM categorie_prodotti WHERE nome IS NOT NULL ORDER BY id"; + sql = "SELECT distinct c.id, c.nome, c.descrizione FROM categorie_prodotti c " + + " INNER JOIN prodotti p ON p.id_categoria = c.ID " + + " INNER JOIN catalogo_punti_cassa l ON l.id_prodotto = p.ID " + + " INNER JOIN punti_cassa x ON l.id_punto_cassa = x.ID " + + " WHERE x.id =" + idPuntoCassa + " order by c.descrizione"; + System.out.println(sql); + azione = "CATEGORIA"; + pnl = this.pnlCategorie; + break; + + case "PRODOTTI": + //sql = "SELECT id, nome FROM prodotti WHERE nome IS NOT NULL AND id_categoria = " + id + " ORDER BY id"; + //sql = "SELECT distinct prodotti.id, prodotti.nome FROM prodotti inner join tariffe on prodotti.id=tariffe.id_prodotto inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE nome IS NOT NULL AND prodotti.id_categoria = " + id + " and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa + " and tariffe.id_fascia=" + idProfiloTariffario + " ORDER BY Prodotti.id"; + //sql="Select p.id, p.nome, nvl(t.prezzo, p.prezzo_base) as prezzo, nvl(t.punti, 0) as punti from prodotti p left join tariffe t on t.id_prodotto = p.id where p.id_categoria = " + id + " and p.id_Vassoio is null and (t.id_fascia is null or t.id_fascia = " + idProfiloTariffario +") and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa; + //if (id.equalsIgnoreCase("-1")) { + /*28-03-2019 + sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; + String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " + + " WHERE p.flag_catalogo_variabile = 1" + + " AND p.id_categoria = cat.id " + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + " order by cat.descrizione,p.id"; + MyApplication MyA = new MyApplication(); + String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); + if (Integer.parseInt(nrec) <= 0) { + MenùGiornoPresente = false; + String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); + caricaDati("PRODOTTI", idComposizione); + break; + } else { + MenùGiornoPresente = true; + sql = sql + sql2; + } + */ + //} else { + sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti FROM prodotti p , tariffe t, catalogo_punti_cassa c " + + " WHERE p.id_categoria = " + id + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + + " ORDER BY p.flag_catalogo_variabile desc, p.nome"; + + System.out.println(sql); + //} + azione = "PRODOTTO"; + pnl = this.pnlProdotti; + break; + } + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = st.executeQuery(sql); + + if (tipo.equalsIgnoreCase("CATEGORIE")) { + int rowcount = 0; + while (rs.next()) { + rowcount++; + } + if (rowcount > 0) { + NumeroCategorie = rowcount; + rs.beforeFirst(); + pnl.setLayout(new GridLayout(rowcount + 1, 1, 1, 1)); + } + } + + pnl.removeAll(); + + while (rs.next()) { + nome = "<html>" + rs.getString("nome") + "</html>"; + b = new JToggleButton(nome); + b.setEnabled(CassaAperta); + + //getImage(rs.getString("id"),rs.getString("nome") ); +// File imageCheck = new File(imgPath + rs.getString("id") + ".jpg"); +// ImageIcon img; +// if (imageCheck.exists()) { +// img = new ImageIcon(imageCheck.getAbsolutePath()); +// b.setIcon(img); +// b.setHorizontalAlignment(SwingConstants.CENTER); +// b.setHorizontalTextPosition(SwingConstants.CENTER); +// b.setVerticalAlignment(SwingConstants.TOP); +// b.setVerticalTextPosition(SwingConstants.TOP); +// } else { + b.setHorizontalAlignment(SwingConstants.CENTER); + b.setVerticalAlignment(SwingConstants.CENTER); + b.setVerticalTextPosition(SwingConstants.CENTER); +// } + + b.setText(nome); +// Font f=new Font("Tahoma",0,12); +// b.setFont(f); + +/*28-03-2019------------ + if (id.equalsIgnoreCase("-1")) { + switch (rs.getString("Categoria").toUpperCase()) { + case "PRIMO": + Color c = new Color(255, 204, 204); + b.setBackground(c); + break; + case "SECONDO": + b.setBackground(Color.CYAN); + break; + case "CONTORNO": + b.setBackground(Color.GREEN); + break; + default: + b.setBackground(Color.yellow); + break; + + } + }-----------*/ + b.setName(rs.getString("id")); + b.setActionCommand(azione + "[" + rs.getString("id") + "]"); + b.addActionListener(this); + b.setVisible(true); + if (tipo.equalsIgnoreCase("CATEGORIE")) { +// Color c=new Color(255,0, 102, 102); + Font f = new Font("Tahoma", Font.BOLD, 14); + b.setFont(f); + b.setForeground(Color.RED); + + } + pnl.add(b); + } + + if (tipo.equalsIgnoreCase("CATEGORIE")) { + JToggleButton bGost = new JToggleButton("[DEFAULT]"); + bGost.setName("btnDefault"); + Font f = new Font("Tahoma", Font.BOLD, 14); + bGost.setFont(f); + bGost.setForeground(Color.RED); + bGost.setActionCommand("CATEGORIA[0]"); + bGost.addActionListener(this); + bGost.setVisible(false); + pnl.add(bGost); + } + + this.revalidate(); + this.repaint(); + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException e) { + } + + } + public void caricaPannello() { + String azione = "PRODOTTO"; + String where = ""; + Statement st; + ResultSet rs; + JToggleButton b; + String sql = "select * from (SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; + String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " + + " WHERE p.flag_catalogo_variabile = 1" + + " AND p.id_categoria = cat.id " + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa; + MyApplication MyA = new MyApplication(); + String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); + if (Integer.parseInt(nrec) <= 0) { + MenùGiornoPresente = false; + String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); + caricaDati("PRODOTTI", idComposizione); + + } else { + MenùGiornoPresente = true; + sql = sql + sql2; + } + JPanel pnl = this.pnlProdotti; + + pnl.setLayout(new GridLayout(6, 5, 1, 1)); + pnl.removeAll(); + for (Integer r = 0; r < 6; r++) { + Color c2 = new Color(255, 153, 255); + switch (r) { + case 0: + where = " and upper(cat.CODICE)='PRIM' "; + break; + case 1: + where = " and upper(cat.CODICE)='SECO' "; + c2 = Color.CYAN; + break; + case 2: + where = " and upper(cat.CODICE)='CONT' "; + c2 = new Color(146, 208, 80); + break; + case 3: + where = " and upper(cat.CODICE)='DESS' "; + c2 = Color.yellow; + break; + case 4: + where = " and (upper(cat.CODICE)='INSA' OR upper(cat.CODICE)='UNI' OR upper(cat.CODICE)='UNR2') "; + c2 = Color.GREEN; + break; + case 5: + where = " and (upper(cat.CODICE)='SALA' OR upper(cat.CODICE)='PIZZ') "; + c2 = new Color(255, 217, 102); + break; + + } + Integer np=0; + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = st.executeQuery(sql + where + " order by p.id) where ROWNUM <= 7"); + Font f=new Font("Tahoma", Font.BOLD,13); + String Jolly=""; + String idJolly=""; + while (rs.next()) { + if (rs.getString("nome").toUpperCase().indexOf("JOLLY")>=0) { + Jolly= "<html>" + rs.getString("nome") + "</html>"; + idJolly= rs.getString("id"); + } else { + String nome = "<html>" + rs.getString("nome") + "</html>"; + JToggleButton bt = new JToggleButton(nome); + bt.setBackground(c2); + + bt.setEnabled(CassaAperta); + + bt.setFont(f); +// MyCanvas tl = new MyCanvas(nome); + Insets ins = new Insets(0, 0, 0, 0); + bt.setMargin(ins); + bt.setHorizontalAlignment(SwingConstants.LEFT); + bt.setVerticalAlignment(SwingConstants.TOP); + bt.setVerticalTextPosition(SwingConstants.TOP); + bt.setName(rs.getString("id")); + bt.setActionCommand(azione + "[" + rs.getString("id") + "]"); + bt.addActionListener(this); +// bt.add(tl); + bt.setVisible(true); + +// JLabel text3 = new JLabel(); +// text3.setText(nome); +// text3.setFont(f); +// text3.setLocation(0, 0); +// text3.setHorizontalAlignment(SwingConstants.LEFT); +// text3.setVerticalAlignment(SwingConstants.TOP); +// text3.setVerticalTextPosition(SwingConstants.TOP); +// text3.setSize(200,200); +// bt.add(text3); +// bt.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); + pnl.add(bt); + np++; + if(np==5){break;} + } + } + + for (Integer c = np; c < 6; c++) { + JToggleButton bt; + if (c == 5 && Jolly.length() > 1) { + bt = new JToggleButton(Jolly); + bt.setName(idJolly); + bt.setActionCommand(azione + "[" + idJolly + "]"); + } else { + bt = new JToggleButton(""); + bt.setName("0"); + bt.setActionCommand(azione + "[0]"); + } + bt.setBackground(c2); + bt.setFont(f); + bt.setEnabled(CassaAperta); + Insets ins = new Insets(0, 0, 0, 0); + bt.setMargin(ins); + bt.setHorizontalAlignment(SwingConstants.LEFT); + bt.setVerticalAlignment(SwingConstants.TOP); + bt.setVerticalTextPosition(SwingConstants.TOP); + bt.addActionListener(this); + bt.setVisible(true); + pnl.add(bt); + } + rs.close(); + st.close(); + dbConnection.close(); + + + + } catch (SQLException e) { + } + + + } + + this.revalidate(); + this.repaint(); + + } + /* + public void caricaDati(String tipo, String id) { + String sql = ""; + String azione = ""; + String nome = ""; + Statement st; + ResultSet rs; + JToggleButton b; +// this.pnlCategorie.setLayout(new GridLayout(2,1,1,1)); + JPanel pnl = this.pnlCategorie; + + switch (tipo) { + case "CATEGORIE": + //sql = "SELECT id, nome FROM categorie_prodotti WHERE nome IS NOT NULL ORDER BY id"; + sql = "SELECT distinct c.id, c.nome, c.descrizione FROM categorie_prodotti c " + + " INNER JOIN prodotti p ON p.id_categoria = c.ID " + + " INNER JOIN catalogo_punti_cassa l ON l.id_prodotto = p.ID " + + " INNER JOIN punti_cassa x ON l.id_punto_cassa = x.ID " + + " WHERE x.id =" + idPuntoCassa + " order by c.descrizione"; + System.out.println(sql); + azione = "CATEGORIA"; + pnl = this.pnlCategorie; + break; + + case "PRODOTTI": + //sql = "SELECT id, nome FROM prodotti WHERE nome IS NOT NULL AND id_categoria = " + id + " ORDER BY id"; + //sql = "SELECT distinct prodotti.id, prodotti.nome FROM prodotti inner join tariffe on prodotti.id=tariffe.id_prodotto inner join catalogo_punti_cassa on prodotti.id=CATALOGO_PUNTI_CASSA.ID_Prodotto WHERE nome IS NOT NULL AND prodotti.id_categoria = " + id + " and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa + " and tariffe.id_fascia=" + idProfiloTariffario + " ORDER BY Prodotti.id"; + //sql="Select p.id, p.nome, nvl(t.prezzo, p.prezzo_base) as prezzo, nvl(t.punti, 0) as punti from prodotti p left join tariffe t on t.id_prodotto = p.id where p.id_categoria = " + id + " and p.id_Vassoio is null and (t.id_fascia is null or t.id_fascia = " + idProfiloTariffario +") and catalogo_punti_cassa.id_Punto_cassa=" + idPuntoCassa; + if (id.equalsIgnoreCase("-1")) { + sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti,cat.nome as Categoria "; + String sql2 = " FROM prodotti p , tariffe t, catalogo_punti_cassa c,categorie_prodotti cat " + + " WHERE p.flag_catalogo_variabile = 1" + + " AND p.id_categoria = cat.id " + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + " order by cat.descrizione,p.id"; + MyApplication MyA = new MyApplication(); + String nrec = MyA.MySelect(this, "SELECT count(*) as nrec " + sql2, "nrec"); + if (Integer.parseInt(nrec) <= 0) { + MenùGiornoPresente = false; + String idComposizione = MyA.MySelect(this, "select id from Categorie_Prodotti where Upper(Nome)='COMPOSIZIONE'", "id"); + caricaDati("PRODOTTI", idComposizione); + break; + } else { + MenùGiornoPresente = true; + sql = sql + sql2; + } + } else { + sql = "SELECT p.ID, p.nome, NVL (t.prezzo, p.prezzo_base) AS prezzo,NVL (t.punti, 0) AS punti FROM prodotti p , tariffe t, catalogo_punti_cassa c " + + " WHERE p.id_categoria = " + id + + " AND t.id_prodotto = p.id " + + " AND t.id_fascia = " + idProfiloTariffario + + " AND c.id_prodotto = p.id AND c.id_punto_cassa =" + idPuntoCassa + + " ORDER BY p.flag_catalogo_variabile desc, p.nome"; + } + azione = "PRODOTTO"; + pnl = this.pnlProdotti; + break; + } + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = st.executeQuery(sql); + + if (tipo.equalsIgnoreCase("CATEGORIE")) { + int rowcount = 0; + while (rs.next()) { + rowcount++; + } + if (rowcount > 0) { + NumeroCategorie = rowcount; + rs.beforeFirst(); + pnl.setLayout(new GridLayout(rowcount + 1, 1, 1, 1)); + } + } + + pnl.removeAll(); + + while (rs.next()) { + nome = "<html>" + rs.getString("nome") + "</html>"; + b = new JToggleButton(nome); + b.setEnabled(CassaAperta); + + //getImage(rs.getString("id"),rs.getString("nome") ); +// File imageCheck = new File(imgPath + rs.getString("id") + ".jpg"); +// ImageIcon img; +// if (imageCheck.exists()) { +// img = new ImageIcon(imageCheck.getAbsolutePath()); +// b.setIcon(img); +// b.setHorizontalAlignment(SwingConstants.CENTER); +// b.setHorizontalTextPosition(SwingConstants.CENTER); +// b.setVerticalAlignment(SwingConstants.TOP); +// b.setVerticalTextPosition(SwingConstants.TOP); +// } else { + b.setHorizontalAlignment(SwingConstants.CENTER); + b.setVerticalAlignment(SwingConstants.CENTER); + b.setVerticalTextPosition(SwingConstants.CENTER); +// } + + b.setText(nome); +// Font f=new Font("Tahoma",0,12); +// b.setFont(f); + +/*28-03-2019------------ + if (id.equalsIgnoreCase("-1")) { + switch (rs.getString("Categoria").toUpperCase()) { + case "PRIMO": + Color c = new Color(255, 204, 204); + b.setBackground(c); + break; + case "SECONDO": + b.setBackground(Color.CYAN); + break; + case "CONTORNO": + b.setBackground(Color.GREEN); + break; + default: + b.setBackground(Color.yellow); + break; + + } + }-----------*/ + /* + b.setName(rs.getString("id")); + b.setActionCommand(azione + "[" + rs.getString("id") + "]"); + b.addActionListener(this); + b.setVisible(true); + if (tipo.equalsIgnoreCase("CATEGORIE")) { +// Color c=new Color(255,0, 102, 102); + Font f = new Font("Tahoma", Font.BOLD, 14); + b.setFont(f); + b.setForeground(Color.RED); + + } + pnl.add(b); + } + + if (tipo.equalsIgnoreCase("CATEGORIE")) { + JToggleButton bGost = new JToggleButton("[DEFAULT]"); + bGost.setName("btnDefault"); + Font f = new Font("Tahoma", Font.BOLD, 14); + bGost.setFont(f); + bGost.setForeground(Color.RED); + bGost.setActionCommand("CATEGORIA[-1]"); + bGost.addActionListener(this); + bGost.setVisible(false); + pnl.add(bGost); + } + + this.revalidate(); + this.repaint(); + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException e) { + } + + } +*/ + private void CaricaModiPagamento() { + try { + Statement st; + ResultSet rs; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(); + rs = st.executeQuery("Select * from Tipi_Pagamenti order by id"); + + while (rs.next()) { + ModiPagamento.append(rs.getString("id") + ';' + rs.getString("nome") + "|"); +//03-07-2017 +// if (rs.getString("nome").equalsIgnoreCase("Contanti")){ +// idModoPagamento=rs.getLong("id"); +// } + } + this.revalidate(); + this.repaint(); + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException e) { + } + + } + // ========================================================================== + // ** Quando viene chiusa la form esce dall'applicazione + // ========================================================================== + private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm + Object[] options = {"Sì", "No"}; + + Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi chiusura programma?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]); + + if (Integer.parseInt(selectedValue.toString()) == 0) { + MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); + Long nrec = MySelectInteger("SELECT count(*) as nrec FROM acquisti", "nrec"); + if (nrec > 0) { + if (JOptionPane.showConfirmDialog(null, "Attenzione, ci sono " + nrec + " passaggi non ancora trasferiti al database centrale,\nconferma chiusura programma?", "Acquisti", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + StatoAttivoNonLoggato(); + System.exit(0); + } else { + return; + } + } + StatoAttivoNonLoggato(); + System.exit(0); + } + + }//GEN-LAST:event_exitForm + + // ========================================================================== + // ** Click sul btnLogin + // ========================================================================== + private Boolean Turno() { + Boolean OK = false; + String Query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c where x.id_turno = t.id and x.id_punto_distribuzione = p.id and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; + + try { + String[] mo = MySelect("Select sysdate as mo from dual", "mo").split(" "); + + Statement st; + ResultSet rs; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(); + rs = st.executeQuery(Query); + while (rs.next()) { + String Dalle = rs.getString("dalle"); + String Alle = rs.getString("alle"); + try { + + //Date Adesso=new Date(); + Date Adesso = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + mo[1]); + Date Da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Dalle); + Date A = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Alle); + + //JOptionPane.showMessageDialog(this, Da + " e " + Adesso.compareTo(A)); + if (Adesso.after(Da) && Adesso.before(A)) { + idTurno = rs.getLong("id"); + NomeTurno = rs.getString("nome"); + idTurnoAttuale = idTurno; + NomeTurnoAttuale = NomeTurno; + OK = true; + break; + } + + } catch (Exception e) { + } + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + + JOptionPane.showMessageDialog(this, "Errore DB ['" + Query + "']"); + } + return OK; + } + + private void TurnoAttuale() { + String Query = "select t.dalle, t.alle, t.id, t.nome from turni t, turni_punti_distribuzione x, punti_distribuzione p, punti_cassa c where x.id_turno = t.id and x.id_punto_distribuzione = p.id and c.id_punto_distribuzione = p.id and c.id =" + idPuntoCassa; + + try { + String[] mo = MySelect("Select sysdate as mo from dual", "mo").split(" "); + + Statement st; + ResultSet rs; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + st = dbConnection.createStatement(); + rs = st.executeQuery(Query); + while (rs.next()) { + String Dalle = rs.getString("dalle"); + String Alle = rs.getString("alle"); + try { + + //Date Adesso=new Date(); + Date Adesso = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + mo[1]); + Date Da = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Dalle); + Date A = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ENGLISH).parse(mo[0] + " " + Alle); + + //JOptionPane.showMessageDialog(this, Da + " e " + Adesso.compareTo(A)); + if (Adesso.after(Da) && Adesso.before(A)) { + idTurnoAttuale = rs.getLong("id"); + NomeTurnoAttuale = rs.getString("nome"); + + break; + } + + } catch (Exception e) { + } + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + + JOptionPane.showMessageDialog(this, "Errore DB ['" + Query + "']"); + } + + } + + private void ImpostaAmbiente() { + // ----------------------------------------------------------- + // ** id punto cassa + // ----------------------------------------------------------- + idPuntoCassa = MySelectInteger("select Punti_Cassa.id as idPC from Punti_Cassa where Punti_Cassa.id=" + idPuntoCassa, "idPC"); + + // ----------------------------------------------------------- + // ** Imposta l'ambiente + // ----------------------------------------------------------- + txtUsername.setEnabled(false); + txtPassword.setEnabled(false); + btnLogin.setEnabled(false); + AddRemoveKeyDispatcher(true); + + //database di produzione si inceppa nello scarico immagini + //ScaricaImmagini(); + AggiungiImmaginiPulsanti(); + if (jChLogin.isSelected() == false && utenteLoggato.length() <= 0) { + utenteLoggato = txtUsername.getText(); + } + + lblUtenteLoggato.setText("LogIn: [" + utenteLoggato + "]"); + this.resize(); + this.caricaDati("CATEGORIE", "0"); + pnlErrore.setVisible(false); + pnlLogin.setVisible(false); + pnlTop.setVisible(true); + pnlProdotti.setVisible(true); + jBtnStorno.setEnabled(false); + //jBtnTicket.setEnabled(false); + //jBtnCarta.setEnabled(false); + jBtnAsporto.setEnabled(false); +// jBtnBuoni.setEnabled(false); + jbtnSu.setEnabled(false); + jbtnGiu.setEnabled(false); + jbtnElimina.setEnabled(false); + jbtnAnnulla.setEnabled(false); +// jbtnStampa.setEnabled(false); + jbtnDuplica.setEnabled(false); + + String Pulsante = MySelect("SELECT p.flag_imposta_tessera as Pulsante FROM punti_distribuzione p, punti_cassa c WHERE c.id_punto_distribuzione = p.id AND c.id =" + idPuntoCassa, "Pulsante"); + if (Integer.parseInt(Pulsante) == 1) { + BottoneImposta = true; + btnImpostaCliente.setVisible(true); + btnImpostaCliente.setEnabled(true); + + jTxtTessera.setEnabled(true); + } else { + BottoneImposta = false; +// btnImpostaCliente.setVisible(false); + btnImpostaCliente.setEnabled(false); + jTxtTessera.setEnabled(false); + } + + //tasto imposta +// String QueryTasto="select count(*) as res from punti_cassa pc, punti_distribuzione pd where pc.id_punto_distribuzione = pd.id " + +// " and pd.flag_imposta_tessera = 1 and pc.id =" + idPuntoCassa; +// MyApplication MyA=new MyApplication(); +// Integer Visibile=Integer.parseInt(MyA.MySelect(this, QueryTasto, "res")); +// if(Visibile==0){ +//// btnImpostaCliente.setVisible(false); +// btnImpostaCliente.setEnabled(false); +// jTxtTessera.setEnabled(false); +// } + if (idPuntoCassa != 0) { + AggiornaProgressivi(); + //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +/* + // ----------------------------------------------------------- + // ** progressivo assoluto scontrino + // ----------------------------------------------------------- + + String prog = MySelect("select nvl(max(prog_assoluto),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa, "Prog"); + Progressivo = Long.parseLong(prog); + + + // ----------------------------------------------------------- + // ** progressivo giorno turno scontrino + // ----------------------------------------------------------- + Date Adesso=new Date(); + String progT = MySelect("select nvl(max(prog_turno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso) , "Prog"); + ProgressivoTurno = Long.parseLong(progT); + + + // ----------------------------------------------------------- + // ** progressivo giorno scontrino + // ---------------------c-------------------------------------- + +// String[] El = MySelect("select nvl(max(prog_giorno),0) || '|' || count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog").split("\\|"); +// String progG=El[0]; +// if (Long.parseLong(El[1])<= 0) { +// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + +// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + ",0,0)"); +//// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + prog + ",0,0)"); +// } + + String progG = MySelect("select nvl(max(prog_giorno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog"); + ProgressivoGiorno = Long.parseLong(progG); + + + String ControlloTurno=MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno , "Prog"); + if (Long.parseLong(ControlloTurno)<=0){ + MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); +// + } + + Progressivo++; + ProgressivoGiorno++; + ProgressivoTurno++; + + + + // ----------------------------------------------------------- + // ** incassi turno pagamento a scalare + // ----------------------------------------------------------- + String progPS = MySelect("select nvl(sum(incasso_turno_scalare),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoScalare = Double.parseDouble(progPS); + + // ----------------------------------------------------------- + // ** incassi turno pagamento a contanti + // ----------------------------------------------------------- + String progPC = MySelect("select nvl(sum(incasso_turno_contanti),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoContanti = Double.parseDouble(progPC); + + // ----------------------------------------------------------- + // ** incassi turno pagamento ticket + // ----------------------------------------------------------- + String progPT = MySelect("select nvl(sum(incasso_turno_ticket),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoTicket = Double.parseDouble(progPT); + + AggiornaLabelInfo(); + + //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + */ + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); + + if (btnImpostaCliente.isVisible()) { + btnImpostaCliente.setEnabled(false); + } + jBtnprodotti.setEnabled(false); + //jBtnMeteo.setEnabled(false); + //jBtnDB.setEnabled(false); + Meteo(); + if (btnImpostaCliente.isVisible()) { + btnImpostaCliente.setEnabled(BottoneImposta); + } + jBtnprodotti.setEnabled(true); + //jBtnMeteo.setEnabled(true); + //jBtnDB.setEnabled(true); + + jbtnDuplica.setText("<html>Duplica<br />Prodotto</html>"); + jbtnElimina.setText("<html>Elimina<br />Prodotto</html>"); + + CaricaModiPagamento(); + + VerificaModoPagamento(); + PulsantiModoPagamento(); + + //modifica 09-5-2018------------------------------------ + if (FlagPrecaricaLista) { + AbilitaPulsanti(pnlCategorie, true,true); + AbilitaPulsanti(pnlProdotti, true,true); + idProfiloTariffarioDefault = MySelectInteger("select Valore from Parametri where upper(chiave)='IDFASCIADEFAULT'", "Valore"); + System.out.print("" + idProfiloTariffarioDefault); + + ApriCassaDefault(); + } + //modifica 09-5-2018------------------------------------ + + +// jbtnDuplica.setLayout(new BorderLayout()); +// JLabel label1 = new JLabel("Duplica"); +// label1.setFont(jbtnDuplica.getFont()); +// JLabel label2 = new JLabel("Prodotto"); +// label2.setFont(jbtnDuplica.getFont()); +// jbtnDuplica.add(BorderLayout.CENTER,label1); +// jbtnDuplica.add(BorderLayout.SOUTH,label2); + //label1.setLocation(10, 10); +// jTxtTessera.requestFocus(); +// +// jTxtTessera.getDocument().addDocumentListener(new DocumentListener() { +// public void changedUpdate(DocumentEvent e) { +//// warn(); +// } +// public void removeUpdate(DocumentEvent e) { +//// warn(); +// } +// public void insertUpdate(DocumentEvent e) { +// warn(); +// } +// +// public void warn() { +// if(StatoCardLettore){return;} +// if (jTxtTessera.getText().length()>0 ){ +// StatoCardLettore=true; +//// timerCardLettore = new java.util.Timer(); +//// timerCardLettore.schedule(new CardTaskLettore(PuntoCassa.this),1000, 1*5000); +// +// final Timer timer = new Timer(); +// +// final TimerTask task = new TimerTask() { +// @Override +// public void run() { +// String[] txt=jTxtTessera.getText().split("ò"); +// if (txt.length>0){ +// String Tessera=txt[1].trim().replace("_", ""); +// jTxtTessera.setText(Tessera); +// CercaTessera(); +// System.out.println(Tessera); +// } +// +// +// timer.cancel(); +// timer.purge(); +// StatoCardLettore=false; +// +// } +// }; +// timer.schedule(task, 1000); +// +// +// } +// } +// }); + } else { + JOptionPane.showMessageDialog(this, "ID Punto Cassa non configurato!"); + } + } + private void VerificaDB() { + final Timer timer = new Timer(); + final TimerTask task = new TimerTask() { + @Override + public void run() { + Long res=MySelectInteger("SELECT db_remoto_connesso as Stato FROM dual", "Stato"); + if (res==1){ + lblDB.setBackground(Color.green); + }else{ + lblDB.setBackground(Color.red); + } + lblDB.setOpaque(true); + lblDB.repaint(); + } + }; + + timer.schedule(task, 1000, 10000); + + } + public void AggiornaProgressivi() { + // ----------------------------------------------------------- + // ** progressivo assoluto scontrino + // ----------------------------------------------------------- + + String prog = MySelect("select nvl(max(prog_assoluto),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa, "Prog"); + +// if(Progressivo < Long.parseLong(prog)){ + Progressivo = Long.parseLong(prog); +// } + + // ----------------------------------------------------------- + // ** progressivo giorno turno scontrino + // ----------------------------------------------------------- + Date Adesso = new Date(); + String progT = MySelect("select nvl(max(prog_turno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); +// if(ProgressivoTurno < Long.parseLong(progT)){ + ProgressivoTurno = Long.parseLong(progT);// + 1; +// } + + // ----------------------------------------------------------- + // ** progressivo giorno scontrino + // ---------------------c-------------------------------------- +// String[] El = MySelect("select nvl(max(prog_giorno),0) || '|' || count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) , "Prog").split("\\|"); +// String progG=El[0]; +// if (Long.parseLong(El[1])<= 0) { +// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + +// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + ",0,0)"); +//// " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + prog + ",0,0)"); +// } + String progG = MySelect("select nvl(max(prog_giorno),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso), "Prog"); +// if(ProgressivoGiorno < Long.parseLong(progG)){ + ProgressivoGiorno = Long.parseLong(progG);// + 1; +// } + + String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); + if (Long.parseLong(ControlloTurno) <= 0) { + MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); +// + } + +// Progressivo++; +// ProgressivoGiorno++; +// ProgressivoTurno++; + + + // ----------------------------------------------------------- + // ** incassi turno pagamento a scalare + // ----------------------------------------------------------- + String progPS = MySelect("select nvl(sum(incasso_turno_scalare),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoScalare = Double.parseDouble(progPS); + + // ----------------------------------------------------------- + // ** incassi turno pagamento a contanti + // ----------------------------------------------------------- + String progPC = MySelect("select nvl(sum(incasso_turno_contanti),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoContanti = Double.parseDouble(progPC); + + // ----------------------------------------------------------- + // ** incassi turno pagamento ticket + // ----------------------------------------------------------- + String progPT = MySelect("select nvl(sum(incasso_turno_ticket),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoTicket = Double.parseDouble(progPT); + + // ----------------------------------------------------------- + // ** incassi turno pagamento differito + // ----------------------------------------------------------- + String progDI = MySelect("select nvl(sum(incasso_turno_differito),0) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and id_Turno=" + idTurno + " and data=" + AggiustaData(Adesso), "Prog"); + ProgressivoDifferito = Double.parseDouble(progDI); + AggiornaLabelInfo(); + + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare") && jTxtTessera.getText().length()>0) { + VerificaSaldo(jTxtTessera.getText()); + + } + + } + + private void AggiornaLabelInfo() { + Long Prog = Progressivo;// - 1; + Long ProgGG = ProgressivoGiorno;// - 1; + Long ProgTurno = ProgressivoTurno;// - 1; + if(Progressivo<=0) + Prog=0L; + if(ProgressivoGiorno<=0) + ProgGG=0L; + if(ProgressivoTurno<=0) + ProgTurno=0L; + + lblInfo.setText("Passaggi: Tot. [" + Prog + "], giorno [" + ProgGG + "], turno [" + ProgTurno + "]"); + DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); + lblInfo2.setText("Incassi [" + NomeTurno + "]: Tot. [" + df2.format(ProgressivoScalare + ProgressivoContanti + ProgressivoTicket + ProgressivoDifferito) + "] SC [" + df2.format(ProgressivoScalare) + "], CO [" + df2.format(ProgressivoContanti) + "], TI [" + df2.format(ProgressivoTicket) + "], DI [" + df2.format(ProgressivoDifferito) + "]"); + } + + public void AddRemoveKeyDispatcher(Boolean Aggiungi) { + if (Aggiungi) { + if (KeyDespatcherAttivo == false) { + KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyDispatcher); + KeyDespatcherAttivo = true; + } + } else { + + KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(keyDispatcher); + KeyDespatcherAttivo = false; + } + + } + + private void Meteo() { + String Spia = MySelect("select controlla_meteo(" + idPuntoCassa + ") as res from dual", "res"); + if (Integer.parseInt(Spia) == 1) { + if (MyMeteo == null) { + MyMeteo = new frmMeteo(this, idPuntoCassa, true); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(300, LargControlli); + Integer h = CalcolaLarghezzaAltezza(70, AltControlli); + + MyMeteo.setSize(w, h); + MyMeteo.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyMeteo.setVisible(true); + } + } + + } + private void resizeRules(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_resizeRules + resize(); + }//GEN-LAST:event_resizeRules + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if (tblLista.getSelectedRow() > 0) { + tblLista.setRowSelectionInterval(tblLista.getSelectedRow() - 1, tblLista.getSelectedRow() - 1); + tblLista.scrollRectToVisible(new Rectangle(tblLista.getCellRect(tblLista.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnDuplicaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnDuplicaActionPerformed + // TODO add your handling code here: + if (tblLista.getSelectedRow() >= 0) { + MyTableModel model = (MyTableModel) tblLista.getModel(); + Object row[] = model.getRow(tblLista.getSelectedRow()); + Boolean èComposizione = false; + if (Long.parseLong(row[5].toString()) == 0L) { + èComposizione = true; + } + if (èComposizione) { + JOptionPane.showOptionDialog(this, "Composizione già presente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + return; + } else { + + model.addRow(row); + tblLista.setRowSelectionInterval(model.getRowCount() - 1, model.getRowCount() - 1); + tblLista.setModel(model); + + ControllaCompleti(model); + ControllaExtra(model); + SommaColonne(model); + } + } + }//GEN-LAST:event_jbtnDuplicaActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if (tblLista.getSelectedRow() < tblLista.getRowCount() - 1) { + tblLista.setRowSelectionInterval(tblLista.getSelectedRow() + 1, tblLista.getSelectedRow() + 1); + tblLista.scrollRectToVisible(new Rectangle(tblLista.getCellRect(tblLista.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnGiuActionPerformed + + private void jbtnStampaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnStampaActionPerformed + +// Chiudi(); +// Stampa(); + + + Boolean ok= MyInsert("UPDATE PARAMETRI set valore='NO' where chiave='FlagDownloadInCorso'"); + if (ok){ + JOptionPane.showOptionDialog(this, "Operazione correttamente eseguita.", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null); + }else { + JOptionPane.showOptionDialog(this, "Errore nell'aggiornamento del parametro!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + } + }//GEN-LAST:event_jbtnStampaActionPerformed + private void CancellaComposizioni() { + try { + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); + ClearTable(model1); + } catch (Exception e) { + } + } + private void jbtnEliminaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEliminaActionPerformed + CancellaComposizioni(); + MyTableModel model = (MyTableModel) tblLista.getModel(); + Integer Riga = tblLista.getSelectedRow(); + if (Riga >= 0) { + model.deleteRow(Riga); + //ripristino i prezzi + for (Integer i = 0; i < model.getRowCount(); i++) { + model.setValueAt(model.getValueAt(i, ColImporto2), i, ColImporto); + } + //doLayout(); + if (tblLista.getRowCount() > 0) { + if (Riga > 0) { + tblLista.setRowSelectionInterval(Riga - 1, Riga - 1); + } else { + tblLista.setRowSelectionInterval(0, 0); + } + } + + ControllaCompleti(model); + ControllaExtra(model); + SommaColonne(model); + + //spengo altri togglebutton + for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { + JToggleButton bt = (JToggleButton) this.pnlProdotti.getComponent(y); + bt.setSelected(false); + } + if (model.getRowCount() <= 0) { + jbtnSu.setEnabled(false); + jbtnGiu.setEnabled(false); + jbtnElimina.setEnabled(false); + jbtnAnnulla.setEnabled(false); + //jbtnStampa.setEnabled(false); + jbtnDuplica.setEnabled(false); + + } + doLayout(); + } + + }//GEN-LAST:event_jbtnEliminaActionPerformed + + private void jbtnChiudiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnChiudiActionPerformed + + if (VerificaPrenotazioni()){ + Chiudi(); + } + + + }//GEN-LAST:event_jbtnChiudiActionPerformed + + private boolean VerificaPrenotazioni() { + boolean ok=true; + if (idTessera > 0L && idPrenotazione>0L) { + MyTableModel model = (MyTableModel) tblLista.getModel(); + StringBuilder ElencoIdProdotti = new StringBuilder(); + for (int i = model.getRowCount() - 1; i >= 0; i--) { + Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + if (idCateg != 0L) { + ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); + ElencoIdProdotti.append(","); + } + } + ok=ControllaDiscrepanzePrenotazioni(ElencoIdProdotti.toString()); + AggiornaPrenotazioni(ElencoIdProdotti.toString()); + } + return ok; + } + private String GetNumeroTessera() { + MyApplication MyA = new MyApplication(); + String nTessera = ""; + try { + + MyA.idTesseraA = ""; + String[] listReader; + + listReader = MyA.SC.listReaders(); + MyA.SC.setReader(listReader[0]); + + MyA.SC.connect("T=1"); + MyA.SC.getCurrentCardATR(); + + String nTess = ""; + MyA.sendAPDU(this, "d000", "00", "A4", "00", "00", "02", ""); + MyA.sendAPDU(this, "d100", "00", "A4", "00", "00", "02", ""); + MyA.sendAPDU(this, "d101", "00", "A4", "00", "00", "02", ""); + String[] CF = MyA.sendAPDU(this, "", "00", "B0", "00", "00", "00", "140").split("\\|"); + + MyA.sendAPDU(this, "3f00", "00", "A4", "00", "00", "02", ""); + MyA.sendAPDU(this, "1000", "00", "A4", "00", "00", "02", ""); + MyA.sendAPDU(this, "1003", "00", "A4", "00", "00", "02", ""); + nTess = MyA.sendAPDU(this, "", "00", "B0", "00", "00", "00", "14"); + + MyA.SC.disconnect(); + if (CF.length > 1) { + //CodFisLetto = CF[0]; + //ScadenzaLetta = MyA.AggiustaDateTessera(CF[1]); + + nTessera = nTess; + //jTxtDatiTessera.setText("Cod. Fis.: " + CodFisLetto + "\n" + "Scadenza: " + ScadenzaLetta + "\n" + "N° Tessera: " + nTessera); + + } + } catch (Exception ex) { + //JOptionPane.showMessageDialog(this, ex.getMessage(),"Read Card Exception",JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "Card Reader non collegato o errore di lettura!", "jBtnReadCardActionPerformed", JOptionPane.ERROR_MESSAGE); + + } finally { + + return nTessera; + } + + } + private void formWindowDeiconified(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowDeiconified + // TODO add your handling code here: + resize(); + }//GEN-LAST:event_formWindowDeiconified + private void Tastiera2(java.awt.event.MouseEvent evt) { + MyApplication MyA = new MyApplication(); + if (jChLogin.isSelected() == false) { + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Rectangle pnl = pnlLogin.getBounds(); + + Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + } + } + } + } + + //java.awt.event.FocusEvent + private void Tastiera2(java.awt.event.FocusEvent evt) { + MyApplication MyA = new MyApplication(); + if (jChLogin.isSelected() == false) { + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Rectangle pnl = pnlLogin.getBounds(); + Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + } + } + } + } + private void jbtnEsciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEsciActionPerformed + Object[] options = {"Sì", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi chiusura sessione?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); + if (Integer.parseInt(selectedValue.toString()) != 0) { + return; + } else { + + pnlErrore.setVisible(false); + pnlLogin.setVisible(true); + pnlTop.setVisible(false); + pnlProdotti.setVisible(false); + utenteLoggato = ""; + idAccount = 0L; + lblUtenteLoggato.setText("[Nessun Utente Connesso]"); + lblInfo.setText("[Info Turno]"); + lblInfo2.setText("[Info Incassi]"); + txtPassword.setEnabled(true); + txtUsername.setEnabled(true); + btnLogin.setEnabled(true); + pnlCategorie.removeAll(); + pnlProdotti.removeAll(); + AddRemoveKeyDispatcher(false); + jChLoginActionPerformed(null); + Azzera(); + StatoAttivoNonLoggato(); + } +// idTessera=0L; +// idProfiloTariffario=0L; +// idModoPagamento=0L; +// CassaAperta=false; +// txtTotaleCassa.setText(""); +// txtTotalePunti.setText(""); +// +//// pnlCategorie.setVisible(false); +//// pnlProdotti.setVisible(false); +//// AbilitaPulsanti(pnlCategorie, false); +//// AbilitaPulsanti(pnlProdotti, false); +//// pnlCategorie.setVisible(true); +//// pnlProdotti.setVisible(true); +// +// jTxtTessera.setText(""); +// pnlProdotti.removeAll(); +// pnlProdotti.repaint(); +// lblCategoria.setText(""); +// lblCognome.setText(""); +// lblNome.setText(""); +// lblNascita.setText(""); +// lblMatricola.setText(""); +// lblAzienda.setText(""); +// lblConvenzione.setText(""); +// lblFascia.setText(""); +// +// jBtnStorno.setEnabled(false); +// +// MyTableModel model=(MyTableModel)tblLista.getModel(); +// for (int i = model.getRowCount() - 1; i >= 0; i--) { +// model.deleteRow(i); +// +// } +// +// MyTableModel model2 = (MyTableModel) tblLista1.getModel(); +// for (int i = model2.getRowCount() - 1; i >= 0; i--) { +// model2.deleteRow(i); +// } + }//GEN-LAST:event_jbtnEsciActionPerformed + + private void jBtnStornoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnStornoActionPerformed + ApriStorno(false); + + }//GEN-LAST:event_jBtnStornoActionPerformed + + private void ApriStorno(Boolean DaPassaggi) { + frmStorno MyD = new frmStorno(this, idTessera, idPuntoCassa, imgPath, DaPassaggi); + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(550, LargControlli); + Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + + MyD.setSize(w, h); + MyD.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); + } + private void jBtnprodottiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnprodottiActionPerformed + frmProdotti MyD = new frmProdotti(this, imgPath); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(550, LargControlli); + Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + + MyD.setSize(w, h); + MyD.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); + }//GEN-LAST:event_jBtnprodottiActionPerformed + + private void SelezionaTipoPagamento(int idTipo) { + /* + if(idModoPagamento==0L || idModoPagamento==2L){ + ClickContanti(); + return; + } + if(idModoPagamento==1L){ + ClickTicket(); + return; + } + + if(CercaTestoModoPagamento().equalsIgnoreCase("A scalare") || CercaTestoModoPagamento().equalsIgnoreCase("Ticket")){ + ClickContanti(); + return; + } + if(CercaTestoModoPagamento().equalsIgnoreCase("Contanti")){ + ClickTicket(); + return; + } + */ + String Tipo = SetModoPagamento(idTipo); + /* + if (CassaAperta == false) { + CassaAperta = true; + idProfiloTariffario = 0L; + idTessera = 0L; + AbilitaPulsanti(pnlCategorie, true); + AbilitaPulsanti(pnlProdotti, true); + CaricaCompleti(); + }*/ + + lblTipoPagamento.setText(Tipo); + //PulsantiModoPagamento(); + if (Tipo.equalsIgnoreCase("A scalare") && jTxtTessera.getText().length() > 0 ) { + //if (Tipo.equalsIgnoreCase("A scalare") && jTxtTessera.getText().length()>0 && FlagPrecaricaLista==false) { + VerificaSaldo(jTxtTessera.getText()); + + } + } + + public void ClickModoPagamento(String ModoPagamento) { + if (CassaAperta == false) { + CassaAperta = true; + idProfiloTariffario = 0L; + idTessera = 0L; + + //AbilitaPulsanti(pnlCategorie, true); + //AbilitaPulsanti(pnlProdotti, true); +// CaricaCompleti(); + + } + + lblResiduo.setText("[...]"); + lblSaldo.setText("[...]"); + + lblTipoPagamento.setText(ModoPagamento); + //PulsantiModoPagamento(); + } +// public void ClickTicket(){ +// if (CassaAperta == false) { +// CassaAperta = true; +// idProfiloTariffario = 0L; +// idTessera = 0L; +// AbilitaPulsanti(pnlCategorie, true); +// AbilitaPulsanti(pnlProdotti, true); +// CaricaCompleti(); +// } +// //AggiungImmagini(jBtnTicket,"Contanti.png",50,50); +// +//// idModoPagamento = 2L; +//// String Tipo = MySelect("Select Nome from Tipi_Pagamenti where id=2", "Nome"); +//// lblTipoPagamento.setText(Tipo); +//// //jBtnCarta.setEnabled(true); +// } + + public void ClickCarta() { + if (SaldoAcquisti(0.0) == false && ConsentiCredito == false) { + JOptionPane.showOptionDialog(this, "Saldo tessera insufficiente!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + return; + + } + if (CassaAperta == true) { + //idModoPagamento = 0L; + lblResiduo.setText("[...]"); + //String Tipo = MySelect("Select Nome from Tipi_Pagamenti where id=0", "Nome"); + SetModoPagamento("A scalare"); + String Tipo = CercaTestoModoPagamento(); + lblTipoPagamento.setText(Tipo); + //PulsantiModoPagamento(); + } + } + + private void AggiornaDB(Boolean Messaggio) { + try { + Boolean Aggiorna = false; + if (Messaggio) { + Object[] options = {"Sì", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "Confermi aggiornamento del database locale?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); + if (Integer.parseInt(selectedValue.toString()) != 0) { + return; + } else { + Aggiorna = true; + } + } else { + Aggiorna = true; + } + if (Aggiorna) { + + MyProgress = new frmProgress(this); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(300, LargControlli); + Integer h = CalcolaLarghezzaAltezza(100, AltControlli); + MyProgress.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + MyProgress.setResizable(false); + //MyD.getRootPane().setWindowDecorationStyle(JRootPane.NONE); + MyProgress.setTitle("Aggiornamento Database..."); + MyProgress.setSize(w, h); + MyProgress.setLocationRelativeTo(null); + MyProgress.setVisible(true); + MyProgress.repaint(); + + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + + try { + //jBtnDB.setEnabled(false); + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + String plsql = "begin lancia_aggiorna_tabelle('S'); end;"; + CallableStatement st = dbConnection.prepareCall(plsql); + st.execute(); + st.close(); + dbConnection.close(); + //jBtnDB.setEnabled(true); + PuntoCassa.this.MyProgress.dispose(); + //12/09/2016 + if (PuntoCassa.this.pnlLogin.isVisible() == false) { + //23-12-15 + + PuntoCassa.this.ImpostaAmbiente(); + + PuntoCassa.this.setEnabled(true); + } + //SELECT esito FROM esiti where id = (select max(id) from esiti); + String Esito = MySelect("SELECT esito FROM esiti where id = (select max(id) from esiti)", "esito"); + JOptionPane.showOptionDialog(PuntoCassa.this, Esito, "Aggiornamento Database", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); + } catch (Exception e) { + JOptionPane.showMessageDialog(PuntoCassa.this, "Errore " + e.getMessage()); + } + } + }); + } + } catch (Exception e) { + JOptionPane.showMessageDialog(this, "Errore " + e.getMessage()); + + } + } + private void txtTotaleCassaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTotaleCassaActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTotaleCassaActionPerformed + + private void jBtnReadCardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnReadCardActionPerformed + // TODO add your handling code here: + jTxtTessera.setText(""); + + String nTessera = GetNumeroTessera(); + jTxtTessera.setText(nTessera); + }//GEN-LAST:event_jBtnReadCardActionPerformed + + private void jTxtTesseraFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTxtTesseraFocusGained + MyApplication MyA = new MyApplication(); + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + + Rectangle pnl = pnlLogin.getBounds(); + Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + } + } + }//GEN-LAST:event_jTxtTesseraFocusGained + + private void btnImpostaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImpostaClienteActionPerformed + frmCerca MyD = new frmCerca(this, jTxtTessera, imgPath, "", FlagMostraDataDiNascita); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(650, LargControlli); + Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + + MyD.setSize(w, h); + MyD.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); + + //CercaTessera(); + }//GEN-LAST:event_btnImpostaClienteActionPerformed + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed + MyTableModel model = (MyTableModel) tblLista.getModel(); + if (model.getRowCount() > 0) { + Object[] options = {"Sì", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "Desideri annullare tutte le righe?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); + if (Integer.parseInt(selectedValue.toString()) != 0) { + return; + } else { + Annulla(); + doLayout(); + } + } + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void Annulla() { + try { + MyTableModel model = (MyTableModel) tblLista.getModel(); + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); + ClearTable(model); + ClearTable(model1); + jbtnSu.setEnabled(false); + jbtnGiu.setEnabled(false); + jbtnElimina.setEnabled(false); + jbtnAnnulla.setEnabled(false); + //jbtnStampa.setEnabled(false); + jbtnDuplica.setEnabled(false); + SommaColonne(model); + + if(idTessera == 0L){ + jbtnChiudi.setEnabled(false); + }else{ + jbtnChiudi.setEnabled(true); + } + + + //spengo altri togglebutton + for (Integer y = 0; y < this.pnlProdotti.getComponentCount(); y++) { + JToggleButton bt = (JToggleButton) this.pnlProdotti.getComponent(y); + bt.setSelected(false); + } + + + } catch (Exception e) { + } + + } + private void jBtnAsportoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAsportoActionPerformed + if (jBtnAsporto.isSelected()) { + AggiungImmagini(jBtnAsporto, "da asporto.jpg", 50, 50); + } else { + AggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); + } + }//GEN-LAST:event_jBtnAsportoActionPerformed + + private void txtTotalePuntiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTotalePuntiActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTotalePuntiActionPerformed + + private void jBtnMovimentiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnMovimentiActionPerformed + frmMovimenti MyD = new frmMovimenti(this, idTessera, idPuntoCassa, imgPath); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(680, LargControlli); + Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + + MyD.setSize(w, h); + MyD.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); + }//GEN-LAST:event_jBtnMovimentiActionPerformed + + private void jBtnBuoniActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnBuoniActionPerformed + //Display("Tes 1234567890 Fa C1","Importo","E 1,55"); + frmCerca MyD = new frmCerca(this, jTxtTessera, imgPath, "BP", FlagMostraDataDiNascita); + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(650, LargControlli); + Integer h = CalcolaLarghezzaAltezza(250, AltControlli); + + MyD.setSize(w, h); + MyD.setLocationRelativeTo(null); + + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); + + }//GEN-LAST:event_jBtnBuoniActionPerformed + + private void jBtnDB1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnDB1ActionPerformed + // TODO add your handling code here: + //jBtnDBActionPerformed(null); + AggiornaDB(true); + }//GEN-LAST:event_jBtnDB1ActionPerformed + + private void jChLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChLoginActionPerformed + // TODO add your handling code here: + txtUsername.setEnabled(!jChLogin.isSelected()); + txtPassword.setEnabled(!jChLogin.isSelected()); + btnLogin.setEnabled(!jChLogin.isSelected()); + AddRemoveKeyDispatcher(jChLogin.isSelected()); + }//GEN-LAST:event_jChLoginActionPerformed + + private void btnTerminaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTerminaActionPerformed + // TODO add your handling code here: + //System.exit(0); + exitForm(null); + }//GEN-LAST:event_btnTerminaActionPerformed + + private void txtPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtPasswordMouseClicked + Tastiera2(evt); + }//GEN-LAST:event_txtPasswordMouseClicked + + private void txtPasswordFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPasswordFocusGained + Tastiera2(evt); + // MyApplication MyA = new MyApplication(); + // if (MyA.TastieraVideo) { + // if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + // MyA.UltimoTxt = " "; + // } else { + // MyA.UltimoTxt = evt.getComponent().toString(); + // + // Rectangle pnl = pnlLogin.getBounds(); + // Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + // } + // } + }//GEN-LAST:event_txtPasswordFocusGained + + private void txtUsernameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtUsernameMouseClicked + Tastiera2(evt); + }//GEN-LAST:event_txtUsernameMouseClicked + + private void txtUsernameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtUsernameFocusGained + Tastiera2(evt); + + // MyApplication MyA = new MyApplication(); + // if (MyA.TastieraVideo) { + // if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + // MyA.UltimoTxt = " "; + // } else { + // MyA.UltimoTxt = evt.getComponent().toString(); + // + // Rectangle pnl = pnlLogin.getBounds(); + // Tastiera((JTextField) evt.getComponent(), pnl.x, pnl.y); + // } + // } + }//GEN-LAST:event_txtUsernameFocusGained + + private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed + if (Turno()) { + + String sql, pwd; + int counter = 0; + int hash = 0; + Statement st; + ResultSet rs; + + pwd = new String(); + sql = new String(); + + // ======================================================================= + // *** Verifica la correttezza delle credenziali inserite - Account + // ======================================================================= + sql = "SELECT count(*) as counter FROM accounts WHERE username = '" + this.txtUsername.getText() + "'"; + // try { + // Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + // st = dbConnection.createStatement(); + // rs = st.executeQuery(sql); + // while (rs.next()) { + // counter = rs.getInt("counter"); + // } + MyApplication MyA = new MyApplication(); + counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); + + // ==================================================================== + // ** Verifica la password + // ==================================================================== + if (counter == 1) { + Encoding en = new Encoding(); + pwd = txtPassword.getText(); + sql = "SELECT id || '|' || id_Stato as res FROM accounts WHERE username = '" + this.txtUsername.getText() + "' " + + "and password = '" + en.encodeString(pwd) + "'"; + String[] El = MyA.MySelect(this, sql, "res").split("\\|"); + if (MyA.isNumeric(El[0])) { + idAccount = Long.parseLong(El[0]); + if (Integer.parseInt(El[1]) == 2) { + String Messaggio = MyA.MySelect(this, "Select Descrizione from Stati_Accounts where id=" + El[1], "descrizione"); + JOptionPane.showMessageDialog(this, Messaggio + "."); + return; + + } + } else { + idAccount = 0L; + } + + if (idAccount > 0L) { + // sql = "select a.id as id_account from accounts a, profili p where p.id_account = a.id and p.id_ruolo = 10000000004" + // + " and a.username = '" + txtUsername.getText() + "' and a.password = '" + en.encodeString(pwd) + "'"; + // try { + sql = "SELECT count(*) as Counter FROM profili p WHERE p.id_account = " + idAccount + " AND p.id_ruolo IN (3, 10000000004)"; + counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); + // st = dbConnection.createStatement(); + // rs = st.executeQuery(sql); + // while (rs.next()) { + // idAccount = rs.getLong("id_account"); + // counter = 1; + // } + // } catch (SQLException e) { + // JOptionPane.showMessageDialog(this, "Errore DB ['" + sql + "']"); + // + // } + + // da modificare<<<<<<<<<<<<<<<<<<<<<<<<<<< + + if (counter >0){ + ImpostaAmbiente(); + txtUsername.setText(""); + txtPassword.setText(""); + StatoAttivoLoggato(); + + VerificaAggiornamentoDB(); + + } else { + JOptionPane.showMessageDialog(this, "L'utente non dispone dei privilegi per l'utilizzo del modulo cassa."); + } + + } else { + JOptionPane.showMessageDialog(this, "Password errata."); + } + + // sql = "SELECT count(*) as counter FROM accounts WHERE username = '" + // + txtUsername.getText() + "' AND password = '" + // + en.encodeString(pwd) + "'"; + // -------------------------------------------------------------- + // *** Errore SQL in verifica password + // -------------------------------------------------------------- + // ================================================================= + // ** Caso account sconosciuto + // ================================================================= + } else { + JOptionPane.showMessageDialog(this, "Account sconosciuto."); + } + + // rs.close(); + // st.close(); + // dbConnection.close(); + // + // } catch (SQLException e) { + // // -------------------------------------------------------------- + // // *** Errore SQL in verifica account + // // -------------------------------------------------------------- + // JOptionPane.showMessageDialog(this, "Errore DB ['" + sql + "']"); + // } + } else { + JOptionPane.showMessageDialog(this, "Impossibile eseguire il Login al sistema:\nNessun Turno Attivo!"); + } + }//GEN-LAST:event_btnLoginActionPerformed + //a scalare + private void jTBP0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBP0ActionPerformed + if (jTBP0.isSelected()) { + try{ + jTBP0.setEnabled(false); + jTBP1.setSelected(false); + jTBP1.setEnabled(true); + jTBP2.setSelected(false); + jTBP2.setEnabled(true); + jTBP3.setSelected(false); + jTBP3.setEnabled(true); + SelezionaTipoPagamento(0); + + MyTableModel modelX = (MyTableModel) tblLista.getModel(); + SommaColonne(modelX); + + }catch(Exception ex){} + + } + }//GEN-LAST:event_jTBP0ActionPerformed + //contanti + private void jTBP1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBP1ActionPerformed + + if (jTBP1.isSelected()) { + jTBP1.setEnabled(false); + jTBP0.setSelected(false); + jTBP0.setEnabled(true); + jTBP2.setSelected(false); + jTBP2.setEnabled(true); + jTBP3.setSelected(false); + jTBP3.setEnabled(true); + SelezionaTipoPagamento(1); + } + }//GEN-LAST:event_jTBP1ActionPerformed + //ticket + private void jTBP2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBP2ActionPerformed + if (jTBP2.isSelected()) { + jTBP2.setEnabled(false); + jTBP1.setSelected(false); + jTBP1.setEnabled(true); + jTBP0.setSelected(false); + jTBP0.setEnabled(true); + jTBP3.setSelected(false); + jTBP3.setEnabled(true); + SelezionaTipoPagamento(2); + } + }//GEN-LAST:event_jTBP2ActionPerformed + //differito + private void jTBP3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTBP3ActionPerformed + if (jTBP3.isSelected()) { + jTBP3.setEnabled(false); + jTBP1.setSelected(false); + jTBP1.setEnabled(true); + jTBP2.setSelected(false); + jTBP2.setEnabled(true); + jTBP0.setSelected(false); + jTBP0.setEnabled(true); + SelezionaTipoPagamento(3); + } + }//GEN-LAST:event_jTBP3ActionPerformed + + private void Tastiera(JTextField jTxt, Integer MyX, Integer MyY) { + + MyKeyBoard myk = new MyKeyBoard(this, false); + myk.txt = jTxt; + myk.Parent = this; + Rectangle s = this.getBounds(); + Rectangle s2 = jTxt.getBounds(); + Integer l = s.x + s2.x + MyX; + if (l + 800 > s.x + s.width) { + l = s.x + s.width - 800; + } + myk.setBounds(l, s.y + s2.y + 60 + MyY, 800, 300); + myk.setVisible(true); + + } + + private Boolean VerificaSaldo(String NTessera) { + /*Double Tot =0.0; + MyTableModel model = (MyTableModel) tblLista.getModel(); + for (int i = model.getRowCount() - 1; i >= 0; i--) { + Tot=Tot+Double.parseDouble(model.getValueAt(i, ColImporto).toString()); + }*/ + Boolean OK = false; + + //andare su viewtessere +// String QuerySaldo="select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + +// " from tessere t, utenti u, categorie_utenti c, convenzioni_fasce cf" + +// " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + +// " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; + String QuerySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" + + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; + + String[] SaldoMinimo = MySelect(QuerySaldo, "saldi").split("\\|"); + Double Saldo = 0.0; + if (SaldoMinimo.length > 0 && SaldoMinimo[0].length() > 0) { + Saldo = Double.parseDouble(SaldoMinimo[0].replace(",", ".")); + } + Double SaldoAlert = 0.0; + if (SaldoMinimo.length > 1 && SaldoMinimo[1].length() > 0) { + SaldoAlert = Double.parseDouble(SaldoMinimo[1].replace(",", ".")); + } + Double SaldoStop = 0.0; + if (SaldoMinimo.length > 2 && SaldoMinimo[2].length() > 0) { + SaldoStop = Double.parseDouble(SaldoMinimo[2].replace(",", ".")); + } + SaldoMinimoStop = SaldoStop; + String Punti = ""; + if (SaldoMinimo.length >= 4) { + Punti = SaldoMinimo[3]; + } + + DecimalFormat df2 = new DecimalFormat("#,###,###,##0.00"); + lblSaldo.setText("? " + df2.format(Saldo)); + + //24-01-2020-------------------------- + MyTableModel model = (MyTableModel) tblLista.getModel(); + Double T = model.Somma(ColImporto); + MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + if (model2.getRowCount() > 0) { + T = T + model2.Somma(1); + } + //--------------------------- + lblResiduo.setText("? " + df2.format(Saldo-T)); + lblPunti.setText(Punti); + //String Tipo=MySelect("Select Nome from Tipi_Pagamenti where id=0", "Nome"); + String Tipo = CercaTestoModoPagamento(); + lblTipoPagamento.setText(Tipo); + //PulsantiModoPagamento(); + + //21/12/2016 if (Gratuita_Residue <= 0) {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + if (Gratuita_Residue <= 0 && (FLAG_BONUS == 0 || Bonus_Residui <= 0)) { + if ((Saldo-CalcolaTotale()) <= SaldoStop) { + //JOptionPane.showMessageDialog(this, "Saldo insufficiente per l'acquisto!", "Saldo", JOptionPane.ERROR_MESSAGE); + /*frmPagamento MyD = new frmPagamento(this,idPuntoCassa,idModoPagamento); + + this.setEnabled(false); + Integer w = CalcolaLarghezzaAltezza(490, LargControlli); + Integer h = CalcolaLarghezzaAltezza(142, AltControlli); + + MyD.setSize(w, h); + + MyD.setLocationRelativeTo(null); + //MyD.setLocation((this.getWidth() - this.getLocation().y) / 2, (this.getHeight() - this.getLocation().x) / 2); + MyD.setVisible(true); */ + //pnlPagamento ModoPag=new pnlPagamento(); + //JOptionPane.showMessageDialog(null,ModoPag,"Scegli modo pagamento",JOptionPane.); + + //04-02-2019 + /* + if (ConsentiCredito == true) { + if (MessaggioSaldoUnaVolta == false) { + if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + MessaggioSaldoUnaVolta = true; + return true; + } + } else { + return true; + } + } + + + MyDialog Dialog = new MyDialog(this, "Scegli modalità pagamento...", true); + Integer w = CalcolaLarghezzaAltezza(490, LargControlli); + Integer h = CalcolaLarghezzaAltezza(142, AltControlli); + + Dialog.setSize(w, h); + + Dialog.setLocationRelativeTo(null); + Dialog.setVisible(true); + + //if (idModoPagamento == 0) { + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + OK = false; + } else { + OK = true; + } + */ + + //31-10-2019 se lista precaricata e saldo <0 devo chudere + if (StoCalcolando == false) { + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + if ((Saldo - CalcolaTotale()) < 0) { + JOptionPane.showMessageDialog(this, "Saldo insufficiente!", "Saldo", JOptionPane.OK_OPTION); + LogTessera(); + Azzera(); + return true; + } + } + } + OK = true; + } else if (Saldo <= SaldoAlert) { + //JOptionPane.showMessageDialog(this, "Ultimo passaggio consentito con il saldo rilevato sulla tessera!", "Saldo Alert", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "Saldo ridotto, potrebbero non essere disponibili tutti i prodotti!", "Saldo Alert", JOptionPane.ERROR_MESSAGE); + + OK = true; + + } else { + OK = true; + } + } + return OK; + } + + private String CercaTestoModoPagamento() { + String Testo = ""; + String[] El = ModiPagamento.toString().split("\\|"); + for (int i = 0; i < El.length; i++) { + String[] t = El[i].split(";"); + if (t[0].equalsIgnoreCase(idModoPagamento.toString())) { + Testo = t[1]; + break; + } + } + return Testo; + } + + private void SetModoPagamento(String Modo) { + + String[] El = ModiPagamento.toString().split("\\|"); + for (int i = 0; i < El.length; i++) { + String[] t = El[i].split(";"); + if (t[1].equalsIgnoreCase(Modo)) { + idModoPagamento = Long.parseLong(t[0]); + break; + } + } + //PulsantiModoPagamento(); + } + + private String SetModoPagamento(Integer Tipo) { + String Testo = ""; + if (ModiPagamento.toString().length() > 5) { + String[] El = ModiPagamento.toString().split("\\|"); + int i = Tipo; + //for (int i=0;i<El.length;i++){ + String[] t = El[i].split(";"); + Testo = t[1]; + idModoPagamento = Long.parseLong(Tipo.toString()); + lblResiduo.setText("[...]"); + lblSaldo.setText("[...]"); + + } + //} + return Testo; + } +// private String SetModoPagamentoSuccessivo(){ +// String Testo=""; +// String [] El=ModiPagamento.toString().split("\\|"); +// for (int i=0;i<El.length;i++){ +// String[] t=El[i].split(";"); +// if(t[0].equalsIgnoreCase(idModoPagamento.toString())){ +// String[] t2; +// if(i==El.length-1){ +// t2=El[0].split(";"); +// +// }else{ +// t2=El[i+1].split(";"); +// } +// idModoPagamento=Long.parseLong(t2[0]); +// Testo=t2[1]; +// lblResiduo.setText("[...]"); +// lblSaldo.setText("[...]"); +// PulsantiModoPagamento(); +// break; +// } +// +// } +// return Testo; +// } + + private void PulsantiModoPagamento() { + switch (Integer.parseInt(idModoPagamento.toString())) { + case 0: + jTBP0.setEnabled(true); + jTBP0.setSelected(true); + jTBP0ActionPerformed(null); + if (UnSoloTipoPagamento) { + jTBP1.setEnabled(false); + jTBP2.setEnabled(false); + jTBP3.setEnabled(false); + } + break; + case 1: + jTBP1.setEnabled(true); + jTBP1.setSelected(true); + jTBP1ActionPerformed(null); + if (UnSoloTipoPagamento) { + jTBP0.setEnabled(false); + jTBP2.setEnabled(false); + jTBP3.setEnabled(false); + } + break; + case 2: + jTBP2.setEnabled(true); + jTBP2.setSelected(true); + jTBP2ActionPerformed(null); + if (UnSoloTipoPagamento) { + jTBP1.setEnabled(false); + jTBP0.setEnabled(false); + jTBP3.setEnabled(false); + } + break; + case 3: + jTBP3.setEnabled(true); + jTBP3.setSelected(true); + jTBP3ActionPerformed(null); + if (UnSoloTipoPagamento) { + jTBP1.setEnabled(false); + jTBP2.setEnabled(false); + jTBP0.setEnabled(false); + } + break; + } + } + + private void Chiudi() { + + //04-02-2019--------------------------------------------- + MyTableModel model = (MyTableModel) tblLista.getModel(); + if (model.getRowCount() > 0) { + String NTessera = jTxtTessera.getText(); + + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + + String QuerySaldo = "select t.saldo || '|' || cf.saldo_minimo_alert || '|' || cf.saldo_minimo_stop || '|' || t.punti || '|' as saldi " + + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" + + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; + + String[] SaldoMinimo = MySelect(QuerySaldo, "saldi").split("\\|"); + Double Saldo = 0.0; + String Residuo = lblResiduo.getText().trim().replace("?", ""); + if (Residuo.equalsIgnoreCase("[...]")) { + Residuo = "0"; + } + Residuo = Residuo.replace(".", ""); + Residuo = Residuo.replace(",", "."); + Saldo = Double.parseDouble(Residuo); + + Double SaldoAlert = 0.0; + if (SaldoMinimo.length > 1 && SaldoMinimo[1].length() > 0) { + SaldoAlert = Double.parseDouble(SaldoMinimo[1].replace(",", ".")); + } + + if (Gratuita_Residue <= 0 && (FLAG_BONUS == 0 || Bonus_Residui <= 0)) { + if (Saldo <= SaldoAlert) { + //Boolean ChiediModoPagamento = false; + if (ConsentiCredito == true) { + if (MessaggioSaldoUnaVolta == false) { + if (JOptionPane.showConfirmDialog(null, "Saldo insufficiente. Vuoi autorizzare comunque la transazione?", "Saldo", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + MessaggioSaldoUnaVolta = true; + } else { + return; + } + } + } else { + //ChiediModoPagamento = true; + } + } + } + /* + if (ChiediModoPagamento) { + MyDialog Dialog = new MyDialog(this, "Scegli modalità pagamento...", true); + Integer w = CalcolaLarghezzaAltezza(490, LargControlli); + Integer h = CalcolaLarghezzaAltezza(142, AltControlli); + + Dialog.setSize(w, h); + + Dialog.setLocationRelativeTo(null); + Dialog.setVisible(true); + + //da modificare<<<<<<<<<<<<<<<<<<<<<<< + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + return; + } else { + //OK = true; + } + }*/ + //-------------------------------------------------------- + } else { + +//Pagamento non A Scalare + String QuerySaldo = "select t.saldo " + + " from tessere t, utenti u, categorie_utenti c, categorie_utenti_fasce cf" + + " where t.numero = '" + NTessera + "' and t.id_utente = u.id" + + " and u.id_categoria = c.id and cf.id_categoria_utenti = c.id"; + + Double Saldo = Double.parseDouble(MySelect(QuerySaldo, "saldo")); + Double CostoPasto = Double.parseDouble(txtTotaleCassa.getText().replace("?", "").trim().replace(",", ".")); + if (Saldo > CostoPasto) { + Object[] options = {"A Scalare", "Contanti"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "Attenzione, c'è saldo sufficiente sulla tessera,\nscegli la modalità di pagamento da utilizzare", "Modalità Pagamento", + JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); + if (Integer.parseInt(selectedValue.toString()) == 0) { + //if (JOptionPane.showConfirmDialog(null, "Attenzione, c'è saldo sufficiente sulla tessera, sicuro che vuoi pagare in contanti?", "Modalità Pagamento", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { + jTBP0.setSelected(true); + jTBP0ActionPerformed(null); +// Chiudi(); +// return; + } else { + jTBP1.setSelected(true); + jTBP1ActionPerformed(null); + + } + } + + } + } + Boolean SpiaProgressivo = false; + //MyTableModel model=(MyTableModel)tblLista.getModel(); + Date Adesso = new Date(); + String FlagPassaggioTessera = "0"; + if (PassaggioTessera) { + FlagPassaggioTessera = "1"; + } + /*Integer id=1; + id=MySelectInteger("Select max(id) as id from Acquisti", "id"); + id++;*/ + String Tessera = idTessera.toString(); + String FlagAsporto = "0"; + if (jBtnAsporto.isSelected()) { + FlagAsporto = "1"; + } + //if (idTessera==0L){Tessera="null";} + + //String Composizione=SpaziBianchi("",20,false); + //09-05-2019 + /* + for (int i = 0; i <model.getRowCount(); i++) { + if (Long.parseLong(model.getValueAt(i, 5).toString()) == 0L) { + Composizione=model.getValueAt(i, 0).toString(); + if (Composizione.length()>20){ + Composizione=Composizione.substring(0, 20); + } + Composizione=SpaziBianchi(Composizione,20,true); + break; + } + } + */ + String Composizione = SpaziBianchi("", 20, false); + MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + for (int i = 0; i < model2.getRowCount(); i++) { + String Completo = model2.getValueAt(i, 0).toString(); + String Pasto = ""; + if (Completo.length() > 0) { + String TT[] = Completo.split("]", -1); + if (TT.length > 0) { + Pasto = "Pasto:" + TT[0].replace("[", ""); + } + } + Composizione = SpaziBianchi(Pasto, 10, true); + break; + } + + //controllo passaggi + if (model.getRowCount() > 0) { + String ControlloPassaggi = "SELECT count(*) as passaggi FROM st_acquisti st INNER JOIN prodotti pr ON st.id_prodotto = pr.id WHERE pr.id_categoria = 0 AND trunc(st.data) = trunc(sysdate) AND st.id_tessera = " + idTessera + " AND st.id_turno=" + idTurno; + Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "passaggi"); + if (AbilitatoPassaggi > 0) { + AbilitatoPassaggi = AbilitatoPassaggi + 1; + if (JOptionPane.showConfirmDialog(null, "Sei sicuro di voler registrare il passaggio n° " + AbilitatoPassaggi + " sulla tessera " + jTxtTessera.getText() + "?", "Secondo Passaggio", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { + Azzera(); + AggiornaLabelInfo(); + return; + } + } + } + + if (idTessera > 0L) { + StringBuilder ElencoIdProdotti = new StringBuilder(); + for (int i = model.getRowCount() - 1; i >= 0; i--) { + Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + if (idCateg != 0L) { + //04/03/2022 non è possibile acquistare prodotti che non siano partedi una composizione +// String Imp1 = model.getValueAt(i, ColImporto).toString(); +// String Imp2 = model.getValueAt(i, ColImporto2).toString(); + String Vassoio = "1"; +// if (Imp1.equalsIgnoreCase(Imp2)) { +// Vassoio = "0"; +// } + MyInsert("Insert into Acquisti (id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)values(-1," + Tessera + "," + model.getValueAt(i, ColIDProdotto) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model.getValueAt(i, ColImporto) + "," + model.getValueAt(i, ColPunti) + "," + Progressivo + "," + idModoPagamento + "," + Vassoio + "," + idTurno + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + + AggiornaProgressivoPagamentiTurno(Double.parseDouble(model.getValueAt(i, ColImporto).toString())); + + ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); + ElencoIdProdotti.append(","); + //id++; + } + model.deleteRow(i); + SpiaProgressivo = true; + } + //MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + for (int i = model2.getRowCount() - 1; i >= 0; i--) { + String FlagGratuita = "0"; + String FlagBonus = "0"; + if (Gratuita_Residue > 0) {// && Gratuita_Residue>Gratuita_ResidueProg){ + FlagGratuita = "1"; + } else if (Bonus_Residui > 0) { + FlagBonus = "1"; + } + + MyInsert("Insert into Acquisti (id,id_Tessera,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)values(-1," + Tessera + "," + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model2.getValueAt(i, 1) + ",0," + Progressivo + "," + idModoPagamento + "," + idTurno + "," + FlagGratuita + "," + FlagBonus + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + AggiornaProgressivoPagamentiTurno(Double.parseDouble(model2.getValueAt(i, 1).toString())); + //id++; + model2.deleteRow(i); + SpiaProgressivo = true; + } + + } else { + StringBuilder ElencoIdProdotti = new StringBuilder(); + for (int i = model.getRowCount() - 1; i >= 0; i--) { + Long idCateg = Long.parseLong(model.getValueAt(i, ColCategoria).toString()); + if (idCateg != 0L) { + //04/03/2022 non è possibile acquistare prodotti che non siano partedi una composizione +// String Imp1 = model.getValueAt(i, ColImporto).toString(); +// String Imp2 = model.getValueAt(i, ColImporto2).toString(); + String Vassoio = "1"; +// if (Imp1.equalsIgnoreCase(Imp2)) { +// Vassoio = "0"; +// } + MyInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,flag_in_vassoio,id_Turno,flag_asporto,flag_passaggio_tessera)values(-1," + model.getValueAt(i, ColIDProdotto) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model.getValueAt(i, ColImporto) + "," + model.getValueAt(i, ColPunti) + "," + Progressivo + "," + idModoPagamento + "," + Vassoio + "," + idTurno + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + + AggiornaProgressivoPagamentiTurno(Double.parseDouble(model.getValueAt(i, ColImporto).toString())); + + ElencoIdProdotti.append(model.getValueAt(i, ColIDProdotto)); + ElencoIdProdotti.append(","); + //id++; + } + model.deleteRow(i); + SpiaProgressivo = true; + + } + + //MyTableModel model2 = (MyTableModel) tblLista1.getModel(); + for (int i = model2.getRowCount() - 1; i >= 0; i--) { + String FlagGratuita = "0"; + String FlagBonus = "0"; + if (Gratuita_Residue > 0) {// && Gratuita_Residue>Gratuita_ResidueProg){ + FlagGratuita = "1"; + } else if (FLAG_BONUS == 1 && Bonus_Residui > 0) { + FlagBonus = "1"; + } + + MyInsert("Insert into Acquisti (id,id_Prodotto,id_Punto_Cassa,Data,Importo,Punti,Num_Progressivo,id_Tipo_Pagamento,id_Turno,flag_gratuita,flag_bonus,flag_asporto,flag_passaggio_tessera)values(-1," + model2.getValueAt(i, 2) + "," + idPuntoCassa + "," + AggiustaDateOra(Adesso) + "," + model2.getValueAt(i, 1) + ",0," + Progressivo + "," + idModoPagamento + "," + idTurno + "," + FlagGratuita + "," + FlagBonus + "," + FlagAsporto + "," + FlagPassaggioTessera + ")"); + AggiornaProgressivoPagamentiTurno(Double.parseDouble(model2.getValueAt(i, 1).toString())); + model2.deleteRow(i); + SpiaProgressivo = true; + + } + + } + + //aggiorno progressivi------------- + if (SpiaProgressivo) { + Progressivo++; + ProgressivoGiorno++; + ProgressivoTurno++; + MyInsert("Update Progressivi set Prog_assoluto=" + Progressivo + ",prog_giorno=" + ProgressivoGiorno + ",prog_Turno=" + ProgressivoTurno + ",incasso_turno_contanti=" + ProgressivoContanti + ",incasso_turno_ticket=" + ProgressivoTicket + ",incasso_turno_scalare=" + ProgressivoScalare + ",incasso_turno_differito=" + ProgressivoDifferito + " where id_Punto_cassa=" + idPuntoCassa + " and id_turno=" + idTurno + " and data=" + AggiustaData(Adesso)); + + } + +// +// //controllo passaggi +// String ControlloPassaggi = "SELECT count(*) as passaggi FROM st_acquisti st INNER JOIN prodotti pr ON st.id_prodotto = pr.id WHERE pr.id_categoria = 0 AND trunc(st.data) = trunc(sysdate) AND st.id_tessera = " + idTessera + " AND st.id_turno=" + idTurno; +// Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "passaggi"); +// if (AbilitatoPassaggi > 1) { +//// JOptionPane.showMessageDialog(this, "Attenzione questo è il secondo passaggio nello stesso turno su questa cassa.", "Numero Passaggi", JOptionPane.INFORMATION_MESSAGE); +// Object[] options = {"Sì", "No"}; +// Object selectedValue =JOptionPane.showOptionDialog(this, "Sei sicuro di voler registrare il secondo passaggio sulla tessera " + Tessera + "?", "Secondo Passaggio", +// JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); +// if (Integer.parseInt(selectedValue.toString()) == 1) { +// Annulla(); +// Azzera(); +// return; +// } +// } + //aggiornamento 12-04-2019 + /* + String tp = lblTipoPagamento.getText().trim(); + if (tp.length() > 11) { + tp = tp.substring(0, 10); + } else { + tp = SpaziBianchi(tp, 11, true); + } + tp = tp + " E" + SpaziBianchi(txtTotaleCassa.getText().trim().replace("?", ""), 7, false); + + String Punti = lblPunti.getText(); + if (Punti.length() > 6) { + Punti = Punti.substring(0, 5); + } else { + Punti = SpaziBianchi(Punti, 6, false); + } + */ + String Residuo = lblResiduo.getText().replace("?", "").trim(); + if (Residuo.equalsIgnoreCase("[...]")) { + Residuo = "0"; + } + if (Residuo.length() > 6) { + Residuo = Residuo.substring(0, 5); + } else { + Residuo = SpaziBianchi(Residuo, 6, false); + } + + //Aggiornamento 12-04-2019 + //String Riga2 = "P " + Punti + " S E " + Residuo; + //Display(tp + Riga2, null); + Integer Bonus = 0; + if (FLAG_BONUS == 1 && Bonus_Residui > 0) { + Bonus = Bonus_Residui--; + //String Riga2 = " Saldo " + Residuo + " Bon. " + Bonus ; + //Display(Composizione + Riga2, null); + }//else{ + //String Riga2 = " Saldo " + Residuo ; + //Display(Composizione + Riga2, null); + //} + Composizione = SpaziBianchi(Composizione + "Bonus:" + Bonus, 20, true); + String Riga2 = "Saldo " + Residuo; + Display(Composizione + Riga2, null); + + timerDisplay.schedule(new TimerTask() { + + @Override + public void run() { + + StatoAttivoLoggato(); +// timerDisplay.cancel(); +// timerDisplay.purge(); + + } + }, 8000); + + Azzera(); + AggiornaLabelInfo(); +// jTxtTessera.requestFocus(); + + } + + private boolean ControllaDiscrepanzePrenotazioni(String ElencoIdProdotto) { + boolean ok=true; + if (ElencoIdProdotto.length() > 0) { + ElencoIdProdotto = ElencoIdProdotto.substring(0, ElencoIdProdotto.length() - 1); + String El[] = ElencoIdProdotto.split(","); + String Query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_Prenotazione=" + idPrenotazione; + int rowCount = Integer.parseInt(MySelect(Query, "nr")); + if(rowCount>0){ + if (rowCount == El.length) { + Query = "SELECT count(*) as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " AND id_Prodotto in (" + ElencoIdProdotto + ") and id_Prenotazione=" + idPrenotazione; + rowCount = Integer.parseInt(MySelect(Query, "nr")); + if (rowCount == El.length) { + return true; + } + } + + Object[] options = {"Sì", "No"}; + Object selectedValue =JOptionPane.showOptionDialog(this, "I prodotti selezionati sono diversi dai prenotati!\nVuoi proseguire?", "Prenotazione", + JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null); + if (Integer.parseInt(selectedValue.toString()) == 1) { + AzzeraDopoStorno(); + return false; + } + } + } + return ok; + } + + private void AggiornaPrenotazioni(String ElencoIdProdotto){ + try { + if (ElencoIdProdotto.length()>0){ + //ElencoIdProdotto=ElencoIdProdotto.substring(0,ElencoIdProdotto.length()-1); + + //String Query="SELECT id FROM VIEW_PRENOTAZIONI_TURNO WHERE id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " AND id_Prodotto in (" + ElencoIdProdotto + ")"; + String Query="SELECT id FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_Prenotazione=" + idPrenotazione; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + while (rs.next()) { + MyInsert("Update PRENOTAZIONI_PASTI set id_Stato=2 where id=" + rs.getString("id")); + } + rs.close(); + st.close(); + dbConnection.close(); + } + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + + } + + } + private void AggiornaProgressivoPagamentiTurno(Double Importo) { + /* + if (idModoPagamento == 0) { + ProgressivoScalare = ProgressivoScalare + Importo; + } + if (idModoPagamento == 1) { + ProgressivoContanti = ProgressivoContanti + Importo; + } + if (idModoPagamento == 2) { + ProgressivoTicket = ProgressivoTicket + Importo; + } + */ + if (CercaTestoModoPagamento().equalsIgnoreCase("A scalare")) { + ProgressivoScalare = ProgressivoScalare + Importo; + } + if (CercaTestoModoPagamento().equalsIgnoreCase("Contanti")) { + ProgressivoContanti = ProgressivoContanti + Importo; + } + if (CercaTestoModoPagamento().equalsIgnoreCase("Ticket")) { + ProgressivoTicket = ProgressivoTicket + Importo; + } + if (CercaTestoModoPagamento().equalsIgnoreCase("Differito")) { + ProgressivoDifferito = ProgressivoDifferito + Importo; + } + + } + + private void Azzera() { + try { + MyTableModel model = (MyTableModel) tblLista.getModel(); + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); + ClearTable(model); + ClearTable(model1); + } catch (Exception e) { + } + MessaggioSaldoUnaVolta = false; + idTessera = 0L; + idPrenotazione= 0L; + idProfiloTariffario = 0L; + //idModoPagamento = 0L; + //SetModoPagamento("Contanti"); + SetModoPagamento(ModoPagamentoDefault); + CassaAperta = false; + txtTotaleCassa.setText("? 0,00"); + txtTotalePunti.setText("Punti 0"); + + pnlCategorie.setVisible(false); + pnlProdotti.setVisible(false); + if (FlagPrecaricaLista == false) { + AbilitaPulsanti(pnlCategorie, false,false); + AbilitaPulsanti(pnlProdotti, false,false); + } + pnlCategorie.setVisible(true); + pnlProdotti.setVisible(true); + + Bonus_Residui=0; + jTxtTessera.setText(""); + pnlProdotti.removeAll(); + pnlProdotti.repaint(); + lblCategoria.setText(""); + lblCognome.setText(""); + lblNome.setText(""); + lblNascita.setText(""); + lblScadTessera.setText(""); + lblAzienda.setText(""); + lblConvenzione.setText(""); + lblFascia.setText(""); + jBtnStorno.setEnabled(false); + //jBtnCarta.setEnabled(false); + jBtnAsporto.setEnabled(false); +// jBtnBuoni.setEnabled(false); + //jBtnTicket.setEnabled(false); + + jbtnSu.setEnabled(false); + jbtnGiu.setEnabled(false); + jbtnElimina.setEnabled(false); + jbtnAnnulla.setEnabled(false); + //jbtnStampa.setEnabled(false); + jbtnDuplica.setEnabled(false); + + lblSaldo.setText("[...]"); + lblPunti.setText("[...]"); + lblTipoPagamento.setText("[...]"); + //jBtnCarta.setEnabled(false); + TestoRFIDCard = new StringBuilder(); + TestoSwipCard = new StringBuilder(); +// TestoCarteCF = new StringBuilder(); + StatoCardLettore = false; + if (btnImpostaCliente.isVisible()) { + btnImpostaCliente.setEnabled(BottoneImposta); + } + jBtnBuoni.setEnabled(true); + lblResiduo.setText("[...]"); + lblGratuità.setText("[...]"); + jBtnAsporto.setSelected(false); + jBtnAsportoActionPerformed(null); + PassaggioTessera = false; + PassaggiEsauritiNoComposizione = false; + SaldoMinimoStop = 0.0; + MyApplication MyP = new MyApplication(); + MyP.UnaVolta = false; + Gratuita_Residue=0; + //MessaggioFlagExtraUnaVolta = false; +// TesseraCFLetta=false; + + //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + if (FlagPrecaricaLista) { + ApriCassaDefault(); + } + + } + + public void ApriCassaDefault() { + lblCategoria.setText(""); + lblCognome.setText(""); + lblNome.setText(""); + lblNascita.setText(""); + lblScadTessera.setText(""); + lblAzienda.setText(""); + lblConvenzione.setText(""); + lblFascia.setText(""); + + //Display(Message_Display, " "," "); + if (CassaAperta == false) { + + TurnoAttuale(); + if ((idTurnoAttuale - idTurno) != 0) { + + ProgressivoTurno = 1L; + ProgressivoContanti = 0.00; + ProgressivoScalare = 0.00; + ProgressivoTicket = 0.00; + ProgressivoDifferito = 0.00; + if (NomeTurnoAttuale.equalsIgnoreCase("Pranzo")) { + ProgressivoGiorno = 1L; + } + idTurno = idTurnoAttuale; + NomeTurno = NomeTurnoAttuale; + + Date Adesso = new Date(); + String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); + if (Long.parseLong(ControlloTurno) <= 0) { + MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " + + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); + } + + AggiornaLabelInfo(); + } + + CassaAperta = true; + idProfiloTariffario = idProfiloTariffarioDefault;//0L + + SetModoPagamento(ModoPagamentoDefault); +// CaricaCompleti(); + + //this.caricaDati("PRODOTTI", "-1"); + this.caricaPannello(); + AbilitaPulsanti(pnlCategorie, true,true); + jbtnChiudi.setEnabled(false); + } + } + + public void CercaTessera() {//String QueryCF) { + MyApplication MyP = new MyApplication(); + MyP.UnaVolta = false; + SetModoPagamento(ModoPagamentoDefault); + String NTessera = jTxtTessera.getText(); +// TestoCarteCF=new StringBuilder(); + String Query = "SELECT DISTINCT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue || '|' || t.bonus_residui AS ris " + + " FROM categorie_utenti c, tessere t, utenti u, categorie_utenti_fasce cf, fasce f, aziende a WHERE t.id_utente = u.ID AND u.id_categoria = c.ID AND c.id_azienda = a.ID AND cf.id_categoria_utenti = c.ID AND cf.id_fascia = f.ID AND t.numero = '" + NTessera + "'"; +// if(QueryCF.length()>0){ +// Query=QueryCF; +// } + + String res = MySelect(Query, "ris"); + + if (res.length() > 0) { + String dati[] = res.split("\\|", -1); + + Date now = new Date(); + + Date Scadenza = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + + idProfiloTariffario = Long.parseLong(dati[12]); + if (idProfiloTariffario == idProfiloTariffarioDefault) { + JOptionPane.showOptionDialog(this, "Impostato Profilo Tariffario di default!", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null); + } + Integer idStato = Integer.parseInt(dati[10]); + idTessera = Long.parseLong(dati[8]); + LogIDTessera = idTessera.toString(); + + LogTessera(); + + try { + // controllo abilitazione tessera + String ControlloPunto = "Select controlla_abilitazione('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; + Long Abilitato = MySelectInteger(ControlloPunto, "T"); + if (Abilitato == 0) { + //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); + Object[] options = {"Sì", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); + if (Integer.parseInt(selectedValue.toString()) != 0) { + return; + } else { + MyInsert("Insert into Forzature (id,id_account,id_Punto_Cassa,id_Tessera,id_Tipo_Forzatura) values (-1," + idAccount + "," + idPuntoCassa + "," + idTessera + ",1)"); + + } + + } + + //controllo passaggi + String ControlloPassaggi = "Select controlla_passaggi('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; + Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "T"); + + if (AbilitatoPassaggi == 0L) { + //05/09/2022 + String queryPassaggi="select count(*) as NRec from st_acquisti a inner join prodotti p on a.id_prodotto=p.id inner join Tipi_Pagamenti tp on a.id_tipo_pagamento=tp.id where TRUNC(data) = TRUNC(SYSDATE) and id_tessera=" + idTessera + " and flag_in_vassoio=0 and id_punto_cassa=" + idPuntoCassa; + Long NPassaggi = MySelectInteger(queryPassaggi, "NRec"); + //fine---- + if (FlagEsegueStorni && NPassaggi>0) { + //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); + Object[] options = {"Sì", "No"}; + Object selectedValue = JOptionPane.showOptionDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!\nSi desidera effettuare uno storno per un pasto erroneamente addebitato?", "Attenzione", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]); + if (Integer.parseInt(selectedValue.toString()) == 0) { + ApriStorno(true); + } else { + AzzeraDopoStorno(); + return; +// //16-04-2019 +// //CancellaComposizioni(); +// Annulla(); +// timerDisplay.schedule(new TimerTask() { +// +// @Override +// public void run() { +// Azzera(); +// AggiornaLabelInfo(); +// +// } +// }, 500); +// +// //Chiudi(); +// PassaggiEsauritiNoComposizione = true; +// +// //30-11-15 +// //Azzera(); +// //return; + } + } else { + JOptionPane.showMessageDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!"); + AzzeraDopoStorno(); + return; + } + } + + //aggiungo un giorno altrimenti in caso di scadenza nello stesso giorno + //considera le ore + Scadenza = formatter.parse(dati[9]); + Calendar c = Calendar.getInstance(); + c.setTime(Scadenza); + c.add(Calendar.DATE, 1); + Scadenza = c.getTime(); + + //JOptionPane.showMessageDialog(this, Scadenza + ' ' + now); + if (Scadenza.after(now) && idStato != 2) { + //String res1 = MySelect("Select Cognome || ' ' || Nome || ';' || id_Categoria as ris from utenti where id=" + dati[1], "ris"); + //String dati2[] = res1.split(";"); + + String ModoP = CercaTestoModoPagamento(); + +// CaricaCompleti(); + lblCategoria.setText(dati[0]); + lblCognome.setText(dati[1]); + lblNome.setText(dati[2]); + + if (FlagMostraDataDiNascita) { + lblNascita.setText(dati[3]); + } + + //lblScadTessera.setText(dati[9]);//dati[4] + lblAzienda.setText(dati[5]); + lblConvenzione.setText(dati[6]); + lblFascia.setText(dati[7]); + jBtnStorno.setEnabled(FlagEsegueStorni); + + jBtnAsporto.setEnabled(true); + jbtnChiudi.setEnabled(true); + + //VerificaModoPagamento(); + if (btnImpostaCliente.isVisible()) { + btnImpostaCliente.setEnabled(false); + jBtnBuoni.setEnabled(false); + } + if (FlagPrecaricaLista == false) { + CassaAperta = true; + AbilitaPulsanti(pnlCategorie, true,true); + AbilitaPulsanti(pnlProdotti, true,true); + } + if (dati.length > 13) { + if (dati[13].length() > 0) { + Gratuita_Residue = Integer.parseInt(dati[13]); + } + //Gratuita_ResidueProg = Gratuita_Residue; + lblGratuità.setText(dati[13]); + } + + Bonus_Residui = 0; + if (dati.length > 14) { + if (dati[14].length() > 0) { + Bonus_Residui = Integer.parseInt(dati[14]); + } + } + + lblScadTessera.setText("" + Bonus_Residui); + //CaricaCompleti(); + + if (ModoP.equalsIgnoreCase("A scalare")) { + //VerificaSaldo(NTessera); + //modifica 09-11-18 + if (CalcolaTotale() > 0.00 && FlagPrecaricaLista == false) { + VerificaSaldo(NTessera); + } + //fine modifica + + + } else { + MyApplication MyA = new MyApplication(); + String Punti = MyA.MySelect(this, "Select Punti from Tessere where numero='" + NTessera + "'", "Punti"); + lblPunti.setText(Punti); + String Tipo = CercaTestoModoPagamento(); + lblTipoPagamento.setText(Tipo); + + } + StoCalcolando=true; + PulsantiModoPagamento(); + StoCalcolando=false; + //this.caricaDati("PRODOTTI", "-1"); + this.caricaPannello(); + AbilitaPulsanti(pnlCategorie, true,true); + StatoTesseraLetta(Gratuita_Residue, Bonus_Residui); + + //28-09-2016 quando c'è una sola categoria faccio click + if (NumeroCategorie == 1) { + Component[] components = pnlCategorie.getComponents(); + JToggleButton bt = (JToggleButton) components[0]; + //bt.doClick(); + } + + //FlagDefaultAsporto + if (Asporto) { + jBtnAsporto.setSelected(true); + jBtnAsportoActionPerformed(null); + } + + MyTableModel model = (MyTableModel) tblLista.getModel(); + if (FlagPrecaricaLista) { + ForzaPrezzi(model); + } + + ControllaCompleti(model); + ControllaExtra(model); + SommaColonne(model); + //modifica 09-11-18 + if (ModoP.equalsIgnoreCase("A scalare")) { + if (CalcolaTotale() > 0.00 && FlagPrecaricaLista) { + VerificaSaldo(NTessera); + } + } + //fine modifica + //SommaColonne(model); + //05-06-2020 + if (AbilitatoPassaggi != 0L) { + ControllaPrenotazioni(); + } + } else { + JOptionPane.showMessageDialog(this, "Tessera Scaduta o Disabilitata!"); + LogTessera(); + Azzera(); + + } + } catch (ParseException e) { + LogTesseraErrore = e.getMessage().toString(); + LogTessera(); + Azzera(); + + } + } else { + + JOptionPane.showMessageDialog(this, "Errore in lettura della tessera!"); + LogTessera(); + Azzera(); + } + + } + +// private void ControllaPrenotazioni() { +// String Query = "select * from (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE (id_Modalita=2 or id_Modalita=3) and id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1 "; +// String idP = MySelect(Query, "nr"); +// if (idP.length() > 0) { +// Long rowCount = Long.parseLong(idP); +// idPrenotazione = rowCount; +// if (rowCount > 0L) { +// if (JOptionPane.showConfirmDialog(null, "Prenotazione presente. Inserisco i prodotti?", "Prenotazione", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { +// InserisciPrenotazioni(); +// } +// } +// } +// } + private void ControllaPrenotazioni() { + try { + //String Query = "select * from (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE (id_Modalita=2 or id_Modalita=3) and id_stato = 1 AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1 "; + String Query="SELECT * FROM (SELECT id_Prenotazione as nr FROM VIEW_PRENOTAZIONI_TURNO WHERE id_modalita in (2,3) AND id_stato IN (0,1) AND id_turno = " + idTurnoAttuale + " AND id_tessera = " + idTessera + " order by id_prenotazione) where rownum = 1"; + String idP = MySelect(Query, "nr"); + if (idP.length() > 0) { + Long rowCount = Long.parseLong(idP); + idPrenotazione = rowCount; + if (rowCount > 0L) { + Query = "SELECT Distinct Nome FROM VIEW_PRENOTAZIONI_TURNO v join prodotti p on v.ID_PRODOTTO=p.ID WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_prenotazione=" + idPrenotazione + " order by Nome"; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + StringBuilder s =new StringBuilder(""); + while (rs.next()) { + s.append(rs.getString("Nome")); + s.append("\n"); + } + + rs.close(); + st.close(); + dbConnection.close(); + + if (JOptionPane.showConfirmDialog(null, "Prenotazione presente:\n" + s.toString() + "Inserisco i prodotti?", "Prenotazione", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + InserisciPrenotazioni(); + } + + } + } + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + } + } + private void InserisciPrenotazioni() { + try { + + MyTableModel model = (MyTableModel) tblLista.getModel(); + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); + ClearTable(model); + ClearTable(model1); + SommaColonne(model); + + String Query = "SELECT * FROM VIEW_PRENOTAZIONI_TURNO WHERE id_Modalita in (2,3) and id_stato in (0,1) AND id_turno =" + idTurnoAttuale + " AND id_tessera = " + idTessera + " and id_prenotazione=" + idPrenotazione; + + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + //Long idPrenotazione=0L; + while (rs.next()) { +// if (idPrenotazione!=rs.getLong("ID_PRENOTAZIONE") && idPrenotazione!=0L){ +// break; +// } + java.awt.event.ActionEvent evt; + evt = new java.awt.event.ActionEvent(new Object(), 0, "PRODOTTO[" + rs.getString("ID_PRODOTTO") + "]"); + actionPerformed(evt); + + +// idPrenotazione=rs.getLong("ID_PRENOTAZIONE"); + } +// this.idPrenotazione=idPrenotazione; + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + } + } + public void AzzeraDopoStorno() { + + Annulla(); + timerDisplay.schedule(new TimerTask() { + + @Override + public void run() { + Azzera(); + AggiornaProgressivi(); + //AggiornaLabelInfo(); + + } + }, 500); + + //Chiudi(); + PassaggiEsauritiNoComposizione = true; + } + private Double CalcolaTotale() { + Double TotAcquisto = 0.00; + if (txtTotaleCassa.getText().length() > 0) { + String Saldo = txtTotaleCassa.getText().replace("? ", "").replace(".", ""); + Saldo = Saldo.replace(",", "."); + TotAcquisto = Double.parseDouble(Saldo); + } + return TotAcquisto; + } + + private void ForzaPrezzi(MyTableModel model) { + for (int y = 0; y < model.getRowCount(); y++) { + Object row[] = model.getRow(y); + String idProdotto = row[3].toString(); + String Query = "SELECT Punti || '|' || prezzo as res FROM tariffe where id_Prodotto = " + idProdotto + " and id_fascia=" + idProfiloTariffario; + String res = MySelect(Query, "res"); + if (res.length() > 0) { + String[] El = res.split("\\|", -1); + Double Prezzo = 0.0; + Integer Punti = 0; + Punti = Integer.parseInt(El[0]); + + + Prezzo = Double.parseDouble(El[1].replace(",", ".")); + + + +// row[ColImporto]=Prezzo; +// row[ColPunti]=Punti; +// model.addRow(row); + + model.setValueAt(Prezzo, y, ColImporto); + model.setValueAt(Prezzo, y, ColImporto2); + model.setValueAt(Punti, y, ColPunti); + doLayout(); + } + + } + + } + + //prima modifica del 09-05-18<<<<<<<<<<<<<<<<<<<<<<<<<< +// public void CercaTesseraOLD() { +// lblCategoria.setText(""); +// lblCognome.setText(""); +// lblNome.setText(""); +// lblNascita.setText(""); +// lblScadTessera.setText(""); +// lblAzienda.setText(""); +// lblConvenzione.setText(""); +// lblFascia.setText(""); +// +// //Display(Message_Display, " "," "); +// if (CassaAperta == false) { +// +// TurnoAttuale(); +// if ((idTurnoAttuale - idTurno) != 0) { +// +// ProgressivoTurno = 1L; +// ProgressivoContanti = 0.00; +// ProgressivoScalare = 0.00; +// ProgressivoTicket = 0.00; +// ProgressivoDifferito = 0.00; +// if (NomeTurnoAttuale.equalsIgnoreCase("Pranzo")) { +// ProgressivoGiorno = 1L; +// } +// idTurno = idTurnoAttuale; +// NomeTurno = NomeTurnoAttuale; +// +// Date Adesso = new Date(); +// String ControlloTurno = MySelect("select count(*) as Prog from Progressivi where id_Punto_cassa=" + idPuntoCassa + " and data=" + AggiustaData(Adesso) + " and id_Turno=" + idTurno, "Prog"); +// if (Long.parseLong(ControlloTurno) <= 0) { +// MyInsert("Insert into Progressivi (data,id_Punto_cassa,id_Turno,prog_assoluto,prog_giorno,prog_turno) " +// + " values (" + AggiustaData(Adesso) + "," + idPuntoCassa + "," + idTurno + "," + Progressivo + "," + ProgressivoGiorno + ",0)"); +// } +// +// AggiornaLabelInfo(); +// } +// +// CassaAperta = true; +// idProfiloTariffario = 0L; +// //idModoPagamento=0L; +// //SetModoPagamento("Contanti"); +// SetModoPagamento(ModoPagamentoDefault); +// String NTessera = jTxtTessera.getText(); +// // String ControlloPunto="select count(*) as T from view_tessere_abilitate where id_punto_cassa =" + idPuntoCassa + " and numero = '" + NTessera + "'"; +// +// //String res = MySelect("Select data_scadenza || ';' || id_utente || ';' || id_fascia || ';' || id_Stato || ';' || id as ris from tessere where numero='" + NTessera + "'", "ris"); +// //String res = MySelect("SELECT t.data_scadenza || ';'|| u.id || ';'||t.id_fascia|| ';'|| t.id_stato|| ';'||t.id || ';'|| u.nome|| ';'|| u.cognome|| ';'|| c.nome as ris FROM tessere t, utenti u, categorie_utenti c, stati_tessere s WHERE t.id_utente = u.id AND u.id_categoria = c.id AND t.id_stato = s.id AND t.numero = '" + NTessera + "'", "ris"); +// //String res=MySelect("SELECT data_scadenza || ';'|| id_utente || ';'|| id_fascia|| ';'|| id_stato|| ';'|| id_Tessera || ';'|| nome|| ';'|| cognome|| ';'|| categoria as ris FROM view_tessere where numero = '" + NTessera + "'", "ris"); +// //select c.nome as categoria, u.cognome, u.nome, u.data_di_nascita, u.matricola, a.nome as azienda, c.nome as convenzione, f.nome as fascia, t.id as id_tessera, t.data_scadenza, t.id_stato, u.id as id_utente, f.id as id_fascia +//// String Query="select distinct c.nome || '|'|| u.cognome || '|'|| u.nome || '|'|| to_char(u.data_di_nascita,'dd/mm/yyyy') || '|'|| u.matricola || '|'|| a.nome || '|'|| c.nome || '|'|| f.nome || '|'|| t.id || '|'|| to_char(t.data_scadenza,'dd/mm/yyyy') || '|'|| t.id_stato || '|'|| u.id || '|'|| f.id || '|'|| t.gratuita_residue as ris" + +//// " from categorie_utenti c, tessere t, utenti u, convenzioni_fasce cf, fasce f, convenzioni co, aziende a where u.id_categoria = c.id" + +//// " and t.id_utente = u.id and cf.id_categoria_utenti = c.id and cf.id_fascia = f.id and cf.id_convenzione = co.id and co.id_azienda = a.id" + +//// " and t.numero = '" + NTessera + "'"; +// String Query = "SELECT DISTINCT c.nome || '|' || u.cognome || '|' || u.nome || '|' || TO_CHAR (u.data_di_nascita, 'dd/mm/yyyy') || '|' || u.matricola || '|' || a.nome || '|' || c.nome || '|' || f.nome || '|' || t.ID || '|' || TO_CHAR (t.data_scadenza, 'dd/mm/yyyy') || '|' || t.id_stato || '|' || u.ID || '|' || f.ID || '|' || t.gratuita_residue AS ris " +// + " FROM categorie_utenti c, tessere t, utenti u, categorie_utenti_fasce cf, fasce f, aziende a WHERE t.id_utente = u.ID AND u.id_categoria = c.ID AND c.id_azienda = a.ID AND cf.id_categoria_utenti = c.ID AND cf.id_fascia = f.ID AND t.numero = '" + NTessera + "'"; +// String res = MySelect(Query, "ris"); +// +// if (res.length() > 0) { +// String dati[] = res.split("\\|"); +// +// Date now = new Date(); +// +// Date Scadenza = new Date(); +// SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); +// +// idProfiloTariffario = Long.parseLong(dati[12]); +// Integer idStato = Integer.parseInt(dati[10]); +// idTessera = Long.parseLong(dati[8]); +// +// try { +// // controllo abilitazione tessera +// String ControlloPunto = "Select controlla_abilitazione('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; +// Long Abilitato = MySelectInteger(ControlloPunto, "T"); +// if (Abilitato == 0) { +// //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); +// Object[] options = {"Sì", "No"}; +// Object selectedValue = JOptionPane.showOptionDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?", "Attenzione", +// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); +// if (Integer.parseInt(selectedValue.toString()) != 0) { +// return; +// } else { +// MyInsert("Insert into Forzature (id,id_account,id_Punto_Cassa,id_Tessera,id_Tipo_Forzatura) values (-1," + idAccount + "," + idPuntoCassa + "," + idTessera + ",1)"); +// +// } +// +// } +// +// //controllo passaggi +// String ControlloPassaggi = "Select controlla_passaggi('" + NTessera + "'," + idPuntoCassa + ") as T from dual"; +// Long AbilitatoPassaggi = MySelectInteger(ControlloPassaggi, "T"); +// +// //da togliere<<<<<<<<<<<<<<<<<<<<<<<<< +// //AbilitatoPassaggi = 0L; +// if (AbilitatoPassaggi == 0L) { +// //JOptionPane.showMessageDialog(this, "Tessera non abilitata per questo punto di distribuzione!\nConsenti passaggio?",JOptionPane.YES_NO_OPTION); +// //Object[] options = { "Sì", "No" }; +// JOptionPane.showOptionDialog(this, "N° passaggi giornalieri esauriti. Non è possibile usufruire del pasto!", "Attenzione", +// JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); +// //Chiudi(); +// CancellaComposizioni(); +// PassaggiEsauritiNoComposizione = true; +// +// //30-11-15 +// //Azzera(); +// //return; +// } +// +// //aggiungo un giorno altrimenti in caso di scadenza nello stesso giorno +// //considera le ore +// Scadenza = formatter.parse(dati[9]); +// Calendar c = Calendar.getInstance(); +// c.setTime(Scadenza); +// c.add(Calendar.DATE, 1); +// Scadenza = c.getTime(); +// +// //JOptionPane.showMessageDialog(this, Scadenza + ' ' + now); +// if (Scadenza.after(now) && idStato != 2) { +// //String res1 = MySelect("Select Cognome || ' ' || Nome || ';' || id_Categoria as ris from utenti where id=" + dati[1], "ris"); +// //String dati2[] = res1.split(";"); +// +// String ModoP = CercaTestoModoPagamento(); +// +//// if (ModoP.equalsIgnoreCase("A scalare")) { +//// if (VerificaSaldo(NTessera)) { +// CaricaCompleti(); +// lblCategoria.setText(dati[0]); +// lblCognome.setText(dati[1]); +// lblNome.setText(dati[2]); +// if (FlagMostraDataDiNascita) { +// lblNascita.setText(dati[3]); +// } +// lblScadTessera.setText(dati[9]);//dati[4] +// lblAzienda.setText(dati[5]); +// lblConvenzione.setText(dati[6]); +// lblFascia.setText(dati[7]); +// jBtnStorno.setEnabled(true); +// //jBtnCarta.setEnabled(true); +// jBtnAsporto.setEnabled(true); +//// jBtnBuoni.setEnabled(true); +// //jBtnTicket.setEnabled(true); +// //VerificaModoPagamento(); +// if (btnImpostaCliente.isVisible()) { +// btnImpostaCliente.setEnabled(false); +// } +// //AbilitaPulsanti(pnlCategorie, true); +// //AbilitaPulsanti(pnlProdotti, true); +// if (dati.length > 13) { +// if (dati[13].length() > 0) { +// Gratuita_Residue = Integer.parseInt(dati[13]); +// } +// //Gratuita_ResidueProg = Gratuita_Residue; +// lblGratuità.setText(dati[13]); +// } +// //CaricaCompleti(); +// +// if (ModoP.equalsIgnoreCase("A scalare")) { +// +// VerificaSaldo(NTessera); +// +// } else { +// MyApplication MyA = new MyApplication(); +// String Punti = MyA.MySelect(this, "Select Punti from Tessere where numero='" + NTessera + "'", "Punti"); +// lblPunti.setText(Punti); +// String Tipo = CercaTestoModoPagamento(); +// lblTipoPagamento.setText(Tipo); +// +// } +// PulsantiModoPagamento(); +// //this.caricaDati("PRODOTTI", "-1"); +// this.caricaPannello(); +// StatoTesseraLetta(0, 0); +// +// //28-09-2016 quando c'è una sola categoria faccio click +// if (NumeroCategorie == 1) { +// Component[] components = pnlCategorie.getComponents(); +// JToggleButton bt = (JToggleButton) components[0]; +// bt.doClick(); +// } +//// } else { +//// Azzera(); +////// CassaAperta=false; +////// idProfiloTariffario=0L; +////// idTessera=0L; +////// idModoPagamento=0L; +//// } +// +// //FlagDefaultAsporto +// if (Asporto) { +// jBtnAsporto.setSelected(true); +// jBtnAsportoActionPerformed(null); +// } +// +// } else { +// JOptionPane.showMessageDialog(this, "Tessera Scaduta o Disabilitata!"); +// Azzera(); +//// CassaAperta=false; +//// idProfiloTariffario=0L; +//// idTessera=0L; +//// idModoPagamento=0L; +// } +// } catch (ParseException e) { +// Azzera(); +//// CassaAperta=false; +//// idProfiloTariffario=0L; +//// idTessera=0L; +//// idModoPagamento=0L; +// } +// } else { +// +// JOptionPane.showMessageDialog(this, "Errore in lettura della tessera!"); +// Azzera(); +// } +// } +//// String[] Dati=MySelect("Select nome || ' ' || cognome as nc from utenti", dbTipo); +//// lblCodiceDati.setText(Dati[0]); +//// lblDenominazioneDati.setText(Dati[0]); +//// lblOrganizzazioneDati.setText(Dati[2]); +// +// } + + private void AbilitaPulsanti(JPanel aPanel, Boolean Abilita,Boolean Apertura) { + Component c = null; + Component[] components = aPanel.getComponents(); + + if (components != null) { + int numComponents = components.length; + for (int i = 0; i < numComponents; i++) { + c = components[i]; + if (c != null) { + + //c.setEnabled(Abilita); + JToggleButton bt = (JToggleButton) c; + if (bt == null) { + c.setEnabled(Abilita); + } else { + try { + if (bt.getText().equalsIgnoreCase("<html>Composizione</html>") && PassaggiEsauritiNoComposizione && aPanel.getName().equalsIgnoreCase("pnlCategorie")) { + bt.setEnabled(false); + } else { + bt.setEnabled(Abilita); + } + + if (bt.getText().equalsIgnoreCase("<html>Composizione</html>") && MenùGiornoPresente == false && Apertura ) { + bt.setEnabled(true); + bt.setSelected(true); + PulsantiCategoria("0", "Categoria[0]"); + //bt.setSelected(true); +// cmdComposizione=bt.getActionCommand(); +// Integer inizio = cmdComposizione.indexOf("["); +// Integer fine = cmdComposizione.indexOf("]"); +// idComposizione = cmdComposizione.substring(inizio + 1, fine); +//// MenùGiorno=true; +// Timer timer = new Timer(); +// timer.schedule(new TimerTask() { +// @Override +// public void run() { +// PulsantiCategoria(idComposizione, cmdComposizione); +// } +// }, 1000); + + } else { + bt.setSelected(false); + } + +// bt.setSelected(false); + } catch (Exception ex) { + } + } + } + } + } + + } + + private void Stampa() { + + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + JInternalReport P = new JInternalReport(); + P.TitoloReport = "Scontrino"; + + String Query = "Select Prodotti.Nome as Prodotto,Importo,Acquisti.id from Acquisti inner join Prodotti on Acquisti.id_prodotto=prodotti.id where Num_Progressivo=" + (Progressivo - 1) + " and id_Punto_cassa=" + idPuntoCassa; + String[] ColReport = {"Prodotto", "Importo"}; + String[] ColTypeReport = {"text", "float"}; + String SelectRows = "Select count(*) as nr from Acquisti where Num_Progressivo=" + (Progressivo - 1) + " and id_Punto_cassa=" + idPuntoCassa; + int rowCount = Integer.parseInt(MySelect(SelectRows, "nr")); + Object[][] dataReport = RowData(Query, ColReport, ColTypeReport, rowCount); + P.CreaReport(ColReport, ColTypeReport, dataReport); + + P.setVisible(true); + P.show(); + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + + } + + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + + private String MySelect(String Query, String Campo) { + String res = ""; + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + while (rs.next()) { + + res = rs.getString(Campo); + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + if (res == null) { + res = ""; + } + return res; + } + + private Boolean MyInsert(String Query) { + System.out.println(Query); + Boolean res = false; + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res = true; + } catch (Exception e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + + private Long MySelectInteger(String Query, String Campo) { + Long res = 0L; + try { + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + while (rs.next()) { + + res = rs.getLong(Campo); + } + rs.close(); + st.close(); + dbConnection.close(); + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelectInteger ['" + e.getMessage() + " " + Query + "']"); + + } + + return res; + } + + public void InsertImage() { + + String filenamepath = new String("L:\\Lavoro\\Goffredo\\risorse\\Brioche.jpg"); + try { + +//File file =new File(getClass().getClassLoader().getResource(filenamepath).getFile()); + File file = new File(filenamepath); + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement stat = dbConnection.createStatement(); + PreparedStatement ps = dbConnection.prepareStatement("Update Prodotti set icona=?"); +// bind the data...... + + System.out.println("Lenght:" + file.getAbsolutePath()); + InputStream inputimage = new FileInputStream(file); + ps.setBinaryStream(1, inputimage, (int) file.length()); + ps.execute(); + ps.close(); + dbConnection.close(); + } catch (Exception e) { + + System.out.println("Error at Image Insert:" + e); + e.printStackTrace(); + + } + + } + + public void getImage(String idProdotto) { + String FullName = null; + InputStream gifdata = null; + try { + + String Query = "select icona from Prodotti where id=" + idProdotto; +// create prepare Statement pst +//System.out.println("write from data base1 "); + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + PreparedStatement pst = dbConnection.prepareStatement(Query); + +//System.out.println("write from data base:2 "); +//pst.setString(1,Name); +//System.out.println("write from data base:3 "); + ResultSet result = pst.executeQuery(); + +//System.out.println("write from data base:4 "); + if (result.next()) { + +// Name = result.getString(1); +//System.out.println("write from data base:5 "); + //FullName = "L:\\Lavoro\\Goffredo\\risorse\\copia.jpg"; + FullName = imgPath + idProdotto + ".jpg"; +//using Srteam Method''''' + gifdata = result.getBinaryStream(1); +//System.out.println("write from data base:6 "); +//create file + if (gifdata != null) { + File giffile = new File(FullName); +//write the byte array into a local file. + + FileOutputStream file = new FileOutputStream(giffile); + int chunk = 0; + + while ((chunk = gifdata.read()) != -1) { + + file.write(chunk); + + } + file.flush(); + file.close(); + } + } + result.close(); + pst.close(); + dbConnection.close(); + } catch (Exception e) { + e.printStackTrace(); + + } +// return FullName; + + } + + private byte[] getPhoto(String Query) + throws Exception, SQLException { + String req = ""; + Blob img; + byte[] imgData = null; + Connection dbConnection = DriverManager.getConnection(dbStringa, dbUsername, dbPassword); + Statement stmt = dbConnection.createStatement(); + + // Query + req = Query; + + ResultSet rset = stmt.executeQuery(req); + + while (rset.next()) { + img = rset.getBlob(1); + imgData = img.getBytes(1, (int) img.length()); + } + + rset.close(); + stmt.close(); + dbConnection.close(); + return imgData; + } + + private String AggiustaDateOra(Date Data) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy HH24:MI:SS')"; + return data; + } + + private String AggiustaData(Date Data) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy')"; + return data; + } + + private void AggiungiImmaginiPulsanti() { + AggiungImmagini(jBtnStorno, "Storno.png", 70, 70); +// AggiungImmagini(jBtnCarta,"tsn.png",80,80); + AggiungImmagini(jBtnAsporto, "coltello e forchetta.jpg", 50, 50); + // AggiungImmagini(jBtnTicket,"Contanti.png",50,50); + + AggiungImmagini(jTBP0, "a scalare.png", 50, 50); + AggiungImmagini(jTBP1, "Contanti.png", 50, 50); + AggiungImmagini(jTBP2, "Ticket.png", 50, 50); + AggiungImmagini(jTBP3, "differito.png", 50, 50); + AggiungImmagini(jBtnprodotti, "Prodotti.png", 50, 50); + // UIManager.put("ToggleButton.select", Color.BLUE); + SwingUtilities.updateComponentTreeUI(jTBP0); + + //AggiungImmagini(jBtnMeteo,"Meteo.png",50,50); + //AggiungImmagini(jBtnDB,"DB.png",50,50); + AggiungImmagini(jBtnMovimenti, "Movimenti.png", 50, 50); + } + + private void AggiungImmagini(JButton btn, String Immagine, int width, int height) { + ImageIcon icon = new ImageIcon(imgPath + Immagine); + Image img = icon.getImage(); + Image newimg = img.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH); + icon = new ImageIcon(newimg); + btn.setIcon(icon); + } + + private void AggiungImmagini(JToggleButton btn, String Immagine, int width, int height) { + ImageIcon icon = new ImageIcon(imgPath + Immagine); + Image img = icon.getImage(); + Image newimg = img.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH); + icon = new ImageIcon(newimg); + btn.setIcon(icon); + + btn.setDisabledIcon(null); + btn.setDisabledIcon(icon); + + } + + // ========================================================================== + // * Metodo main() + // * + // * @param args the command line arguments + // * + // ========================================================================== + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + + // ================================================================= + // *** Crea la form base + // ================================================================= + PuntoCassa p = new PuntoCassa(); + p.AggiungImmagini(p.jBtnDB1, "DB.png", 50, 50); + + // ================================================================= + // *** Esegue il resize a seconda delle impostazioni video per + // *** occupare tutto lo schermo utile + // ================================================================= + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Dimension screenSize = toolkit.getScreenSize(); + Rectangle winSize = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); +// p.setSize(screenSize.width, winSize.height); +// p.setLocation(0, 0); + p.setSize(1024, 768); + p.setLocation((int) (screenSize.width - 1024) / 2, (int) (screenSize.height - 768) / 2); + p.resize(); + + // ================================================================= + // *** Mostra la form nello stato iniziale + // ================================================================= + p.pnlErrore.setVisible(false); + p.pnlLogin.setVisible(true); + p.lblUtenteLoggato.setVisible(true); + p.lblInfo.setVisible(true); + p.lblStatoConnessione.setVisible(true); + p.pnlTop.setVisible(false); + p.setVisible(true); + + +// p.txtUsername.setText("martiri"); +// p.txtPassword.setText("ok"); +// p.txtUsername.setText("marco"); +// p.txtPassword.setText("3104"); + // ricordati >>>>>>>>>> //VerificaAggiornamentoDB(); + } + }); + + } + + public void ControllaLogInCarta(String nTessera) { + if (Turno()) { + + String Query = "select a.username || '|' || a.id || '|' || a.id_stato as res" + + " from accounts a, utenti u, tessere t, profili p, ruoli r where a.id_utente = u.id" + + " and t.id_utente = u.id" + + " and p.id_account = a.id" + + " and p.id_ruolo = r.id" + //+ " and r.id = 10000000004" + //*** Operatore di cassa ***/ + + " and t.numero = '" + nTessera + "'"; //*** Numero della tessera letto su smartcard *** + MyApplication MyA = new MyApplication(); + String[] res = MyA.MySelect(this, Query, "res").split("\\|"); + if (res.length >= 3) { + utenteLoggato = res[0]; + idAccount = Long.parseLong(res[1]); + Integer Stato = Integer.parseInt(res[2]); + if (utenteLoggato.length() > 0 && idAccount > 0L && Stato == 1) { + String sql = "SELECT count(*) as Counter FROM profili p WHERE p.id_account = " + idAccount + " AND p.id_ruolo = 10000000004"; + Integer counter = Integer.parseInt(MyA.MySelect(this, sql, "Counter")); + if (counter == 1) { + ImpostaAmbiente(); + VerificaAggiornamentoDB(); + + } else { + idAccount = 0L; + utenteLoggato = ""; + JOptionPane.showMessageDialog(this, "L'utente non dispone dei privilegi per l'utilizzo del modulo cassa."); + } + } else { + utenteLoggato = ""; + idAccount = 0L; + if (Stato == 2) { + String Messaggio = MyA.MySelect(this, "Select Descrizione from Stati_Accounts where id=" + Stato, "descrizione"); + JOptionPane.showMessageDialog(this, Messaggio + "."); + + } else { + + JOptionPane.showMessageDialog(this, "Tessera sconosciuta!"); + } + } + } else { + JOptionPane.showMessageDialog(this, "Tessera sconosciuta!"); + } + CartaLetta = true; + } else { + JOptionPane.showMessageDialog(this, "Impossibile eseguire il Login al sistema:\nNessun Turno Attivo!"); + } + + } + + private void Display(String Titolo, String Prezzo) { + System.out.println("Display: " + Titolo); + if (Visualizza_Messaggi_Display) { + + try { + SerialPort serialPort = new SerialPort("COM3"); + try { + serialPort.openPort();//Open serial port + serialPort.setParams(SerialPort.BAUDRATE_9600, + SerialPort.DATABITS_8, + SerialPort.STOPBITS_1, + SerialPort.PARITY_NONE);//Set params. Also you can set params by this string: serialPort.setParams(9600, 8, 1, 0); + String Testo = Titolo; + if (Prezzo != null) { + Testo = Titolo + SpaziBianchi(Prezzo, 40 - Titolo.length(), false); + } + + serialPort.writeBytes(Testo.getBytes());//Write data to port + serialPort.closePort();//Close serial port + } catch (SerialPortException ex) { + //System.out.println(ex); + if (serialPort.isOpened()) { + serialPort.closePort(); + } + JOptionPane.showMessageDialog(this, ex.getMessage()); + } + } catch (SerialPortException | HeadlessException ex) { + + JOptionPane.showMessageDialog(this, ex.getMessage()); + } + } + } + + String SpaziBianchi(String Testo, Integer Num, Boolean Suffisso) { + String res = Testo; + StringBuilder Suff = new StringBuilder(); + if (Testo.length() < Num) { + Integer Delta = Num - Testo.length(); + for (Integer i = 0; i < Delta; i++) { + Suff.append(" "); + } + if (Suffisso == false) { + res = Suff.toString() + Testo; + } else { + res = Testo + Suff.toString(); + } + + } + return res; + } + + private void StatoAttivoNonLoggato() { + String PC = idPuntoCassa.toString(); + if (PC.length() >= 5) { + PC = PC.substring(PC.length() - 5, PC.length()); + } else { + PC = SpaziBianchi(PC, 5, false); + } + + String Riga = SpaziBianchi(Message_Display, 20, true) + "POS " + PC + " CHIUSO"; + Display(Riga, null); + } + + private void StatoAttivoLoggato() { + //per evitare che inserendo la tessera successiva mi cancelli il num tessera + if (jTxtTessera.getText().trim().length() <= 0) { + String PC = idPuntoCassa.toString(); + if (PC.length() >= 5) { + PC = PC.substring(PC.length() - 5, PC.length()); + } else { + PC = SpaziBianchi(PC, 5, false); + } + + String Riga = SpaziBianchi(Message_Display, 20, true) + "POS " + PC + " APERTO"; + Display(Riga, null); + } + } + + private void StatoTesseraLetta(int Gratuità, int Bonus) { + String tess = jTxtTessera.getText(); + if (tess.length() >= 12) { + tess = tess.substring(tess.length() - 12, tess.length()); + } else { + tess = SpaziBianchi(tess, 12, false); + } + String fa = "";//lblFascia.getText().replaceAll("Fascia","").trim(); + /*if(fa.length()>=13){ + fa=fa.substring(fa.length()-13, fa.length()); + }else{*/ + fa = SpaziBianchi(fa, 13, true); + //} + if (Gratuità > 0) { + + } else if (Bonus > 0) { + fa = "BONUS "; + } + //Display("TESSERA " + tess + "FASCIA " + fa ,null); + //aggiornamento 14-01-2019 + //aggiornamento 12-04-2019 + //Display("TESSERA " + tess + " " + fa, null); + } + class MyCanvas extends JComponent { + private String texto=""; + public MyCanvas(String Testo){ + texto=Testo; + } + @Override + public void paintComponent(Graphics g) { + if (g instanceof Graphics2D) { + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + + g2.drawString(texto, 70, 20); + } + } + } + + class CardTask extends TimerTask { + + PuntoCassa frmA; + + public CardTask(PuntoCassa frmx) { + frmA = frmx; + } + + public void run() { + //Date mo=new Date(); + //System.out.println(mo); + MyApplication MyA = new MyApplication(); + try { + MyA.SC.setReader(jcmbSC.getSelectedItem()); + MyA.SC.connect("T=1"); + //System.out.println(MyA.SC.getCurrentCardATR()); + StatoCarta = statiCarta.Inserita; + if (pnlLogin.isVisible() == false && CartaLetta == false) { + jBtnReadCardActionPerformed(null); + //btnImpostaClienteActionPerformed(null); + PassaggioTessera = true; + frmA.CercaTessera(); + + CartaLetta = true; + } else if (pnlLogin.isVisible() == true && CartaLetta == false) { + frmA.ControllaLogInCarta(GetNumeroTessera()); + + } + +// System.out.println(StatoCarta); + } catch (Exception e) { + //JOptionPane.showMessageDialog(frmA, e.getMessage(),"Exception",JOptionPane.ERROR_MESSAGE); + if (StatoCarta == statiCarta.Inserita) { + StatoCarta = statiCarta.Tolta; + } else { + StatoCarta = statiCarta.Assente; + } + CartaLetta = false; + //System.out.println(StatoCarta); + } + + } + + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + public javax.swing.JButton btnImpostaCliente; + private javax.swing.JButton btnLogin; + private javax.swing.JButton btnTermina; + private javax.swing.JToggleButton jBtnAsporto; + private javax.swing.JButton jBtnBuoni; + private javax.swing.JButton jBtnDB1; + private javax.swing.JButton jBtnMovimenti; + private javax.swing.JButton jBtnReadCard; + private javax.swing.JButton jBtnStorno; + private javax.swing.JButton jBtnprodotti; + private javax.swing.JCheckBox jChLogin; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JToggleButton jTBP0; + private javax.swing.JToggleButton jTBP1; + private javax.swing.JToggleButton jTBP2; + private javax.swing.JToggleButton jTBP3; + private javax.swing.JTextField jTxtTessera; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnChiudi; + private javax.swing.JButton jbtnDuplica; + private javax.swing.JButton jbtnElimina; + private javax.swing.JButton jbtnEsci; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnStampa; + private javax.swing.JButton jbtnSu; + private javax.swing.JComboBox jcmbSC; + private javax.swing.JLabel lblAzienda; + private javax.swing.JLabel lblCategoria; + private javax.swing.JLabel lblCodice; + private javax.swing.JLabel lblCodice1; + private javax.swing.JLabel lblCodice2; + private javax.swing.JLabel lblCodice3; + private javax.swing.JLabel lblCodice4; + private javax.swing.JLabel lblCodice5; + private javax.swing.JLabel lblCognome; + private javax.swing.JLabel lblConvenzione; + private javax.swing.JLabel lblDB; + private javax.swing.JLabel lblDenominazione; + private javax.swing.JLabel lblFascia; + private javax.swing.JLabel lblGratuità; + private javax.swing.JLabel lblInfo; + private javax.swing.JLabel lblInfo2; + private javax.swing.JLabel lblMessaggioErrore; + private javax.swing.JLabel lblNascita; + private javax.swing.JLabel lblNome; + private javax.swing.JLabel lblOrganizzazione; + private javax.swing.JLabel lblOrganizzazione1; + private javax.swing.JLabel lblOrganizzazione2; + private javax.swing.JLabel lblOrganizzazione3; + private javax.swing.JLabel lblOrganizzazione4; + private javax.swing.JLabel lblOrganizzazione5; + private javax.swing.JLabel lblPassword; + private javax.swing.JLabel lblPunti; + private javax.swing.JLabel lblResiduo; + private javax.swing.JLabel lblSaldo; + private javax.swing.JLabel lblScadTessera; + private javax.swing.JLabel lblStatoConnessione; + private javax.swing.JLabel lblTipoPagamento; + private javax.swing.JLabel lblUsername; + private javax.swing.JLabel lblUtenteLoggato; + private javax.swing.JPanel pnlAzioni; + private javax.swing.JPanel pnlCategorie; + private javax.swing.JPanel pnlCliente; + private javax.swing.JPanel pnlConto; + private javax.swing.JPanel pnlErrore; + private javax.swing.JPanel pnlLista; + private javax.swing.JPanel pnlLista1; + private javax.swing.JPanel pnlLogin; + private javax.swing.JPanel pnlProdotti; + protected javax.swing.JPanel pnlTop; + private javax.swing.JScrollPane scpLista; + private javax.swing.JScrollPane scpLista1; + private javax.swing.JTable tblLista; + private javax.swing.JTable tblLista1; + private javax.swing.JPasswordField txtPassword; + private javax.swing.JTextField txtTotaleCassa; + private javax.swing.JTextField txtTotalePunti; + private javax.swing.JTextField txtUsername; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/esci2.jpg b/src/puntocassa/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/src/puntocassa/esci2.jpg differ diff --git a/src/puntocassa/frmCerca.form b/src/puntocassa/frmCerca.form new file mode 100644 index 0000000..86492e5 --- /dev/null +++ b/src/puntocassa/frmCerca.form @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Cerca Tessera Attiva"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="845" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="322" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="256" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jtxtCognome" min="-2" pref="177" max="-2" attributes="0"/> + <Component id="lblCognome" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblNome" min="-2" max="-2" attributes="0"/> + <Component id="jtxtNome" min="-2" pref="181" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="lblCF" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jtxtNumTessera" min="-2" pref="176" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jBtnCerca" pref="128" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnAnnulla" pref="135" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <Component id="jBtnOK" min="-2" pref="97" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jScrollPane3" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jbtnSu" min="-2" pref="60" max="-2" attributes="0"/> + <Component id="jbtnGiu" min="-2" pref="60" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblCognome" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblNome" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblCF" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jtxtNumTessera" alignment="3" min="-2" pref="40" max="-2" attributes="0"/> + <Component id="jBtnCerca" alignment="3" min="-2" pref="40" max="-2" attributes="0"/> + <Component id="jbtnAnnulla" alignment="3" min="-2" pref="40" max="-2" attributes="0"/> + </Group> + <Component id="jtxtNome" alignment="1" max="32767" attributes="0"/> + <Component id="jtxtCognome" alignment="1" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane3" pref="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jbtnSu" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnGiu" min="-2" pref="53" max="-2" attributes="0"/> + <EmptySpace min="0" pref="50" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jBtnOK" min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblCF"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Num. Tessera:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblNome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Nome:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCognome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Cognome:"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jBtnCerca"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Cerca"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnCercaActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTblStudenti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JTextField" name="jtxtCognome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtCognomeFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jtxtCognomeMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jtxtNome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtNomeFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jtxtNomeMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnAnnulla"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Annulla"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAnnullaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLblTitolo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Cerca Tessera Attiva"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jtxtNumTessera"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtNumTesseraFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jtxtNumTesseraMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnOK"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="OK"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnOKActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnSu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnGiu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnGiuActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmCerca.java b/src/puntocassa/frmCerca.java new file mode 100644 index 0000000..448f861 --- /dev/null +++ b/src/puntocassa/frmCerca.java @@ -0,0 +1,772 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Image; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmCerca extends javax.swing.JFrame { + +private PuntoCassa frmPuntoCassa; +private JTextField jtxtTessera; + + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + private String BP=""; + private Boolean FlagMostraDataNascita=true; + private Boolean DisabilitaPerBuono=false; + + /** + * Creates new form frm + */ + public frmCerca(PuntoCassa frm,JTextField jtxtT,String imgPath,String BuoniPasto,Boolean flagMostraDataNascita) { + BP=BuoniPasto; + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + frmPuntoCassa.AddRemoveKeyDispatcher(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); +// FlagMostraDataNascita=flagMostraDataNascita; + jtxtTessera=jtxtT; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + + // -------------------------------------------------------------------- + // ** creo evento click jTblStudenti + // -------------------------------------------------------------------- + jTblStudenti.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + + if (e.getClickCount() == 1) { + //JTable target = (JTable) e.getSource(); + //int row = target.getSelectedRow(); + //int column = target.getSelectedColumn(); + jBtnOKActionPerformed(null); + } + } + }); + + if (BuoniPasto.length()<=0){ + CercaValoriDefault(); + }else{ + //jtxtCognome.requestFocus(); + //jtxtCognome.setBackground(Color.yellow); + DisabilitaPerBuono=true; + + jtxtCognome.setText(BuoniPasto); + Cerca(); + Disabilita(); + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + lblCF = new javax.swing.JLabel(); + lblNome = new javax.swing.JLabel(); + lblCognome = new javax.swing.JLabel(); + jBtnCerca = new javax.swing.JButton(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jtxtCognome = new javax.swing.JTextField(); + jtxtNome = new javax.swing.JTextField(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jtxtNumTessera = new javax.swing.JTextField(); + jBtnOK = new javax.swing.JButton(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Cerca Tessera Attiva"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + lblCF.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblCF.setText("Num. Tessera:"); + + lblNome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblNome.setText("Nome:"); + + lblCognome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + lblCognome.setText("Cognome:"); + + jBtnCerca.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jBtnCerca.setText("Cerca"); + jBtnCerca.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnCercaActionPerformed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jtxtCognome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtCognome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtCognomeFocusGained(evt); + } + }); + jtxtCognome.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtCognomeMouseClicked(evt); + } + }); + + jtxtNome.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtNome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtNomeFocusGained(evt); + } + }); + jtxtNome.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtNomeMouseClicked(evt); + } + }); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Cerca Tessera Attiva"); + + jtxtNumTessera.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jtxtNumTessera.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtNumTesseraFocusGained(evt); + } + }); + jtxtNumTessera.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtNumTesseraMouseClicked(evt); + } + }); + + jBtnOK.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jBtnOK.setText("OK"); + jBtnOK.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnOKActionPerformed(evt); + } + }); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(256, 256, 256)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jtxtCognome, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblCognome)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblNome) + .addComponent(jtxtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(lblCF) + .addContainerGap()) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jtxtNumTessera, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jBtnCerca, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)))) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCognome) + .addComponent(lblNome) + .addComponent(lblCF)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jtxtNumTessera, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jBtnCerca, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jtxtNome, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jtxtCognome, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 50, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 845, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 322, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jtxtNumTesseraFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtNumTesseraFocusGained + if (DisabilitaPerBuono==false){ + Tastiera(evt); + jtxtNumTessera.setBackground(Color.yellow); + jtxtNome.setBackground(Color.white); + jtxtCognome.setBackground(Color.white); + } +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtNumTesseraFocusGained + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + + //frmPuntoCassa.setEnabled(true); + //frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + if (DisabilitaPerBuono==false){ + MyKeyBoard myk=new MyKeyBoard(this,true); + myk.txt=jTxt; + myk.Parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + } + + } + private void jtxtNomeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtNomeFocusGained + Tastiera(evt); + jtxtNome.setBackground(Color.yellow); + jtxtNumTessera.setBackground(Color.white); + jtxtCognome.setBackground(Color.white); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtNomeFocusGained + + private void jtxtCognomeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtCognomeFocusGained + if(BP.length()<=0){ + Tastiera(evt); + } + jtxtCognome.setBackground(Color.yellow); + + jtxtNumTessera.setBackground(Color.white); + jtxtNome.setBackground(Color.white); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// System.out.print("jtxtCognomeFocusGained:" + evt.getComponent().toString()); +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtCognomeFocusGained + + private void jBtnCercaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCercaActionPerformed + Cerca(); + }//GEN-LAST:event_jBtnCercaActionPerformed + public void Cerca() { + if (jtxtCognome.getText().trim().length() <= 0 && jtxtNome.getText().trim().length() <= 0 && jtxtNumTessera.getText().trim().length() <= 0) { + JOptionPane.showMessageDialog(this, "Inserire Cognome o Nome o Numero Tessera!", "Attenzione", JOptionPane.INFORMATION_MESSAGE); + return; + } + + Aggiorna(); + + } + private void Disabilita(){ + jtxtCognome.setEnabled(false); + jtxtNome.setEnabled(false); + jtxtNumTessera.setEnabled(false); + jBtnCerca.setEnabled(false); + jBtnOK.requestFocus(); + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + frmPuntoCassa.AddRemoveKeyDispatcher(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOKActionPerformed + if (jTblStudenti.getSelectedRow() >= 0 ) { + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblStudenti.getModel(); + String nTessera = model.getValueAt(jTblStudenti.getSelectedRow(), 4).toString(); + + jtxtTessera.setText(nTessera); + this.dispose(); + frmPuntoCassa.CercaTessera(); + + } + + }//GEN-LAST:event_jBtnOKActionPerformed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()<jTblStudenti.getRowCount()-1){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()+1, jTblStudenti.getSelectedRow()+1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnGiuActionPerformed + + private void jtxtNomeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxtNomeMouseClicked + Tastiera(evt); + }//GEN-LAST:event_jtxtNomeMouseClicked + + private void jtxtCognomeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxtCognomeMouseClicked + Tastiera(evt); + }//GEN-LAST:event_jtxtCognomeMouseClicked + + private void jtxtNumTesseraMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxtNumTesseraMouseClicked + Tastiera(evt); + }//GEN-LAST:event_jtxtNumTesseraMouseClicked + private void Tastiera(java.awt.event.MouseEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + //java.awt.event.FocusEvent + private void Tastiera(java.awt.event.FocusEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + +// if (FlagMostraDataNascita==false){ +// //Data di Nascita +// TableColumn column2 = jTbl.getColumn("Data di Nascita"); +// column2.setMinWidth(0); +// column2.setMaxWidth(0); +// column2.setWidth(0); +// column2.setPreferredWidth(0); +// } + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private void Aggiorna() { + try { + + String From=" From utenti inner join tessere on utenti.id=tessere.id_utente inner join categorie_utenti on utenti.id_categoria=categorie_utenti.id inner join categorie_utenti_fasce on categorie_utenti_fasce.id_categoria_utenti=categorie_utenti.id inner join fasce on categorie_utenti_fasce.id_fascia=fasce.id where tessere.id_stato=1 and Tessere.Data_Scadenza>=trunc(sysdate) "; + String Where= "";// " and UPPER(Cognome) like '" + jtxtCognome.getText().trim().toUpperCase().replace("'", "''") + "%' "; + if (jtxtCognome.getText().trim().length()>0){Where=Where + " and UPPER(Utenti.Cognome) like '" + jtxtCognome.getText().trim().toUpperCase().replace("'", "''") + "%' ";} + if (jtxtNome.getText().trim().length()>0) {Where=Where + " and UPPER(Utenti.Nome) like '" + jtxtNome.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + if (jtxtNumTessera.getText().trim().length()>0) {Where=Where + " and UPPER(Tessere.Numero) like '" + jtxtNumTessera.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + String[] Col = {"id","Cognome","Nome","Data di Nascita","Tessera","Data Scadenza", "Fascia"}; + String[] ColType = {"long", "text","text","data","text","data","text"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select UTENTI.id, UTENTI.Cognome, Utenti.Nome, Utenti.Data_Di_Nascita, Tessere.Numero as Tessera, Tessere.Data_Scadenza, Fasce.Nome as Fascia " + From + Where + " order by Cognome,Nome", QueryCount, Col, ColType, jTblStudenti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + Font f=new Font("Tahoma",0,20); + jTblStudenti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblStudenti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + jTblStudenti.setRowHeight(25); + + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblStudenti.getRowCount() > 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmCerca.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmCerca(null,null,null,null,true).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnCerca; + private javax.swing.JButton jBtnOK; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JTextField jtxtCognome; + private javax.swing.JTextField jtxtNome; + private javax.swing.JTextField jtxtNumTessera; + private javax.swing.JLabel lblCF; + private javax.swing.JLabel lblCognome; + private javax.swing.JLabel lblNome; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables + + private void CercaValoriDefault() { + try { + MyApplication MyA = new MyApplication(); + String txtbox = MyA.MySelect(frmPuntoCassa, "Select Valore from PARAMETRI where chiave='ImpostaTesseraCampo'", "Valore"); + String txtboxValore = MyA.MySelect(frmPuntoCassa, "Select Valore from PARAMETRI where chiave='ImpostaTesseraStringa'", "Valore"); + + if (txtbox.equalsIgnoreCase("COGNOME")) { + jtxtCognome.requestFocus(); + jtxtCognome.setBackground(Color.yellow); + jtxtCognome.setText(txtboxValore); + } + if (txtbox.equalsIgnoreCase("NOME")) { + jtxtNome.requestFocus(); + jtxtNome.setBackground(Color.yellow); + jtxtNome.setText(txtboxValore); + } + if (txtbox.equalsIgnoreCase("TESSERA")) { + jtxtNumTessera.requestFocus(); + jtxtNumTessera.setBackground(Color.yellow); + jtxtNumTessera.setText(txtboxValore); + } + } catch (Exception ex) { + JOptionPane.showMessageDialog(this, ex.getMessage()); + } + } +} diff --git a/src/puntocassa/frmMeteo.form b/src/puntocassa/frmMeteo.form new file mode 100644 index 0000000..fadae41 --- /dev/null +++ b/src/puntocassa/frmMeteo.form @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Aggiorna condizioni Meteo"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="pnl1" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pnl1" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jCmbCat" pref="238" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jBtnAggiorna" min="-2" pref="97" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jCmbCat" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jBtnAggiorna" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jBtnAggiorna"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Aggiorna"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnAggiornaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JComboBox" name="jCmbCat"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="4"> + <StringItem index="0" value="Item 1"/> + <StringItem index="1" value="Item 2"/> + <StringItem index="2" value="Item 3"/> + <StringItem index="3" value="Item 4"/> + </StringArray> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmMeteo.java b/src/puntocassa/frmMeteo.java new file mode 100644 index 0000000..8ee4589 --- /dev/null +++ b/src/puntocassa/frmMeteo.java @@ -0,0 +1,407 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Properties; +import javax.swing.ImageIcon; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmMeteo extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idPuntoCassa=0L; + private Boolean Inserimento=false; + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + + /** + * Creates new form frm + */ + public frmMeteo(PuntoCassa frm, Long id_Punto_Cassa,Boolean Nuovo) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(false); + idPuntoCassa=id_Punto_Cassa; + Inserimento=Nuovo; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + CaricaCombo("Select nome,id from condizioni_meteo order by nome", "nome", "id", jCmbCat); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jBtnAggiorna = new javax.swing.JButton(); + jCmbCat = new javax.swing.JComboBox(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Aggiorna condizioni Meteo"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jBtnAggiorna.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jBtnAggiorna.setText("Aggiorna"); + jBtnAggiorna.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnAggiornaActionPerformed(evt); + } + }); + + jCmbCat.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jCmbCat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jCmbCat, 0, 238, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnAggiorna, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(6, 6, 6)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCmbCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jBtnAggiorna)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.Parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try { + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + + frmPuntoCassa = null; + this.dispose(); + } catch (Exception ex) { + + } + }//GEN-LAST:event_formWindowClosed + + private void jBtnAggiornaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAggiornaActionPerformed + ComboItem c = new ComboItem(null, null); + c = (ComboItem) jCmbCat.getSelectedItem(); + if (Inserimento) { + MyInsert("insert into meteo (id_Punto_Cassa,id_Condizioni) values (" + idPuntoCassa + "," + c.getKey() + ")"); + } else { + Date Adesso=new Date(); + MyInsert("Update meteo set id_Condizioni=" + c.getKey() + " where id_Punto_Cassa=" + + idPuntoCassa + " and to_date(ts_segnalazione,'dd/mm/yy')=" + AggiustaData(Adesso)); + } + this.dispose(); + }//GEN-LAST:event_jBtnAggiornaActionPerformed + + private String AggiustaData(Date Data) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String data = "to_date('" + formatter.format(Data) + "','dd/mm/yyyy')"; + return data; + } + + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmMeteo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmMeteo(null,0L,true).setVisible(true); + } + }); + } + private void CaricaCombo (String Query, String itemValue, String itemId, JComboBox cmb) { + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Connection c = dbConnection; + Statement stmt = null; + cmb.removeAllItems(); + stmt = c.createStatement(); + ResultSet rs = stmt.executeQuery(Query); + int r = 0; + while (rs.next()) { + + ComboItem row=new ComboItem(rs.getLong(itemId), rs.getString(itemValue)) ; + cmb.addItem(row); + + r++; + + } + rs.close(); + stmt.close(); + dbConnection.close(); + + } catch (SQLException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } + + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnAggiorna; + private javax.swing.JComboBox jCmbCat; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/frmMovimenti.form b/src/puntocassa/frmMovimenti.form new file mode 100644 index 0000000..0e5c724 --- /dev/null +++ b/src/puntocassa/frmMovimenti.form @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Ultimi Movimenti"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="850" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="307" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jScrollPane3" pref="768" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jbtnSu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + <Component id="jbtnGiu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jbtnAnnulla" min="-2" pref="215" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane3" pref="225" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jbtnSu" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnGiu" min="-2" pref="53" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnAnnulla" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTblStudenti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jbtnAnnulla"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Annulla"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAnnullaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLblTitolo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Ultimi Movimenti"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jbtnSu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnGiu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnGiuActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmMovimenti.java b/src/puntocassa/frmMovimenti.java new file mode 100644 index 0000000..3881ffc --- /dev/null +++ b/src/puntocassa/frmMovimenti.java @@ -0,0 +1,516 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmMovimenti extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idTessera=0L,idPuntoCassa=0L; + public int HFont = 15; + private int AltControlli = 100; + private int LargControlli = 100; + private int AltRigaGriglia = 0; + + + /** + * Creates new form frm + */ + public frmMovimenti(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(false); + + idPuntoCassa=IDPuntoCassa; + idTessera=IDTessera; + + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + Aggiorna(); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Ultimi Movimenti"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Ultimi Movimenti"); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(pnl1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 850, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 307, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.Parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()<jTblStudenti.getRowCount()-1){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()+1, jTblStudenti.getSelectedRow()+1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + + }//GEN-LAST:event_jbtnGiuActionPerformed + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + + TableColumn column1 = jTbl.getColumn("Numero"); + column1.setPreferredWidth(80); + column1.setWidth(80); + + TableColumn column2 = jTbl.getColumn("Cognome"); + column2.setPreferredWidth(150); + column2.setWidth(150); + + TableColumn column11 = jTbl.getColumn("Data"); + column11.setPreferredWidth(180); + column11.setWidth(180); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private void Aggiorna() { + try { + String From=" from view_ultimi_passaggi "; + // String Where= "where id_tessera=" + idTessera + " and flag_in_vassoio=0 and id_punto_cassa=" + idPuntoCassa ; + String[] Col = {"id", "Numero", "Fascia","Cognome","Nome","Data","Prodotto","Pagamento"}; + String[] ColType = {"long", "text", "text", "text", "text", "data","text","text"}; + String QueryCount="Select count(*) as righe from (Select * " + From + ") where ROWNUM <=50"; + QueryDati("Select * from (select * " + From +") where ROWNUM <=50", QueryCount, Col, ColType, jTblStudenti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + Font f=new Font("Tahoma",0,18); + jTblStudenti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblStudenti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + jTblStudenti.setRowHeight(25); + + + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblStudenti.getRowCount() > 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + String Ora=""; + + if(d[2].length()>8){ + String[] dx=d[2].trim().split(" "); + if(dx.length>1){ + Ora=dx[1].substring(0,8); + } + } + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0] + " " + Ora; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmMovimenti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmMovimenti(null,0L,0L,null).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/frmProdotti.form b/src/puntocassa/frmProdotti.form new file mode 100644 index 0000000..3117897 --- /dev/null +++ b/src/puntocassa/frmProdotti.form @@ -0,0 +1,290 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Cerca Prodotto"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="pnl1" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pnl1" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="lblCognome" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="180" max="32767" attributes="0"/> + </Group> + <Component id="jCmbCat" pref="274" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblCognome1" min="-2" max="-2" attributes="0"/> + <Component id="jtxtCodice" min="-2" pref="130" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="lblCognome2" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="jtxtProdotto" pref="121" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jBtnCerca" min="-2" pref="97" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jbtnAnnulla2" min="-2" pref="93" max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jbtnAggiungi" min="-2" pref="261" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jbtnElimina" min="-2" pref="261" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane3" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jbtnSu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + <Component id="jbtnGiu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" alignment="0" groupAlignment="3" attributes="0"> + <Component id="lblCognome1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblCognome" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="lblCognome2" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="21" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="103" alignment="0" groupAlignment="3" attributes="0"> + <Component id="jCmbCat" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jbtnAnnulla2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jBtnCerca" alignment="0" max="32767" attributes="0"/> + <Component id="jtxtCodice" alignment="0" max="32767" attributes="0"/> + <Component id="jtxtProdotto" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane3" pref="170" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jbtnSu" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnGiu" min="-2" pref="53" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jbtnAggiungi" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jbtnElimina" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTblProdotti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLblTitolo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Cerca Prodotti"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jbtnAggiungi"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Aggiungi Prodotto"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAggiungiActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="lblCognome"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Categoria:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jtxtCodice"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtCodiceFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jtxtCodiceMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jBtnCerca"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Cerca"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnCercaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnAnnulla2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Annulla"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAnnulla2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JComboBox" name="jCmbCat"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="4"> + <StringItem index="0" value="Item 1"/> + <StringItem index="1" value="Item 2"/> + <StringItem index="2" value="Item 3"/> + <StringItem index="3" value="Item 4"/> + </StringArray> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblCognome1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Codice:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jtxtProdotto"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="jtxtProdottoFocusGained"/> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jtxtProdottoMouseClicked"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="lblCognome2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Prodotto:"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jbtnSu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnGiu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnGiuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnElimina"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Elimina Prodotto"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnEliminaActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmProdotti.java b/src/puntocassa/frmProdotti.java new file mode 100644 index 0000000..efc60eb --- /dev/null +++ b/src/puntocassa/frmProdotti.java @@ -0,0 +1,744 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Properties; +import javax.swing.ImageIcon; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmProdotti extends javax.swing.JFrame { + +private PuntoCassa frmPuntoCassa; + + + public int HFont=15; + private int AltControlli=100; + private int LargControlli=100; + private int AltRigaGriglia=0; + + /** + * Creates new form frm + */ + public frmProdotti(PuntoCassa frm,String imgPath) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(false); + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + + // -------------------------------------------------------------------- + // ** creo evento click jTblStudenti + // -------------------------------------------------------------------- + jTblProdotti.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + + if (e.getClickCount() == 1) { + //JTable target = (JTable) e.getSource(); + //int row = target.getSelectedRow(); + //int column = target.getSelectedColumn(); +// jBtnOKActionPerformed(null); + } + } + }); + CaricaCombo("Select nome,id from categorie_prodotti union select ' ' as nome,0 as id from categorie_prodotti order by nome", "nome", "id", jCmbCat); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblProdotti = new javax.swing.JTable(); + jLblTitolo = new javax.swing.JLabel(); + jbtnAggiungi = new javax.swing.JButton(); + lblCognome = new javax.swing.JLabel(); + jtxtCodice = new javax.swing.JTextField(); + jBtnCerca = new javax.swing.JButton(); + jbtnAnnulla2 = new javax.swing.JButton(); + jCmbCat = new javax.swing.JComboBox(); + lblCognome1 = new javax.swing.JLabel(); + jtxtProdotto = new javax.swing.JTextField(); + lblCognome2 = new javax.swing.JLabel(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + jbtnElimina = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Cerca Prodotto"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblProdotti.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jTblProdotti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblProdotti); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Cerca Prodotti"); + + jbtnAggiungi.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAggiungi.setText("Aggiungi Prodotto"); + jbtnAggiungi.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAggiungiActionPerformed(evt); + } + }); + + lblCognome.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome.setText("Categoria:"); + + jtxtCodice.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jtxtCodice.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtCodiceFocusGained(evt); + } + }); + jtxtCodice.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtCodiceMouseClicked(evt); + } + }); + + jBtnCerca.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jBtnCerca.setText("Cerca"); + jBtnCerca.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnCercaActionPerformed(evt); + } + }); + + jbtnAnnulla2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N + jbtnAnnulla2.setText("Annulla"); + jbtnAnnulla2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnulla2ActionPerformed(evt); + } + }); + + jCmbCat.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jCmbCat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + lblCognome1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome1.setText("Codice:"); + + jtxtProdotto.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jtxtProdotto.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + jtxtProdottoFocusGained(evt); + } + }); + jtxtProdotto.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jtxtProdottoMouseClicked(evt); + } + }); + + lblCognome2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + lblCognome2.setText("Prodotto:"); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + jbtnElimina.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnElimina.setText("Elimina Prodotto"); + jbtnElimina.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnEliminaActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(lblCognome) + .addGap(0, 180, Short.MAX_VALUE)) + .addComponent(jCmbCat, 0, 274, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblCognome1) + .addComponent(jtxtCodice, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblCognome2) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jtxtProdotto, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBtnCerca, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnAnnulla2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnAggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jbtnElimina, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jScrollPane3)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCognome1) + .addComponent(lblCognome)) + .addComponent(lblCognome2) + .addGroup(pnl1Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCmbCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla2)) + .addComponent(jBtnCerca, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jtxtCodice) + .addComponent(jtxtProdotto)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jbtnAggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnElimina, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.Parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jbtnAggiungiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAggiungiActionPerformed + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblProdotti.getModel(); + Long cod = 0L; + if (jTblProdotti.getSelectedRow() >= 0) { + cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); + Boolean Cè = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (Cè == false) { + MyInsert("Insert into Catalogo_punti_cassa (id,id_prodotto,id_punto_cassa,flag_locale) values(-1," + cod + "," + frmPuntoCassa.idPuntoCassa + ",1)"); + frmPuntoCassa.caricaDati("PRODOTTI", "-1"); + this.dispose(); + } + + } + + }//GEN-LAST:event_jbtnAggiungiActionPerformed + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void jtxtCodiceFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtCodiceFocusGained + Tastiera(evt); +// MyApplication MyA = new MyApplication(); +// if (MyA.TastieraVideo) { +// if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { +// MyA.UltimoTxt = " "; +// } else { +// MyA.UltimoTxt = evt.getComponent().toString(); +// Tastiera((JTextField) evt.getComponent(), 0, 0); +// } +// } + }//GEN-LAST:event_jtxtCodiceFocusGained + + private void jBtnCercaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCercaActionPerformed +// if (jtxtProdotto.getText().trim().length()<=0){ +// JOptionPane.showMessageDialog(this, "Inserire la descrizione del prodotto!","Attenzione",JOptionPane.INFORMATION_MESSAGE); +// return; +// } + + Aggiorna(); + }//GEN-LAST:event_jBtnCercaActionPerformed + + private void jbtnAnnulla2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnulla2ActionPerformed + // ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; + this.dispose(); + + }//GEN-LAST:event_jbtnAnnulla2ActionPerformed + + private void jtxtProdottoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jtxtProdottoFocusGained + Tastiera(evt); + }//GEN-LAST:event_jtxtProdottoFocusGained + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblProdotti.getSelectedRow()>0){ + jTblProdotti.setRowSelectionInterval(jTblProdotti.getSelectedRow()-1, jTblProdotti.getSelectedRow()-1); + jTblProdotti.scrollRectToVisible(new Rectangle(jTblProdotti.getCellRect(jTblProdotti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblProdotti.getSelectedRow()<jTblProdotti.getRowCount()-1){ + jTblProdotti.setRowSelectionInterval(jTblProdotti.getSelectedRow()+1, jTblProdotti.getSelectedRow()+1); + jTblProdotti.scrollRectToVisible(new Rectangle(jTblProdotti.getCellRect(jTblProdotti.getSelectedRow(), 0, true))); + } + + }//GEN-LAST:event_jbtnGiuActionPerformed + + private void jtxtCodiceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxtCodiceMouseClicked + Tastiera(evt); + }//GEN-LAST:event_jtxtCodiceMouseClicked + + private void jtxtProdottoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxtProdottoMouseClicked + Tastiera(evt); + }//GEN-LAST:event_jtxtProdottoMouseClicked + + private void jbtnEliminaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEliminaActionPerformed + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblProdotti.getModel(); + Long cod = 0L; + if (jTblProdotti.getSelectedRow() >= 0) { + cod = Long.parseLong(model.getValueAt(jTblProdotti.getSelectedRow(), 0).toString()); + Boolean Cè = Boolean.parseBoolean(model.getValueAt(jTblProdotti.getSelectedRow(), 4).toString()); + if (Cè) { + MyInsert("Delete Catalogo_punti_cassa where id_prodotto=" + cod + " and id_punto_cassa=" + frmPuntoCassa.idPuntoCassa); + frmPuntoCassa.caricaDati("PRODOTTI", "-1"); + this.dispose(); + } + + } + }//GEN-LAST:event_jbtnEliminaActionPerformed + private void Tastiera(java.awt.event.MouseEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + //java.awt.event.FocusEvent + private void Tastiera(java.awt.event.FocusEvent evt) { + MyApplication MyA = new MyApplication(); + if (MyA.TastieraVideo) { + if (MyA.UltimoTxt.equalsIgnoreCase(evt.getComponent().toString())) { + MyA.UltimoTxt = " "; + } else { + MyA.UltimoTxt = evt.getComponent().toString(); + Tastiera((JTextField) evt.getComponent(), 0, 0); + } + } + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + TableColumn column1 = jTbl.getColumn("Prodotto"); + column1.setPreferredWidth(380); + column1.setWidth(380); +// TableColumn column2 = jTbl.getColumn("Codice"); +// column2.setPreferredWidth(20); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private void Aggiorna() { + try { + String From=" from prodotti p, categorie_prodotti c "; + String Where = " WHERE p.id_categoria = c.id "; + if (jtxtCodice.getText().trim().length() > 0) { + Where = Where + " and upper(p.codice) like '" + jtxtCodice.getText().trim().replace("'", "''").toUpperCase() + "%' "; + } + if (jtxtProdotto.getText().trim().length() > 0) { + Where = Where + " and upper(p.nome) like '%" + jtxtProdotto.getText().trim().replace("'", "''").toUpperCase() + "%' "; + } + + ComboItem c = new ComboItem(null, null); + c = (ComboItem) jCmbCat.getSelectedItem(); + + if (c.getKey() > 0) { + Where = Where + " and p.id_categoria = " + c.getKey(); + } + String[] Col = {"id","Categoria","Codice","Prodotto","Presente"}; + String[] ColType = {"long", "text","text","text","boolean"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select p.id,c.nome as categoria,p.codice, p.nome as prodotto, prodotto_in_catalogo (p.id, " + frmPuntoCassa.idPuntoCassa + ") as presente " + From + Where + " order by c.nome,p.nome", QueryCount, Col, ColType, jTblProdotti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + //Font f=new Font("Tahoma",0,HFont); + Font f=new Font("Tahoma",0,20); + jTblProdotti.setFont(f); + jTblProdotti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblProdotti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + //jTblProdotti.setRowHeight(CalcolaLarghezzaAltezza(AltRigaGriglia,AltControlli)); + jTblProdotti.setRowHeight(25); + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblProdotti.getRowCount() > 0) { + jTblProdotti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0]; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmProdotti.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmProdotti(null,null).setVisible(true); + } + }); + } + private void CaricaCombo (String Query, String itemValue, String itemId, JComboBox cmb) { + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Connection c = dbConnection; + Statement stmt = null; + cmb.removeAllItems(); + stmt = c.createStatement(); + ResultSet rs = stmt.executeQuery(Query); + int r = 0; + while (rs.next()) { + + ComboItem row=new ComboItem(rs.getLong(itemId), rs.getString(itemValue)) ; + cmb.addItem(row); + + r++; + + } + rs.close(); + stmt.close(); + dbConnection.close(); + + } catch (SQLException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } + + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnCerca; + private javax.swing.JComboBox jCmbCat; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblProdotti; + private javax.swing.JButton jbtnAggiungi; + private javax.swing.JButton jbtnAnnulla2; + private javax.swing.JButton jbtnElimina; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JTextField jtxtCodice; + private javax.swing.JTextField jtxtProdotto; + private javax.swing.JLabel lblCognome; + private javax.swing.JLabel lblCognome1; + private javax.swing.JLabel lblCognome2; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/frmProgress.form b/src/puntocassa/frmProgress.form new file mode 100644 index 0000000..fec8c73 --- /dev/null +++ b/src/puntocassa/frmProgress.form @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Aggiorna database..."/> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Cursore predefinito"/> + </Property> + <Property name="resizable" type="boolean" value="false"/> + <Property name="type" type="java.awt.Window$Type" editor="org.netbeans.modules.form.editors.EnumEditor"> + <Value id="POPUP"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pnl1" alignment="1" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="pnl1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" pref="377" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" pref="104" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="horizontalAlignment" type="int" value="0"/> + <Property name="text" type="java.lang.String" value="Aggiornamento in corso..."/> + <Property name="horizontalTextPosition" type="int" value="0"/> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmProgress.java b/src/puntocassa/frmProgress.java new file mode 100644 index 0000000..9734297 --- /dev/null +++ b/src/puntocassa/frmProgress.java @@ -0,0 +1,161 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Properties; +import javax.swing.ImageIcon; +import javax.swing.JComboBox; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmProgress extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + + /** + * Creates new form frm + */ + public frmProgress(PuntoCassa frm) { + frmPuntoCassa=frm; + initComponents(); + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Aggiorna database..."); + setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + setResizable(false); + setType(java.awt.Window.Type.POPUP); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel1.setText("Aggiornamento in corso..."); + jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnl1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + frmPuntoCassa.setEnabled(true); + + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + + frmPuntoCassa=null; + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmProgress.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmProgress(null).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/puntocassa/frmStorno.form b/src/puntocassa/frmStorno.form new file mode 100644 index 0000000..388bff0 --- /dev/null +++ b/src/puntocassa/frmStorno.form @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" value="Storno"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <Events> + <EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/> + </Events> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="850" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="307" max="32767" attributes="0"/> + <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="pnl1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="pnl1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jScrollPane3" pref="768" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jbtnSu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + <Component id="jbtnGiu" alignment="0" min="-2" pref="60" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jBtnOK" min="-2" pref="215" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jbtnAnnulla" min="-2" pref="215" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLblTitolo" min="-2" pref="25" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane3" pref="223" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="jbtnSu" min="-2" pref="55" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jbtnGiu" min="-2" pref="53" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jBtnOK" alignment="3" min="-2" pref="36" max="-2" attributes="0"/> + <Component id="jbtnAnnulla" alignment="3" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="jTblStudenti"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="0" rowCount="4"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jbtnAnnulla"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Annulla"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnAnnullaActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLblTitolo"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="horizontalAlignment" type="int" value="2"/> + <Property name="text" type="java.lang.String" value="Storno"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jBtnOK"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Storna"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBtnOKActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnSu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnSuActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jbtnGiu"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnGiuActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/src/puntocassa/frmStorno.java b/src/puntocassa/frmStorno.java new file mode 100644 index 0000000..74ff2b5 --- /dev/null +++ b/src/puntocassa/frmStorno.java @@ -0,0 +1,587 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package puntocassa; + +import java.awt.Font; +import java.awt.Image; +import java.awt.KeyboardFocusManager; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.table.TableColumn; + +/** + * + * @author Marco + */ +public class frmStorno extends javax.swing.JFrame { + + private PuntoCassa frmPuntoCassa; + private Long idTessera=0L,idPuntoCassa=0L; + public int HFont = 15; + private int AltControlli = 100; + private int LargControlli = 100; + private int AltRigaGriglia = 0; + private Boolean Azzera=false; + private Boolean StornoEffettuato=false; + + /** + * Creates new form frm + */ + public frmStorno(PuntoCassa frm,Long IDTessera,Long IDPuntoCassa,String imgPath,Boolean azzera) { + + frmPuntoCassa=frm; + frmPuntoCassa.setEnabled(false); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(false); + + idPuntoCassa=IDPuntoCassa; + idTessera=IDTessera; + Azzera=azzera; + initComponents(); + + String startDir = System.getProperty("user.dir"); + File IconaApp = new File(startDir + "/risorse/logo.png"); + if (IconaApp.exists()) { + + ImageIcon icon = new ImageIcon(startDir + "/risorse/logo.png"); + this.setIconImage(icon.getImage()); + } + + + ImageIcon icon = new ImageIcon(imgPath +"freccia_down.jpg"); + Image img = icon.getImage() ; + Image newimg = img.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon = new ImageIcon(newimg); + jbtnGiu.setIcon(icon); + + ImageIcon icon2 = new ImageIcon(imgPath +"freccia_up.jpg"); + Image img2 = icon2.getImage() ; + Image newimg2 = img2.getScaledInstance(50,50,java.awt.Image.SCALE_SMOOTH ) ; + icon2 = new ImageIcon(newimg2); + jbtnSu.setIcon(icon2); + Aggiorna(); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + pnl1 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTblStudenti = new javax.swing.JTable(); + jbtnAnnulla = new javax.swing.JButton(); + jLblTitolo = new javax.swing.JLabel(); + jBtnOK = new javax.swing.JButton(); + jbtnSu = new javax.swing.JButton(); + jbtnGiu = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Storno"); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosed(java.awt.event.WindowEvent evt) { + formWindowClosed(evt); + } + }); + + jTblStudenti.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jTblStudenti.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {}, + {}, + {}, + {} + }, + new String [] { + + } + )); + jScrollPane3.setViewportView(jTblStudenti); + + jbtnAnnulla.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jbtnAnnulla.setText("Annulla"); + jbtnAnnulla.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnAnnullaActionPerformed(evt); + } + }); + + jLblTitolo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLblTitolo.setForeground(new java.awt.Color(255, 0, 0)); + jLblTitolo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLblTitolo.setText("Storno"); + + jBtnOK.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jBtnOK.setText("Storna"); + jBtnOK.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBtnOKActionPerformed(evt); + } + }); + + jbtnSu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnSuActionPerformed(evt); + } + }); + + jbtnGiu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbtnGiuActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1); + pnl1.setLayout(pnl1Layout); + pnl1Layout.setHorizontalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(8, 8, 8)) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + pnl1Layout.setVerticalGroup( + pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl1Layout.createSequentialGroup() + .addComponent(jLblTitolo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE) + .addGroup(pnl1Layout.createSequentialGroup() + .addComponent(jbtnSu, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jbtnGiu, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jBtnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jbtnAnnulla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 850, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 307, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pnl1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap())) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jbtnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnAnnullaActionPerformed +// ClearTable((MyTableModel)jTblStudenti.getModel()); + +// frmPuntoCassa.setEnabled(true); +// frmPuntoCassa=null; +// if (Azzera){ +// frmPuntoCassa.AzzeraDopoStorno(); +// } + this.dispose(); + + }//GEN-LAST:event_jbtnAnnullaActionPerformed + private void ClearTable(MyTableModel model) { + try { + for (Integer i = model.getRowCount() - 1; i >= 0; i--) { + model.deleteRow(i); + } + } catch (Exception e) { + } + } + private void Tastiera(JTextField jTxt,Integer MyX,Integer MyY){ + + MyKeyBoard myk=new MyKeyBoard(this,false); + myk.txt=jTxt; + myk.Parent=this; + Rectangle s=this.getBounds(); + Rectangle s2=jTxt.getBounds(); + Integer l=s.x+s2.x+MyX; + if(l+800>s.x+s.width){l=s.x+s.width-800;} + myk.setBounds(l,s.y+s2.y+60+MyY, 800, 300); + myk.setVisible(true); + + } + private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed + try{ + + frmPuntoCassa.setEnabled(true); + //KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(frmPuntoCassa.keyDispatcher); + frmPuntoCassa.AddRemoveKeyDispatcher(true); + frmPuntoCassa.toFront(); + frmPuntoCassa.repaint(); + if (Azzera && StornoEffettuato==false){ + frmPuntoCassa.AzzeraDopoStorno(); + } + frmPuntoCassa=null; + + this.dispose(); + }catch(Exception ex){} + }//GEN-LAST:event_formWindowClosed + + private void jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOKActionPerformed + if (jTblStudenti.getSelectedRow() >= 0 ) { + MyTableModel model = new MyTableModel(); + model = (MyTableModel) jTblStudenti.getModel(); + Object[]row = model.getRow(jTblStudenti.getSelectedRow()); + // QueryDati("select a.id 0,a.data 1,a.num_progressivo as Progressivo 2,p.nome as Prodotto,a.importo 4,a.punti 5,a.saldo_pre,a.saldo_post,a.punti_pre,a.punti_post,p.id as idProdotto " + From + Where + " order by a.data,a.num_progressivo", QueryCount, Col, ColType, jTblStudenti, false); + + //Boolean Ok=MyInsert("insert into ristorni (ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO) " + + // "values (" + idTessera + "," + row[1] + "," + idPuntoCassa + ",to_date('" + row[2] + "','dd/mm/yyyy HH24:MI:SS')," + row[3] + ","+ row[5] + "," + row[6] + "," + row[7] + "," + row[8] + ")"); + Boolean Ok=MyInsert("insert into ristorni (ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO,FLAG_IN_VASSOIO,SALDO_PRE,SALDO_POST,PUNTI_PRE,PUNTI_POST,FLAG_GRATUITA,FLAG_ASPORTO,FLAG_BONUS) " + + "SELECT ID_TESSERA,ID_PRODOTTO,ID_PUNTO_CASSA,DATA,NUM_PROGRESSIVO,IMPORTO,PUNTI,ID_TIPO_PAGAMENTO,ID_TURNO,FLAG_IN_VASSOIO,SALDO_PRE,SALDO_POST,PUNTI_PRE,PUNTI_POST,FLAG_GRATUITA,FLAG_ASPORTO,FLAG_BONUS " + + "FROM st_acquisti WHERE num_progressivo = " + row[3]); + if(Ok){ + //MyInsert("Delete from St_Acquisti where id="+ row[0]); + MyInsert("Delete from St_Acquisti where num_progressivo="+ row[3]); + StornoEffettuato=true; + } + + + + if (Azzera){ +// frmPuntoCassa.AzzeraDopoStorno(); + }else + { + frmPuntoCassa.AggiornaProgressivi(); + } + //frmPuntoCassa.CercaTessera(); + this.dispose(); + } + + }//GEN-LAST:event_jBtnOKActionPerformed + + private void jbtnSuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()>0){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()-1, jTblStudenti.getSelectedRow()-1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + }//GEN-LAST:event_jbtnSuActionPerformed + + private void jbtnGiuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnGiuActionPerformed + // TODO add your handling code here: + if(jTblStudenti.getSelectedRow()<jTblStudenti.getRowCount()-1){ + jTblStudenti.setRowSelectionInterval(jTblStudenti.getSelectedRow()+1, jTblStudenti.getSelectedRow()+1); + jTblStudenti.scrollRectToVisible(new Rectangle(jTblStudenti.getCellRect(jTblStudenti.getSelectedRow(), 0, true))); + } + + }//GEN-LAST:event_jbtnGiuActionPerformed + private Boolean MyInsert(String Query) { + Boolean res=false; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rs.close(); + st.close(); + dbConnection.close(); + res=true; + } catch (SQLException e) { + JOptionPane.showMessageDialog(this, "Errore MySelect ['" + e.getMessage() + " " + Query + "']"); + + } + return res; + } + private void QueryDati(String Query,String QueryCount,String[] Colonne,String[] ColType, JTable jTbl,Boolean Editable){ + try{ + MyApplication MyA=new MyApplication(); + MyTableModel model = new MyTableModel( ); + model.setColumname(Colonne); + + +// model.setEditable(Editable); +// int [] colBool=new int[1]; +// colBool[0]=7; +// model.setColBoolean(colBool); +// int[] cols=new int[1]; +// cols[0]=7; +// model.setColModificabile(cols); + int rowCount=Integer.parseInt(MyA.MySelect(frmPuntoCassa,QueryCount, "righe")); + Object[][] data = RowData(Query, Colonne,ColType,rowCount); + model.setData(data); + + try{jTbl.setModel(model);}catch(Exception e){} + jTbl.setAutoCreateColumnsFromModel(true); + + jTbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + jTbl.getTableHeader().setFont(new Font("Tahoma", Font.BOLD, 16)); + jTbl.setFont(new Font("Tahoma", 0, 16)); + + + TableColumn column = jTbl.getColumn("id"); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + column.setPreferredWidth(0); + + TableColumn column2 = jTbl.getColumn("idProdotto"); + column2.setMinWidth(0); + column2.setMaxWidth(0); + column2.setWidth(0); + column2.setPreferredWidth(0); + + TableColumn column3 = jTbl.getColumn("id_Tipo_Pagamento"); + column3.setMinWidth(0); + column3.setMaxWidth(0); + column3.setWidth(0); + column3.setPreferredWidth(0); + + TableColumn column4 = jTbl.getColumn("id_Turno"); + column4.setMinWidth(0); + column4.setMaxWidth(0); + column4.setWidth(0); + column4.setPreferredWidth(0); + + TableColumn column1 = jTbl.getColumn("Prodotto"); + column1.setPreferredWidth(280); + column1.setWidth(280); + + TableColumn column11 = jTbl.getColumn("Data"); + column11.setPreferredWidth(180); + column11.setWidth(180); + + model.fireTableDataChanged(); + + doLayout(); + }catch(NumberFormatException e){ + + System.out.println("Query: " + e.getMessage()); + } + + } + private void Aggiorna() { + try { + String From=" from st_acquisti a inner join prodotti p on a.id_prodotto=p.id inner join Tipi_Pagamenti tp on a.id_tipo_pagamento=tp.id "; + String Where= "where TRUNC(data) = TRUNC(SYSDATE) and id_tessera=" + idTessera + " and flag_in_vassoio=0 and id_punto_cassa=" + idPuntoCassa ; +// String Where= " and UPPER(Cognome) like '" + jtxtCognome.getText().trim().toUpperCase().replace("'", "''") + "%' "; +// if (jtxtNome.getText().trim().length()>0) {Where=Where + " and UPPER(Nome) like '" + jtxtNome.getText().trim().toUpperCase().replace("'", "''") + "%'"; } +// if (jtxtCodFis.getText().trim().length()>0) {Where=Where + " and UPPER(Matricola) like '" + jtxtCodFis.getText().trim().toUpperCase().replace("'", "''") + "%'"; } + String[] Col = {"id", "idProdotto", "Data","Progressivo","Prodotto","Importo","id_Tipo_Pagamento","id_Turno","Pagamento"}; + String[] ColType = {"long", "long", "data","integer", "text", "float", "long", "long", "text"}; + String QueryCount="Select count(*) as righe " + From + Where; + QueryDati("select a.id,p.id as idProdotto,a.data,a.num_progressivo as Progressivo,p.nome as Prodotto,a.importo,a.id_tipo_pagamento,a.id_turno,tp.Nome as Pagamento " + From + Where + " order by a.data desc,a.num_progressivo desc", QueryCount, Col, ColType, jTblStudenti, false); + + //jTblStudenti.getColumn("Drawing").setPreferredWidth(200); + + + + Font f=new Font("Tahoma",0,18); + jTblStudenti.setFont(f); + if(AltRigaGriglia==0){AltRigaGriglia=jTblStudenti.getRowHeight();} +// txtUsername.setSize(CalcolaLarghezzaAltezza(txtUsername.getWidth(),LargControlli), CalcolaLarghezzaAltezza(txtUsername.getHeight(),AltControlli)); + + jTblStudenti.setRowHeight(25); + + + //ClearTable((MyTableModel)jTblTessere.getModel()); + + if (jTblStudenti.getRowCount() > 0) { + jTblStudenti.setRowSelectionInterval(0, 0); + + } + ///AggiornaTessera(0); + + + } catch (Exception e) { + } + } + private Integer CalcolaLarghezzaAltezza(Integer LarControllo,Integer Percentuale){ + Integer D = Percentuale - 100; + if (D == 0) { + return LarControllo; + } else { + Integer N = LarControllo + ((LarControllo * D) / 100); + return N; + } + + } + public Object[][] RowData(String Query, String[] Cols, String[] ColType, int rowCount) { + Object[][] rows = null; + try { + Connection dbConnection = DriverManager.getConnection(frmPuntoCassa.dbStringa, frmPuntoCassa.dbUsername, frmPuntoCassa.dbPassword); + Statement st = dbConnection.createStatement(); + ResultSet rs = st.executeQuery(Query); + rows = new Object[rowCount][]; + int r = 0; + while (rs.next()) { + Object[] row = new Object[Cols.length]; + for (int i = 0; i < Cols.length; i++) { + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + switch (ColType[i]) { + case "text": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = ""; + } else { + row[i] = rs.getString(Cols[i].replace(" ", "_")); + } + break; + case "integer": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getInt(Cols[i].replace(" ", "_")); + } + break; + case "long": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0; + } else { + row[i] = rs.getLong(Cols[i].replace(" ", "_")); + } + break; + case "boolean": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = false; + } else { + row[i] = rs.getBoolean(Cols[i].replace(" ", "_")); + } + break; + case "float": + if (rs.getString(Cols[i].replace(" ", "_")) == null) { + row[i] = 0.00; + } else { + String v = rs.getString(Cols[i].replace(" ", "_")); + + row[i] = Float.parseFloat(v.replace(",", ".")); + } + + break; + + case "data": + row[i] = ""; + if (rs.getString(Cols[i].replace(" ", "_")) != null) { +// Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ITALY).parse(rs.getString(Cols[i])); + //SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String[] d= rs.getString(Cols[i].replace(" ", "_")).split("-"); + if (d.length>=3){ + String Ora=""; + + if(d[2].length()>8){ + String O[]=d[2].trim().split(" "); + if(O.length>1){ + if(O[1].length()>=8){ + Ora=O[1].substring(0, 8); + } + } + } + row[i] = d[2].trim().substring(0, 2) + "/" + d[1] + "/" + d[0] + " " + Ora; + } + } + + break; + } + + } + rows[r] = row; + r++; + /*int id = rs.getInt("id"); + String name = rs.getString("name"); + int age = rs.getInt("age"); + String address = rs.getString("address"); + float salary = rs.getFloat("salary");*/ + + } + rs.close(); + st.close(); + dbConnection.close(); + + } catch (SQLException | NumberFormatException e) { + System.err.println(e.getClass().getName() + ": " + e.getMessage()); + } finally { + + return rows; + } + + } + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(frmStorno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmStorno(null,0L,0L,null,false).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jBtnOK; + private javax.swing.JLabel jLblTitolo; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable jTblStudenti; + private javax.swing.JButton jbtnAnnulla; + private javax.swing.JButton jbtnGiu; + private javax.swing.JButton jbtnSu; + private javax.swing.JPanel pnl1; + // End of variables declaration//GEN-END:variables +} diff --git a/src/risorse/Acqua minerale.jpg b/src/risorse/Acqua minerale.jpg new file mode 100644 index 0000000..416cc55 Binary files /dev/null and b/src/risorse/Acqua minerale.jpg differ diff --git a/src/risorse/Brioche.jpg b/src/risorse/Brioche.jpg new file mode 100644 index 0000000..df3217e Binary files /dev/null and b/src/risorse/Brioche.jpg differ diff --git a/src/risorse/Caffe.jpg b/src/risorse/Caffe.jpg new file mode 100644 index 0000000..8615520 Binary files /dev/null and b/src/risorse/Caffe.jpg differ diff --git a/src/risorse/Cappuccino.jpg b/src/risorse/Cappuccino.jpg new file mode 100644 index 0000000..89f67f8 Binary files /dev/null and b/src/risorse/Cappuccino.jpg differ diff --git a/src/risorse/Coca Cola lattina.jpg b/src/risorse/Coca Cola lattina.jpg new file mode 100644 index 0000000..2f1da8e Binary files /dev/null and b/src/risorse/Coca Cola lattina.jpg differ diff --git a/src/risorse/Frutta fresca.jpg b/src/risorse/Frutta fresca.jpg new file mode 100644 index 0000000..a303980 Binary files /dev/null and b/src/risorse/Frutta fresca.jpg differ diff --git a/src/risorse/Hamburger.jpg b/src/risorse/Hamburger.jpg new file mode 100644 index 0000000..71e7a92 Binary files /dev/null and b/src/risorse/Hamburger.jpg differ diff --git a/src/risorse/Insalata nizzarda.jpg b/src/risorse/Insalata nizzarda.jpg new file mode 100644 index 0000000..42891cb Binary files /dev/null and b/src/risorse/Insalata nizzarda.jpg differ diff --git a/src/risorse/Insalata verde.jpg b/src/risorse/Insalata verde.jpg new file mode 100644 index 0000000..78fa2b3 Binary files /dev/null and b/src/risorse/Insalata verde.jpg differ diff --git a/src/risorse/Logo.ico b/src/risorse/Logo.ico new file mode 100644 index 0000000..2828b6c Binary files /dev/null and b/src/risorse/Logo.ico differ diff --git a/src/risorse/Menu colazione.jpg b/src/risorse/Menu colazione.jpg new file mode 100644 index 0000000..0d643b5 Binary files /dev/null and b/src/risorse/Menu colazione.jpg differ diff --git a/src/risorse/Menu completo.jpg b/src/risorse/Menu completo.jpg new file mode 100644 index 0000000..92417af Binary files /dev/null and b/src/risorse/Menu completo.jpg differ diff --git a/src/risorse/Menu ridotto.jpg b/src/risorse/Menu ridotto.jpg new file mode 100644 index 0000000..a696599 Binary files /dev/null and b/src/risorse/Menu ridotto.jpg differ diff --git a/src/risorse/Movimenti.jpg b/src/risorse/Movimenti.jpg new file mode 100644 index 0000000..069bfeb Binary files /dev/null and b/src/risorse/Movimenti.jpg differ diff --git a/src/risorse/Movimenti.png b/src/risorse/Movimenti.png new file mode 100644 index 0000000..6d3773f Binary files /dev/null and b/src/risorse/Movimenti.png differ diff --git a/src/risorse/Omelette.jpg b/src/risorse/Omelette.jpg new file mode 100644 index 0000000..afe6bb4 Binary files /dev/null and b/src/risorse/Omelette.jpg differ diff --git a/src/risorse/Pasta al ragu.jpg b/src/risorse/Pasta al ragu.jpg new file mode 100644 index 0000000..13e469b Binary files /dev/null and b/src/risorse/Pasta al ragu.jpg differ diff --git a/src/risorse/Pasta fredda.jpg b/src/risorse/Pasta fredda.jpg new file mode 100644 index 0000000..8216fae Binary files /dev/null and b/src/risorse/Pasta fredda.jpg differ diff --git a/src/risorse/Prosciutto crudo.jpg b/src/risorse/Prosciutto crudo.jpg new file mode 100644 index 0000000..228779e Binary files /dev/null and b/src/risorse/Prosciutto crudo.jpg differ diff --git a/src/risorse/Risotto.jpg b/src/risorse/Risotto.jpg new file mode 100644 index 0000000..0308f6e Binary files /dev/null and b/src/risorse/Risotto.jpg differ diff --git a/src/risorse/Spremuta arancia.jpg b/src/risorse/Spremuta arancia.jpg new file mode 100644 index 0000000..87593ea Binary files /dev/null and b/src/risorse/Spremuta arancia.jpg differ diff --git a/src/risorse/Thumbs.db b/src/risorse/Thumbs.db new file mode 100644 index 0000000..4ad42a6 Binary files /dev/null and b/src/risorse/Thumbs.db differ diff --git a/src/risorse/Tiramisu.jpg b/src/risorse/Tiramisu.jpg new file mode 100644 index 0000000..db5f013 Binary files /dev/null and b/src/risorse/Tiramisu.jpg differ diff --git a/src/risorse/Vetrino.jpg b/src/risorse/Vetrino.jpg new file mode 100644 index 0000000..eab164e Binary files /dev/null and b/src/risorse/Vetrino.jpg differ diff --git a/src/risorse/a scalare.png b/src/risorse/a scalare.png new file mode 100644 index 0000000..f5400ee Binary files /dev/null and b/src/risorse/a scalare.png differ diff --git a/src/risorse/coltello e forchetta.jpg b/src/risorse/coltello e forchetta.jpg new file mode 100644 index 0000000..235b635 Binary files /dev/null and b/src/risorse/coltello e forchetta.jpg differ diff --git a/src/risorse/contanti.png b/src/risorse/contanti.png new file mode 100644 index 0000000..ad3f601 Binary files /dev/null and b/src/risorse/contanti.png differ diff --git a/src/risorse/da asporto.jpg b/src/risorse/da asporto.jpg new file mode 100644 index 0000000..033b098 Binary files /dev/null and b/src/risorse/da asporto.jpg differ diff --git a/src/risorse/db.png b/src/risorse/db.png new file mode 100644 index 0000000..08708f3 Binary files /dev/null and b/src/risorse/db.png differ diff --git a/src/risorse/differito.jpg b/src/risorse/differito.jpg new file mode 100644 index 0000000..59b3f23 Binary files /dev/null and b/src/risorse/differito.jpg differ diff --git a/src/risorse/differito.png b/src/risorse/differito.png new file mode 100644 index 0000000..902bca9 Binary files /dev/null and b/src/risorse/differito.png differ diff --git a/src/risorse/esci.jpg b/src/risorse/esci.jpg new file mode 100644 index 0000000..69febe7 Binary files /dev/null and b/src/risorse/esci.jpg differ diff --git a/src/risorse/esci2.jpg b/src/risorse/esci2.jpg new file mode 100644 index 0000000..10a0aeb Binary files /dev/null and b/src/risorse/esci2.jpg differ diff --git a/src/risorse/freccia_down.jpg b/src/risorse/freccia_down.jpg new file mode 100644 index 0000000..b5a8964 Binary files /dev/null and b/src/risorse/freccia_down.jpg differ diff --git a/src/risorse/freccia_dx.jpg b/src/risorse/freccia_dx.jpg new file mode 100644 index 0000000..a3bfff1 Binary files /dev/null and b/src/risorse/freccia_dx.jpg differ diff --git a/src/risorse/freccia_sx.jpg b/src/risorse/freccia_sx.jpg new file mode 100644 index 0000000..8845cfb Binary files /dev/null and b/src/risorse/freccia_sx.jpg differ diff --git a/src/risorse/freccia_up.jpg b/src/risorse/freccia_up.jpg new file mode 100644 index 0000000..bfbd19a Binary files /dev/null and b/src/risorse/freccia_up.jpg differ diff --git a/src/risorse/fulmine.jpg b/src/risorse/fulmine.jpg new file mode 100644 index 0000000..76a0929 Binary files /dev/null and b/src/risorse/fulmine.jpg differ diff --git a/src/risorse/fulmine.png b/src/risorse/fulmine.png new file mode 100644 index 0000000..d9f3bd6 Binary files /dev/null and b/src/risorse/fulmine.png differ diff --git a/src/risorse/giù.png b/src/risorse/giù.png new file mode 100644 index 0000000..3e35679 Binary files /dev/null and b/src/risorse/giù.png differ diff --git a/src/risorse/logo (1).png b/src/risorse/logo (1).png new file mode 100644 index 0000000..1eea74d Binary files /dev/null and b/src/risorse/logo (1).png differ diff --git a/src/risorse/logo.png b/src/risorse/logo.png new file mode 100644 index 0000000..500ce11 Binary files /dev/null and b/src/risorse/logo.png differ diff --git a/src/risorse/logoStampa.jpg b/src/risorse/logoStampa.jpg new file mode 100644 index 0000000..005ba66 Binary files /dev/null and b/src/risorse/logoStampa.jpg differ diff --git a/src/risorse/meteo.png b/src/risorse/meteo.png new file mode 100644 index 0000000..17ed983 Binary files /dev/null and b/src/risorse/meteo.png differ diff --git a/src/risorse/print.png b/src/risorse/print.png new file mode 100644 index 0000000..42999cc Binary files /dev/null and b/src/risorse/print.png differ diff --git a/src/risorse/prodotti.png b/src/risorse/prodotti.png new file mode 100644 index 0000000..3ba74d2 Binary files /dev/null and b/src/risorse/prodotti.png differ diff --git a/src/risorse/puntocassa (2).xml b/src/risorse/puntocassa (2).xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/src/risorse/puntocassa (2).xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<root> + <database> + <attivo>NO</attivo> + <tipo>MySQL</tipo> + <driver>com.mysql.jdbc.Driver</driver> + <server>localhost</server> + <porta>3306</porta> + <istanza>sir</istanza> + <username>sir</username> + <password>sir</password> + </database> + <database> + <attivo>SI</attivo> + <tipo>Oracle</tipo> + <driver>oracle.jdbc.driver.OracleDriver</driver> + <server>localhost</server> + <porta>1521</porta> + <istanza>xe</istanza> + <username>SIR_CASSA</username> + <password>sir_cassa</password> + </database> + <path> + <img_path>..\risorse\</img_path> + <Aggiornamento>E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar</Aggiornamento> + </path> + <etichette> + <titolo>SIR - Sistema Informativo della Ristorazione: Punto Cassa </titolo> + </etichette> + + <display> + <larghezza>1024</larghezza> + <altezza>700</altezza> + <fontSize>20</fontSize> + <altezzaControlli>150</altezzaControlli> + <larghezzaControlli>150</larghezzaControlli> + <TastieraVideo>SI</TastieraVideo> + </display> + + <Visualizza_Messaggi_Display>NO</Visualizza_Messaggi_Display> + <!--max 40 caratteri 20 per riga--> + <Messaggio_Display>DSU TOSCANA - SIR</Messaggio_Display> +</root> diff --git a/src/risorse/puntocassa - Copia.xml b/src/risorse/puntocassa - Copia.xml new file mode 100644 index 0000000..308d9a4 --- /dev/null +++ b/src/risorse/puntocassa - Copia.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<root> + <database> + <attivo>NO</attivo> + <tipo>MySQL</tipo> + <driver>com.mysql.jdbc.Driver</driver> + <server>localhost</server> + <porta>3306</porta> + <istanza>sir</istanza> + <username>sir</username> + <password>sir</password> + </database> + <database> + <attivo>SI</attivo> + <tipo>Oracle</tipo> + <driver>oracle.jdbc.driver.OracleDriver</driver> + <server>marco-nbacer</server> + <porta>1521</porta> + <istanza>XE</istanza> + <username>SIR_CASSA</username> + <password>sir_cassa</password> + </database> + <path> + <img_path>L:\Lavoro\Goffredo\risorse\</img_path> + </path> + <etichette> + <titolo>SIR - Sistema Informativo della Ristorazione: Punto Cassa 123</titolo> + </etichette> + <display> + <larghezza>1024</larghezza> + <altezza>700</altezza> + </display> + <ID_Punto_Cassa>123</ID_Punto_Cassa> +</root> diff --git a/src/risorse/puntocassa.xml b/src/risorse/puntocassa.xml new file mode 100644 index 0000000..dc32e9a --- /dev/null +++ b/src/risorse/puntocassa.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<root> + <database> + <attivo>NO</attivo> + <tipo>MySQL</tipo> + <driver>com.mysql.jdbc.Driver</driver> + <server>localhost</server> + <porta>3306</porta> + <istanza>sir</istanza> + <username>sir</username> + <password>sir</password> + </database> + <database> + <attivo>SI</attivo> + <tipo>Oracle</tipo> + <driver>oracle.jdbc.driver.OracleDriver</driver> + <server>localhost</server> + <porta>1521</porta> + <istanza>xe</istanza> + <username>SIR_CASSA</username> + <password>sir_cassa</password> + </database> + <path> + <img_path>..\risorse\</img_path> + <Aggiornamento>E:\Lavoro\Goffredo\Cassa\dist\Cassa.jar</Aggiornamento> + </path> + <etichette> + <titolo>SIR - Sistema Informativo della Ristorazione: Punto Cassa </titolo> + </etichette> + + <display> + <larghezza>1024</larghezza> + <altezza>700</altezza> + <fontSize>20</fontSize> + <altezzaControlli>150</altezzaControlli> + <larghezzaControlli>150</larghezzaControlli> + <TastieraVideo>SI</TastieraVideo> + </display> + + <Visualizza_Messaggi_Display>NO</Visualizza_Messaggi_Display> + <!--max 40 caratteri 20 per riga--> + <Messaggio_Display>DSU TOSCANA - SIR</Messaggio_Display> +</root> diff --git a/src/risorse/puntocassaGF.xml b/src/risorse/puntocassaGF.xml new file mode 100644 index 0000000..e5bac86 --- /dev/null +++ b/src/risorse/puntocassaGF.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<root> + <database> + <attivo>NO</attivo> + <tipo>MySQL</tipo> + <driver>com.mysql.jdbc.Driver</driver> + <server>localhost</server> + <porta>3306</porta> + <istanza>sir</istanza> + <username>sir</username> + <password>sir</password> + </database> + <database> + <attivo>SI</attivo> + <tipo>Oracle</tipo> + <driver>oracle.jdbc.driver.OracleDriver</driver> + <server>XP_TEST</server> + <porta>1521</porta> + <istanza>XE</istanza> + <username>SIR_CASSA</username> + <password>sir_cassa</password> + </database> + <path> + <img_path>L:\Lavoro\Goffredo\risorse\</img_path> + </path> + <etichette> + <titolo>SIR - Sistema Informativo della Ristorazione: Punto Cassa 123</titolo> + </etichette> + <display> + <larghezza>1024</larghezza> + <altezza>700</altezza> + <fontSize>20</fontSize> + <altezzaControlli>150</altezzaControlli> + <larghezzaControlli>150</larghezzaControlli> + </display> + <ID_Punto_Cassa>1</ID_Punto_Cassa> +</root> diff --git a/src/risorse/storno.png b/src/risorse/storno.png new file mode 100644 index 0000000..a7071da Binary files /dev/null and b/src/risorse/storno.png differ diff --git a/src/risorse/ticket.png b/src/risorse/ticket.png new file mode 100644 index 0000000..00b3125 Binary files /dev/null and b/src/risorse/ticket.png differ diff --git a/src/risorse/ticket2.png b/src/risorse/ticket2.png new file mode 100644 index 0000000..f2759b1 Binary files /dev/null and b/src/risorse/ticket2.png differ diff --git a/src/risorse/tsn.png b/src/risorse/tsn.png new file mode 100644 index 0000000..cc35a2e Binary files /dev/null and b/src/risorse/tsn.png differ