diff --git a/dist/Programa Caja.jar b/dist/Programa Caja.jar index 25ff2bc..2ffa918 100644 Binary files a/dist/Programa Caja.jar and b/dist/Programa Caja.jar differ diff --git a/src/danielcortes/xyz/models/caja/CajaDAO.java b/src/danielcortes/xyz/models/caja/CajaDAO.java index 941f7d3..b96cd52 100644 --- a/src/danielcortes/xyz/models/caja/CajaDAO.java +++ b/src/danielcortes/xyz/models/caja/CajaDAO.java @@ -30,12 +30,35 @@ import java.util.Optional; public interface CajaDAO { + /** + * Obtiene todas las cajas + * @return Una lista que contiene las cajas + */ List getAll(); + /** + * Obtiene una caja por su id + * @param id ID de la caja + * @return Optional que puede contener la Caja o puede estar vacio. + */ Optional getById(int id); + /** + * Obtiene una caja dada su fecha + * @param fecha Fecha a la que pertence la caja + * @return Un optional que puede contenter una caja o puede estar vacio + */ Optional getByFecha(LocalDate fecha); + /** + * Guarda una caja, le otorga un id a la caja guardada + * @param caja Caja a guardar + */ void insert(Caja caja); + + /** + * Actualiza una caja + * @param caja Caja actualizar + */ void update(Caja caja); } diff --git a/src/danielcortes/xyz/models/caja/SQLiteCajaDAO.java b/src/danielcortes/xyz/models/caja/SQLiteCajaDAO.java index 91d6af8..4cb6a38 100644 --- a/src/danielcortes/xyz/models/caja/SQLiteCajaDAO.java +++ b/src/danielcortes/xyz/models/caja/SQLiteCajaDAO.java @@ -36,10 +36,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto Caja - * En especifico esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteCajaDAO implements CajaDAO { private static final Logger log = LogManager.getLogger(SQLiteCajaDAO.class); private SQLiteConnectionHolder connectionHolder; @@ -48,11 +44,6 @@ public class SQLiteCajaDAO implements CajaDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todas las instancias de Caja en la base de datos, las cuales mapea al objeto - * Caja y devuelve una lista con todos estos - * @return Una lista con todas las instancias de Caja en la base de datos - */ @Override public List getAll() { log.debug("Se intentara conseguir todas las Cajas"); @@ -77,13 +68,6 @@ public class SQLiteCajaDAO implements CajaDAO { return cajaList; } - - /** - * Obtiene una instancia de Caja desde la base de datos - * @param id el id de la fila de Caja en la base de datos - * @return Un optional conteniendo la caja y el cual puede estar vacio, dado que no es 100% seguro que el id - * entregado sea valido o exista en la base de datos - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir una Caja con el id " + id); @@ -108,12 +92,6 @@ public class SQLiteCajaDAO implements CajaDAO { return Optional.ofNullable(caja); } - /** - * Obtiene una instancia de caja dada su fecha. - * @param fecha Fecha a la cual corresponde la caja - * @return Un optional conteniendo la caja y el cual puede estar vacio, dado que no es 100% - * seguro que la fecha entregada corresponda a una caja en la base de datos - */ @Override public Optional getByFecha(LocalDate fecha) { log.debug("Se intentara conseguir la caja con fecha " + fecha); @@ -138,10 +116,6 @@ public class SQLiteCajaDAO implements CajaDAO { return Optional.ofNullable(caja); } - /** - * Inserta en la base de datos una instancia de Caja nueva. - * @param caja La caja a insertar, una vez que ocurra, se le otorgara un id. - */ @Override public void insert(Caja caja) { log.debug("Se intentara insertar la caja " + caja); @@ -166,10 +140,6 @@ public class SQLiteCajaDAO implements CajaDAO { log.debug("Se inserto al caja " + caja); } - /** - * Actualiza una caja existente en la base de datos - * @param caja La caja a actualizar. - */ @Override public void update(Caja caja) { log.debug("Se intentara actualizar la caja " + caja); diff --git a/src/danielcortes/xyz/models/calculo_fondo/CalculoFondoDAO.java b/src/danielcortes/xyz/models/calculo_fondo/CalculoFondoDAO.java index 0d1826a..35700cc 100644 --- a/src/danielcortes/xyz/models/calculo_fondo/CalculoFondoDAO.java +++ b/src/danielcortes/xyz/models/calculo_fondo/CalculoFondoDAO.java @@ -30,17 +30,48 @@ import java.util.Optional; public interface CalculoFondoDAO { + /** + * Obtiene todos los CalculoFondo + * @return Una lista con los CalculoFondo + */ List getAll(); + /** + * Obtiene una lista con los CalculoFondo de una Caja + * @param caja Caja a la que pertencen los CalculoFondo + * @return Una lista con los CalculoFondo + */ List getByCaja(Caja caja); + /** + * Obtiene un CalculoFondo dado su Id. + * @param id Id del CalculoFondo + * @return Un optional que puede contener el Calculo fondo o puede estar vacio. + */ Optional getById(int id); + /** + * Obtiene la suma de los valores del CalculoFondo de una Caja. + * @param caja Caja a la que pertencen los CalculoFondo a sumar + * @return La suma de los valores. En caso que la caja sea Caja.EMPTY retornara 0 + */ int getTotalCalculoFondo(Caja caja); + /** + * Guarda un CalculoFondo, le otorga un id una vez guardada. + * @param calculoFondo CalculoFondo a guardar + */ void insert(CalculoFondo calculoFondo); + /** + * Actualiza un CalculoFondo + * @param calculoFondo CalculoFondo a actualizar + */ void update(CalculoFondo calculoFondo); + /** + * Elimina un CalculoFondo + * @param calculoFondo CalculoFondo a eliminar + */ void delete(CalculoFondo calculoFondo); } diff --git a/src/danielcortes/xyz/models/calculo_fondo/SQLiteCalculoFondoDAO.java b/src/danielcortes/xyz/models/calculo_fondo/SQLiteCalculoFondoDAO.java index 7a5f26b..2580ad2 100644 --- a/src/danielcortes/xyz/models/calculo_fondo/SQLiteCalculoFondoDAO.java +++ b/src/danielcortes/xyz/models/calculo_fondo/SQLiteCalculoFondoDAO.java @@ -38,10 +38,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto CalculoFondo - * En especifico esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { private static final Logger log = LogManager.getLogger(SQLiteCalculoFondoDAO.class); private ConnectionHolder connectionHolder; @@ -50,11 +46,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todas las instancias de CalculoFondo existentes en la base de datos, las - * cuales mapea a el objeto CalculoFondo y devuelve una lista con todos estos - * @return Una lista con todos las instancias de CalculoFondo en la base de datos - */ @Override public List getAll() { log.debug("Se intentara conseguir todos los CalculosFondo"); @@ -84,15 +75,7 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { return calculoFondoList; } - /** - * Obtiene todas las instancias de CalculoFondo que estan relacionadas a una caja. - * En caso que la caja entregada sea igual a Caja.EMPTY, se retornara automaticamente - * una lista vacia sin realizar ninguna query. - * - * @param caja Instancia de una caja existente en la base de datos, o que al menos - * tenga un id que exista en ella. - * @return Una lista de todos los CalculoFondo de la caja entregada - */ + @Override public List getByCaja(Caja caja) { log.debug("Se intentara conseguir todos los calculos fondo de la caja " + caja); @@ -125,12 +108,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { return calculoFondoList; } - /** - * Obtiene una instancia de CalculoFondo desde la base de datos - * @param id el id de la fila de CalculoFondo en la base de datos - * @return Un optional que puede estar vacio, dado que no es 100% seguro que el id - * entregado sea valido o exista en la base de datos. - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un CalculoFondo con id " + id); @@ -159,14 +136,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { return Optional.ofNullable(calculoFondo); } - /** - * Obtiene la suma de los valores de CalculoFondo de una caja. - * En caso que la caja sea igual a Caja.EMPY, se retornara automaticamente 0 sin - * realizar ninguna query. - * @param caja Instancia de una caja existente en la base de datos, o que al menos - * tenga un id que exista. - * @return La suma de los valores de CalculoFondo en la caja entregada. - */ @Override public int getTotalCalculoFondo(Caja caja) { log.debug("Se intentara conseguir la suma de los valores de los CalculosFondo de la caja " + caja); @@ -195,11 +164,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { return sum; } - /** - * Inserta en la base de datos una instancia de CalculoFondo nueva. - * Una vez que sea insertado, se le agrega un id al objeto entregado. - * @param calculoFondo instancia que se insertara. - */ @Override public void insert(CalculoFondo calculoFondo) { log.debug("Se intentara insertar el calculoFondo " + calculoFondo); @@ -226,11 +190,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { log.debug("Se inserto el calculoFondo " + calculoFondo); } - /** - * Actualiza un calculo fondo existente en la base de datos. - * La instancia que se actualizara sera la del id que tenga el objeto entregado. - * @param calculoFondo instancia de CalculoFondo a ser actualizada. - */ @Override public void update(CalculoFondo calculoFondo) { log.debug("Se intentara actualizar el CalculoFondo " + calculoFondo); @@ -250,11 +209,6 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO { log.debug("Se actualizo el CalculoFondo " + calculoFondo); } - /** - * Elimina de la base de datos el objeto CalculoFondo entregado. - * La instancia en especifico sera la del id del objeto entregado - * @param calculoFondo instancia de CalculoFondo a eliminar. - */ @Override public void delete(CalculoFondo calculoFondo) { log.debug("Se intentara eliminar el CalculoFondo" + calculoFondo); diff --git a/src/danielcortes/xyz/models/documentos/DocumentosDAO.java b/src/danielcortes/xyz/models/documentos/DocumentosDAO.java index 93259de..38bef0e 100644 --- a/src/danielcortes/xyz/models/documentos/DocumentosDAO.java +++ b/src/danielcortes/xyz/models/documentos/DocumentosDAO.java @@ -30,19 +30,58 @@ import java.util.Optional; public interface DocumentosDAO { + /** + * Obtiene todos los Documentos + * + * @return Una lista con todos los Documentos + */ List getAll(); + /** + * Obtiene un Documentos dado su id + * + * @param id Id del Documentos + * @return Un optional que puede contener el Documentos o puede estar vacio + */ Optional getById(int id); + /** + * Obtiene un Documentos dado su Caja + * + * @param caja Caja a la que pertence el Documentos + * @return Un optional que puede contener el Documentos o puede estar vacio + */ Optional getByCaja(Caja caja); + /** + * Obtiene la suma de los valores de los documentos en una Caja + * + * @param caja Caja a la que pertencene los Documentos + * @return La suma de los valores de los documentos, si la Caja es Caja.EMPYY retorana 0 + */ int getTotalDocumentos(Caja caja); + /** + * Guarda un nuevo documentos, le otorga un id una vez guardado. + * @param documentos Documentos a guardar + */ void insert(Documentos documentos); + /** + * Inserta un documentos con valores por default. + * @param documentos Instancia del documento a guardar + */ void insertDefault(Documentos documentos); + /** + * Actualiza un documentos + * @param documentos Documento a actualizar + */ void update(Documentos documentos); + /** + * Elimina un Documentos. + * @param documentos Documentos a eliminar + */ void delete(Documentos documentos); } diff --git a/src/danielcortes/xyz/models/documentos/SQLiteDocumentosDAO.java b/src/danielcortes/xyz/models/documentos/SQLiteDocumentosDAO.java index 7b27de7..c09411c 100644 --- a/src/danielcortes/xyz/models/documentos/SQLiteDocumentosDAO.java +++ b/src/danielcortes/xyz/models/documentos/SQLiteDocumentosDAO.java @@ -38,10 +38,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objecto Documentos - * En especifico esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteDocumentosDAO implements DocumentosDAO { private static final Logger log = LogManager.getLogger(SQLiteDocumentosDAO.class); private ConnectionHolder connectionHolder; @@ -50,10 +46,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todas las instancias de Documentos que existen en la base de datos - * @return Una lista con los Documentos - */ @Override public List getAll() { log.debug("Se intentaran conseguir todos los Documentos"); @@ -85,12 +77,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { return documentosList; } - /** - * Obtiene un Documento dado su id en la base de datos - * @param id el id de la fila del documento en la base de datos - * @return Un optional que contiene el documento que puede ser vacio, dado que no es - * 100% seguro que el id entregado sea valido o exista en la base de datos. - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir el Documentos con id " + id); @@ -122,12 +108,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { return Optional.ofNullable(documentos); } - /** - * Obtiene el Documentos que esta relacionado con la Caja - * @param caja caja con la cual esta relacionado el Documentos - * @return Un optional que contiene el Documentos el cual puede ser vacio, dado que no - * es 100% seguro que exista un Documentos con esa caja. - */ @Override public Optional getByCaja(Caja caja) { log.debug("Se intentara conseguir el Documentos de la caja " + caja); @@ -161,12 +141,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { return Optional.ofNullable(documentos); } - /** - * Obtiene la suma de los documentos pertenecientes a una caja - * @param caja caja a la que pertenecen los documentos que se sumaran - * @return Un int con la suma obtenida, en caso que la caja entregada sea igual a - * Caja.EMPTY se retornara 0, al igual que si no existe ningun documentos para la caja - */ @Override public int getTotalDocumentos(Caja caja) { log.debug("Se intentara conseguir el total de Documentos de la caja " + caja); @@ -193,10 +167,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { return total; } - /** - * Inserta en la base de datos una instancia de Documentos nuevo - * @param documentos Documentos a insertar, una vez que ocurra se le otorgara un id - */ @Override public void insert(Documentos documentos) { log.debug("Se intentara insertar un nuevo documentos " + documentos); @@ -223,12 +193,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { log.debug("Se inserto el documentos " + documentos); } - /** - * Inserta un documentos por default, teniendo los campos cheques, tarjetas y retiros - * siendo 0. - * @param documentos Instancia de documentos la cual se guardara con esas caracteristicas - * Solo se tomara el objecto caja para obtener el id de esta y asociarlo en la base de datos - */ @Override public void insertDefault(Documentos documentos) { log.debug("Se intentara insertar el documento default " + documentos); @@ -250,10 +214,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { log.debug("Se inserto el documento por default " + documentos); } - /** - * Actualiza un Documentos existente en la base de datos - * @param documentos el documentos a actualizar - */ @Override public void update(Documentos documentos) { log.debug("Se intentara actualizar el documentos " + documentos); @@ -273,10 +233,6 @@ public class SQLiteDocumentosDAO implements DocumentosDAO { log.debug("Se actualizo el documentos " + documentos); } - /** - * Elimina un Documentos existente en la base de datos - * @param documentos El documentos a eliminar - */ @Override public void delete(Documentos documentos) { log.debug("Se intentara eliminar el documentos " + documentos); diff --git a/src/danielcortes/xyz/models/efectivo/EfectivoDAO.java b/src/danielcortes/xyz/models/efectivo/EfectivoDAO.java index 4374fdf..b2f1d81 100644 --- a/src/danielcortes/xyz/models/efectivo/EfectivoDAO.java +++ b/src/danielcortes/xyz/models/efectivo/EfectivoDAO.java @@ -30,20 +30,54 @@ import java.util.Optional; public interface EfectivoDAO { + /** + * Obtiene todos los Efectivo + * @return Una lista con los Efectivo + */ List getAll(); + /** + * Obtiene un Efectivo por su id + * @param id Id del Efectivo + * @return Un Optional que puede contener un Efectivo o puede estar vacio + */ Optional getById(int id); + /** + * Obtiene un Efectivo por su Caja + * @param caja Caja a la que pertence el Efectivo + * @return Un Optional que puede contener un Efectivo o puede estar vacio + */ Optional getByCaja(Caja caja); + /** + * Obtiene la suma de los valores de los Efectivo pertencientes a una Caja + * @param caja Caja a la que pertenecen los Efectivo a sumar + * @return La suma de los valores de Efectivo + */ int getTotalEfectivo(Caja caja); + /** + * Guarda un Efectivo, le agrega un id a la instancia + * @param efectivo Efectivo a guardar + */ void insert(Efectivo efectivo); + /** + * Guarda un Efectivo con valores por defecto, le agrega un id a la instancia + * @param efectivo Instancia de efectivo a guardar + */ void insertDefault(Efectivo efectivo); + /** + * Actualiza un Efectivo + * @param efectivo Efectivo a guardar + */ void update(Efectivo efectivo); + /** + * Elimina un Efectivo + * @param efectivo Efectivo a eliminar + */ void delete(Efectivo efectivo); - } diff --git a/src/danielcortes/xyz/models/efectivo/SQLiteEfectivoDAO.java b/src/danielcortes/xyz/models/efectivo/SQLiteEfectivoDAO.java index ca01bf2..a93bbc9 100644 --- a/src/danielcortes/xyz/models/efectivo/SQLiteEfectivoDAO.java +++ b/src/danielcortes/xyz/models/efectivo/SQLiteEfectivoDAO.java @@ -39,10 +39,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto Efectivo - * En especifico esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteEfectivoDAO implements EfectivoDAO { private static final Logger log = LogManager.getLogger(SQLiteEfectivoDAO.class); private ConnectionHolder connectionHolder; @@ -51,10 +47,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todas las instancias de Efectivo que existen en la base de datos - * @return una lista de Efectivo - */ @Override public List getAll() { log.debug("Se intentara conseguir todas los Efectivo"); @@ -94,12 +86,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { return efectivoList; } - /** - * Obtiene un Efectivo dado su id en la base de datos - * @param id el id de la fila del efectivo en la base de datos - * @return un optional que contiene el efectivo y puede estar vacio, dado que no es - * 100% seguro que el id entregado sea valido o exista en la base de datos. - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un Efectivo con id " + id); @@ -137,13 +123,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { return Optional.ofNullable(efectivo); } - /** - * Obtiene un Efectivo perteneciente a una caja - * @param caja Caja a la cual pertenece el efectivo requerido - * @return Un optional que contiene el efectivo y puede estar vacio, dado que no es 100% - * seguro que la exista un efectivo para la caja. Ademas la caja puede ser Caja.EMPTY - * en ese caso siempre se retornara un Optional.empty(). - */ @Override public Optional getByCaja(Caja caja) { log.debug("Se intentara conseguir un Efectivo perteneciente a la caja " + caja); @@ -182,12 +161,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { return Optional.ofNullable(efectivo); } - /** - * Obtiene la suma de los efectivos pertenecientes una caja - * @param caja Caja a la cual pertenece los efectivos a sumar - * @return Un int con la suma obtenida, en caso que la caja sea igual a Caja.EMPTY - * simplemente se retoranara 0, al igual que cuando no exista ningun efectivo para esa caja - */ @Override public int getTotalEfectivo(Caja caja) { log.debug("Se intentara conseguir la suma de efectivos de la caja " + caja); @@ -216,10 +189,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { return total; } - /** - * Inserta en la base de datos una instancia de Efectivo nueva - * @param efectivo Efectivo a insertar, una vez que ocurra se le otorgara un id. - */ @Override public void insert(Efectivo efectivo) { log.debug("Se intentara insertar el efectivo " + efectivo); @@ -250,11 +219,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { log.debug("Se inserto el efectivo " + efectivo); } - /** - * Inserta un efectivo por default, teniendo todos los campos en 0 exceptuando el id de la caja - * @param efectivo Instancia de efectivo que se guardara, solo se tomara en cuenta la caja - * que almacena para obtener su id. - */ @Override public void insertDefault(Efectivo efectivo) { log.debug("Se intentara insertar el efectivo por default " + efectivo); @@ -276,10 +240,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { log.debug("Se inserto el efectivo por default " + efectivo); } - /** - * Actualiza un Efectivo existente en la base de datos - * @param efectivo efectivo a actualizar - */ @Override public void update(Efectivo efectivo) { log.debug("Se intentara actualizar el efectivo " + efectivo); @@ -306,10 +266,6 @@ public class SQLiteEfectivoDAO implements EfectivoDAO { log.debug("Se actualizo el efectivo " + efectivo); } - /** - * Elimina un efectivo de la base de datos - * @param efectivo efectivo a eliminar - */ @Override public void delete(Efectivo efectivo) { log.debug("Se intentara eliminar el efectivo " + efectivo); diff --git a/src/danielcortes/xyz/models/egreso/EgresoDAO.java b/src/danielcortes/xyz/models/egreso/EgresoDAO.java index 9e9dbba..8389675 100644 --- a/src/danielcortes/xyz/models/egreso/EgresoDAO.java +++ b/src/danielcortes/xyz/models/egreso/EgresoDAO.java @@ -31,26 +31,80 @@ import java.util.List; import java.util.Optional; public interface EgresoDAO { + + /** + * Obtiene todos los Egreso + * @return Lista de Egreso + */ List getAll(); + /** + * Obtiene un Egreso por su Id + * @param id id del Egreso + * @return Optional que puede contener el Egreso o puede estar vacio + */ Optional getById(int id); + /** + * Obtiene todos los Egreso pertenecientes a una Caja + * @param caja Caja a la que pertencen los Egreso + * @return Lista con los Egreso + */ List getByCaja(Caja caja); + /** + * Obtiene los Egreso dado su nro + * @param nro nro del Egreso + * @return Lista con los Egreso + */ List getByNro(String nro); + /** + * Obtiene los Egreso dado su TipoEgreso + * @param tipoEgreso TipoEgreso al que pertence los Egreso + * @return Lista con los Egreso + */ List getByTipoEgreso(TipoEgreso tipoEgreso); + /** + * Obtiene los Egreso dado su TipoEgreso y su Caja + * @param tipoEgreso TipoEgreso al que pertence los Egreso + * @param caja Caja al que pertence los Egreso + * @return Lista de Egreso + */ List getByTipoEgresoEnCaja(TipoEgreso tipoEgreso, Caja caja); + /** + * Guarda un Egreso + * @param egreso Egreso a guardar + */ void insert(Egreso egreso); + /** + * Actualiza un Egreso + * @param egreso Egreso a actualizar + */ void update(Egreso egreso); + /** + * Elimina un Egreso + * @param egreso Egreso a eliminar + */ void delete(Egreso egreso); + /** + * Obtiene la suma de los valores de Egreso en una Caja + * @param caja Caja a la que pertencene los Egreso + * @return La suma de los Egreso + */ int getTotalEgreso(Caja caja); + /** + * Obtiene la suma de los valores de Egreso en un mes de un TipoEgreso + * @param mes Mes al que pertencen los Egreso + * @param tipo TipoEgreso al que pertence los Egreso + * @return La suma de los Egreso + */ int getTotalEgresoMesPorTipo(YearMonth mes, TipoEgreso tipo); } diff --git a/src/danielcortes/xyz/models/egreso/SQLiteEgresoDAO.java b/src/danielcortes/xyz/models/egreso/SQLiteEgresoDAO.java index 0c754a6..02530af 100644 --- a/src/danielcortes/xyz/models/egreso/SQLiteEgresoDAO.java +++ b/src/danielcortes/xyz/models/egreso/SQLiteEgresoDAO.java @@ -43,10 +43,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto Egreso En especifio esta - * implementacion se comunica con la base de datos SQLite - */ public class SQLiteEgresoDAO implements EgresoDAO { private static final Logger log = LogManager.getLogger(SQLiteEgresoDAO.class); @@ -56,11 +52,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todas las instancias de Egreso que existen en la base de datos - * - * @return una lista de Egreso - */ @Override public List getAll() { log.debug("Se intentara conseguir todos los Egreso"); @@ -100,13 +91,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return egresoList; } - /** - * Obtiene un Egreso dado su id en la base de datos - * - * @param id el id de la fila de egreso en la base de datos - * @return un optional que contiene el egreso y puede estar vacio, dado que no es 100% seguro que - * el id entregado sea valido o exista en la base de datos - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un Egreso con el id " + id); @@ -144,12 +128,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return Optional.ofNullable(egreso); } - /** - * Obtiene una lista de egresos perteneciente a una caja - * - * @param caja Caja a la cual pertenece el egreso requerido - * @return Una lista de egreso, si la caja es Caja.EMPTY se retoranara una lista vacia - */ @Override public List getByCaja(Caja caja) { log.debug("Se intentara conseguir los egresos de la caja " + caja); @@ -191,12 +169,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return egresoList; } - /** - * Obtiene una lista de Egreso dado su nro en la base de datos - * - * @param nro nro del egreso que se busca - * @return una lista con los Egresos con el nro entregado - */ @Override public List getByNro(String nro) { log.debug("Se intentara conseguir los Egreso con nro " + nro); @@ -236,13 +208,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return egresoList; } - /** - * Obtiene una lista de Egreso pertenecientes a un tipoEgreso - * - * @param tipoEgreso TipoEgreso al que pertenecen los Egreso requeridos - * @return Una lista con los egresos, en caso que tipoEgreso sea TipoEgreso.EMPTY se retorna una - * lista vacia. - */ @Override public List getByTipoEgreso(TipoEgreso tipoEgreso) { log.debug("Se intentara conseguir los Egreso con TipoEgreso " + tipoEgreso); @@ -283,13 +248,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return egresoList; } - /** - * Obtiene los Egreso que pertenecen a un TipoEgreso y Caja - * - * @param tipoEgreso TipoEgreso al que pertence el Egreso - * @param caja Caja al que pertence el egreso - * @return Lista de egreso, se retoranara una lista vacia en caso que tipoEgreso o caja sean EMPTY - */ @Override public List getByTipoEgresoEnCaja(TipoEgreso tipoEgreso, Caja caja) { log.debug("Se intentara conseguir los Egresos pertencienes al tipoEgreso " + tipoEgreso @@ -328,12 +286,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return egresoList; } - /** - * Obtiene la suma de los egresos en una caja - * - * @param caja caja a la que pertenecen los egresos a sumar - * @return La suma de los egresos, se retonara siempre 0 en caso que la Caja sea Caja.EMPTY - */ @Override public int getTotalEgreso(Caja caja) { log.debug("Se intentara conseguir la suma de egreso de la caja " + caja); @@ -362,14 +314,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return total; } - /** - * Obtiene la suma de egresos en un mes de un tipoEgreso - * - * @param mes Mes del que se necesita la suma - * @param tipo TipoEgreso al que pertencen los egresos - * @return La suma de los egresos dentro del mes y con el tipo entregado, en caso que el - * tipoEgreso sea TipoEgreso.EMPTY se retornara siempre 0 - */ @Override public int getTotalEgresoMesPorTipo(YearMonth mes, TipoEgreso tipo) { log.debug( @@ -404,11 +348,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { return total; } - /** - * Inserta en la base de datos una instancia de egreso - * - * @param egreso Egreso a insertar, una vez que ocurra se le otorga un id. - */ @Override public void insert(Egreso egreso) { log.debug("Se intentara insertar el egreso " + egreso); @@ -434,10 +373,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { log.debug("Se inserto el egreso " + egreso); } - /** - * Actualiza un Egreso existente en la base de datos - * @param egreso Egreso a actualizar - */ @Override public void update(Egreso egreso) { log.debug("Se intentara actualizar el egreso " + egreso); @@ -458,10 +393,6 @@ public class SQLiteEgresoDAO implements EgresoDAO { log.debug("Se actualizo el egreso " + egreso); } - /** - * Elimina un Egreso existente en la base de datos - * @param egreso Egreso a eliminar - */ @Override public void delete(Egreso egreso) { log.debug("Se intentara eliminar el egreso " + egreso); diff --git a/src/danielcortes/xyz/models/estado_resultado/EstadoResultadoDAO.java b/src/danielcortes/xyz/models/estado_resultado/EstadoResultadoDAO.java index 9b78302..08d629c 100644 --- a/src/danielcortes/xyz/models/estado_resultado/EstadoResultadoDAO.java +++ b/src/danielcortes/xyz/models/estado_resultado/EstadoResultadoDAO.java @@ -6,16 +6,42 @@ import java.util.Optional; public interface EstadoResultadoDAO { + /** + * Obtiene todos los EstadoResultado + * @return Lista con los EstadoResultado + */ List getAll(); + /** + * Obtiene un EstadoResultado por su Id + * @param id El id del EstadoResultado + * @return Optional que puede contener un EstadoResultado o puede estar vacio + */ Optional getById(int id); + /** + * Obtiene un EstadoResultado por su mes + * @param month El mes del EstadoResultado + * @return Optional que puede contener un EstadoResultado o puede estar vacio + */ Optional getByMonth(YearMonth month); + /** + * Guarda un EstadoResultado y le otorga un id + * @param estadoResultado EstadoResultado a guardar + */ void insert(EstadoResultado estadoResultado); + /** + * Actualiza un EstadoResultado + * @param estadoResultado EstadoResultado a actualizar + */ void update(EstadoResultado estadoResultado); + /** + * Elimina un EstadoResultado + * @param estadoResultado EstadoResultado a eliminar + */ void delete(EstadoResultado estadoResultado); } diff --git a/src/danielcortes/xyz/models/estado_resultado/SQLiteEstadoResultadoDAO.java b/src/danielcortes/xyz/models/estado_resultado/SQLiteEstadoResultadoDAO.java index 78ef772..3cf76e5 100644 --- a/src/danielcortes/xyz/models/estado_resultado/SQLiteEstadoResultadoDAO.java +++ b/src/danielcortes/xyz/models/estado_resultado/SQLiteEstadoResultadoDAO.java @@ -13,10 +13,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto EstadoResultado. En especifico - * esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { private static final Logger log = LogManager.getLogger(SQLiteEstadoResultadoDAO.class); @@ -26,11 +22,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todos los EstadoResultado. - * - * @return una Lista con los EstadoResultado - */ @Override public List getAll() { log.debug("Se intentara conseguir todos los EstadoResultado"); @@ -72,13 +63,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { return estadoResultadoList; } - /** - * Obtiene un EstadoResultado dado su id en la base de datos - * - * @param id id de la fila de EstadoResultado en la base de datos - * @return Un optional que contiene al EstadoResultado que puede estar vacio, esto porque no es - * 100% seguro que la base de datos tenga una fila con ese id o que el id sea valido - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir el EstadoResultado con el id " + id); @@ -120,13 +104,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { return Optional.ofNullable(estadoResultado); } - /** - * Obtiene un EstadoResultado dado su mes - * - * @param month YearMonth que tiene el EstadoResultado. - * @return Un optional que contiene el EstadoResultado que puede estar vacio, esto porque no es - * 100% seguro que exista un EstadoResultado en ese mes. - */ @Override public Optional getByMonth(YearMonth month) { log.debug("Se intentara conseguir un EstadoResultado con el mes " + month); @@ -169,11 +146,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { return Optional.ofNullable(estadoResultado); } - /** - * Inserta en la base de datos el EstadoResultado, al terminar le otorga un id - * - * @param estadoResultado EstadoResultado a insertar - */ @Override public void insert(EstadoResultado estadoResultado) { log.debug("Se intentara insertar el EstadoResultado " + estadoResultado); @@ -213,11 +185,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { log.debug("Se inserto el EstadoResultado " + estadoResultado); } - /** - * Actualiza un EstadoResultado existente en la base de datos - * - * @param estadoResultado EstadoResultado a actualizar - */ @Override public void update(EstadoResultado estadoResultado) { log.debug("Se intentara actualizar el estadoResultado " + estadoResultado); @@ -253,11 +220,6 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO { } - /** - * Elimina un EstadoResultado desde la base de datos - * - * @param estadoResultado EstadoResultado a eliminar - */ @Override public void delete(EstadoResultado estadoResultado) { log.debug("Se intentara eliminar el EstadoResultado " + estadoResultado); diff --git a/src/danielcortes/xyz/models/ingreso/IngresoDAO.java b/src/danielcortes/xyz/models/ingreso/IngresoDAO.java index 0b3fb32..5536b40 100644 --- a/src/danielcortes/xyz/models/ingreso/IngresoDAO.java +++ b/src/danielcortes/xyz/models/ingreso/IngresoDAO.java @@ -32,34 +32,109 @@ import java.util.List; import java.util.Optional; public interface IngresoDAO { + + /** + * Obtiene todos los Ingreso + * @return Lista con los Ingreso + */ List getAll(); + /** + * Obtiene los Ingreso pertenecientes a una Caja + * @param caja Caja a la que pertenece los Ingreso + * @return Lista con los Ingreso + */ List getByCaja(Caja caja); - Optional getById(int id); - + /** + * Obtiene los Ingreso segun su TipoIngreso + * @param tipoIngreso TipoIngreso al que pertenece el Ingreso + * @return Lista con los Ingreso + */ List getByTipoIngreso(TipoIngreso tipoIngreso); + /** + * Obtiene un Ingreso segun su Id + * @param id Id del Ingreso + * @return Optional que puede contener un Ingreso o puede estar Vacio + */ + Optional getById(int id); + + /** + * Obtiene la suma de los valores de los Ingreso en una Caja + * @param caja Caja a la que pertenecen los Ingreso a sumar + * @return La suma de los valores de los Ingreso + */ int getTotalIngreso(Caja caja); + /** + * Obtiene el total de la suma de los valores de los Ingresos en un mes + * @param mes Mes al que pertenecen los Ingreso + * @return La suma del valor de los Ingreso en el mes + */ int getTotalIngresoMes(YearMonth mes); + /** + * Obtiene el total de Ingresos de TipoIngreso 'Boleta Exenta'. + * @param mes Mes en el que estan los Ingreso + * @return La suma de los valores de los Ingreso + */ int getTotalExentasMes(YearMonth mes); + /** + * Obtiene el total de la suma de los Ingreso de una Caja segun su TipoIngreso + * @param caja Caja a la que pertenecen los Ingreso + * @param tipoIngreso TipoIngreso a los que pertenecen los Ingreso + * @return El total de la suma de los Ingreso + */ int getTotalIngresoEnCajaPorTipo(Caja caja, TipoIngreso tipoIngreso); + /** + * Obtiene el Primer numero de los NroInicial de los Ingreso de una Caja pertenecientes a un TipoIngreso + * @param caja Caja a la que pertenecen los Ingreso + * @param tipoIngreso TipoIngreso al que pertenecen los Ingreso + * @return Un Optional que puede contener el NroInicial o puede estar vacio + */ Optional getPrimerNroInicialDeCajaDeTipo(Caja caja, TipoIngreso tipoIngreso); + /** + * Obtiene el Ultimo numero de los NroFinal de los Ingreso de una Caja pertenecientes a un TipoIngreso + * @param caja Caja a la que pertenecen los Ingreso + * @param tipoIngreso TipoIngreso al que pertenecen los Ingreso + * @return Un Optional que puede contener el NroFinal o puede estar vacio + */ Optional getUltimoNroFinalDeCajaDeTipo(Caja caja, TipoIngreso tipoIngreso); + /** + * Obtiene el Primer numero de los NroZInicial de los Ingreso de una Caja pertenecientes al TipoIngreso Boleta Fiscal + * @param caja Caja a la que pertenecen los Ingreso + * @return Un Optional que puede contener el NroZInicial o puede estar vacio + */ Optional getPrimerNroZInicialDeCaja(Caja caja); + /** + * Obtiene el Ultimo numero de los NroZFinal de los Ingresos de una Caja pertenecientes al TipoIngreso Boleta Fiscal + * @param caja Caja a la que pertenecen los Ingreso + * @return Un Optional que puede contener el NroZFinal o puede estar vacio + */ Optional getUltimoNroZFinalDeCaja(Caja caja); + /** + * Guarda un Ingreso y le otorga un id + * @param ingreso Ingreso a guardar + */ void insert(Ingreso ingreso); + /** + * Actualiza un Ingreso + * @param ingreso Ingreso a actualizar + */ void update(Ingreso ingreso); + /** + * Elimina un Ingreso + * @param ingreso Ingreso a eliminar + */ void delete(Ingreso ingreso); } diff --git a/src/danielcortes/xyz/models/ingreso/SQLiteIngresoDAO.java b/src/danielcortes/xyz/models/ingreso/SQLiteIngresoDAO.java index 8c0a1c0..5084a94 100644 --- a/src/danielcortes/xyz/models/ingreso/SQLiteIngresoDAO.java +++ b/src/danielcortes/xyz/models/ingreso/SQLiteIngresoDAO.java @@ -43,10 +43,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto Ingreso. En especifico - * esta implementacion se comunica con la base de datos SQLite - */ public class SQLiteIngresoDAO implements IngresoDAO { private static final Logger log = LogManager.getLogger(SQLiteIngresoDAO.class); @@ -56,11 +52,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene todos los Ingreso - * - * @return Una lista con los Ingreso - */ @Override public List getAll() { log.debug("Se intententaran conseguir todos los Ingreso"); @@ -104,12 +95,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return ingresosList; } - /** - * Obtiene la lista de Ingreso perteneciente a una Caja - * - * @param caja Caja a la que pertence los Ingreso buscados - * @return Una lista de ingreso, en caso que la caja sea Caja.EMPTY se retoranara una lista vacia. - */ @Override public List getByCaja(Caja caja) { log.debug("Se intentara buscar los ingresos de la caja " + caja); @@ -152,13 +137,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return ingresosList; } - /** - * Obtiene un Ingreso dado su id en la base de datos - * - * @param id de la fila de Ingreso en la base de datos - * @return Un Optional que contiene el Ingreso que puede estar vacio,esto porque no es 100% seguro - * que exista en la base de datos o que sea valido - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un Ingreso con id " + id); @@ -201,12 +179,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return Optional.ofNullable(ingreso); } - /** - * Obtiene los Ingreso pertenecientes a un tipoIngreso - * - * @param tipoIngreso TipoIngreso al que pertenece los Ingreso deseados - * @return Lista con los ingreso. - */ @Override public List getByTipoIngreso(TipoIngreso tipoIngreso) { log.debug("Se intentara conseguir los Ingreso con TipoIngreso" + tipoIngreso); @@ -245,12 +217,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return ingresosList; } - /** - * Obtiene la suma de los ingresos en una caja - * - * @param caja Caja a la que pertencen los ingresos a sumar - * @return la suma de los ingresos, en caso que la caja sea Caja.EMPTY siempre retoranara 0 - */ @Override public int getTotalIngreso(Caja caja) { log.debug("Se intentara conseguir el total de ingreso en la caja " + caja); @@ -277,12 +243,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return total; } - /** - * Obtiene la suma de ingresos en un mes - * - * @param mes Mes dentro del cual estan los ingresos - * @return la suma de los ingresos. - */ @Override public int getTotalIngresoMes(YearMonth mes) { log.debug("Se intentara conseguir la suma de los ingreso en el mes " + mes); @@ -309,12 +269,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return total; } - /** - * Obtiene el total de ingresos con el tipo boleta exenta dentro de un mes - * - * @param mes Mes al cual pertenecen los ingresos - * @return La suma de los ingresos con el tipo boleta exenta en el mes - */ @Override public int getTotalExentasMes(YearMonth mes) { log.debug("Se intentara conseguir el total de boletas exentas en el mes " + mes); @@ -340,13 +294,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return total; } - /** - * Obtiene el total de ingresos en una caja, de un tipo especifico - * - * @param caja Caja a la que pertenen los ingresos - * @param tipoIngreso TipoIngreso al cual pertencen los ingresos - * @return La suma de los ingresos. - */ @Override public int getTotalIngresoEnCajaPorTipo(Caja caja, TipoIngreso tipoIngreso) { log.debug("Se intentara obtener el total de ingresos de la caja " + caja + " y el tipo " @@ -374,14 +321,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return total; } - /** - * Obtiene el primer numero inicial de ingreso de un tipo de ingreso, dentro de una caja. - * - * @param caja Caja a la que pertencen los ingreso - * @param tipoIngreso TipoIngreso al cual pertenecen los ingreso - * @return Un Optional que contiene el primer numero inicial de ingreso,este puede estar vacio ya - * que no es seguro que exista tal numero inicial. - */ @Override public Optional getPrimerNroInicialDeCajaDeTipo(Caja caja, TipoIngreso tipoIngreso) { log.debug("Se intentara conseguir el primer numero inicial de ingreso en la caja " + caja @@ -412,14 +351,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return Optional.ofNullable(nroInicial); } - /** - * Obtiene el ultimo numero final de ingreso de un tipo de ingrso, dentro de una caja - * - * @param caja Caja a la que pertencen los ingreso - * @param tipoIngreso TipoIngreso al cual pertenecen los ingreso - * @return Un Optional que contiene el ultimo numero final de ingreso, este puede estar vacio ya - * que no es seguro que exista tal numero final. - */ @Override public Optional getUltimoNroFinalDeCajaDeTipo(Caja caja, TipoIngreso tipoIngreso) { log.debug( @@ -450,13 +381,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return Optional.ofNullable(nroFinal); } - /** - * Obtiene el primer numero z inicial dentro de una caja - * - * @param caja caja a la que pertenecen los ingresos en los que buscar - * @return Un optional que contiene el primer numero z inicial, este puede estar vacio ya que no - * es seguro que exista tal numero z inicial - */ @Override public Optional getPrimerNroZInicialDeCaja(Caja caja) { log.debug("Se intentara conseguir el primero numero z inicial dentro de la caja " + caja); @@ -484,13 +408,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return Optional.ofNullable(nroZInicial); } - /** - * Obtiene el ultimo numero z final dentro de una caja - * - * @param caja caja a la que pertenecen los ingresos en los que buscar - * @return Un optional que contiene el ultimo numero z final, este puede estar vacio ya que no - * es seguro que exista tal numero z final - */ @Override public Optional getUltimoNroZFinalDeCaja(Caja caja) { log.debug("Se intentara conseguir el ultimo numero z final dentro de la caja " + caja); @@ -516,10 +433,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { return Optional.ofNullable(nroZFinal); } - /** - * Inserta un ingreso en la base de datos - * @param ingreso Ingreso a insertar - */ @Override public void insert(Ingreso ingreso) { log.debug("Se intentara insertar el ingreso " + ingreso); @@ -548,10 +461,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { log.debug("Se inserto el ingreso " + ingreso); } - /** - * Actualiza un ingreso existente en la base de datos - * @param ingreso Ingreso a actualizar - */ @Override public void update(Ingreso ingreso) { log.debug("Se intentara actualizar el ingreso " + ingreso); @@ -574,10 +483,6 @@ public class SQLiteIngresoDAO implements IngresoDAO { log.debug("Se actualizo el ingreso " + ingreso); } - /** - * Elimnina un ingreso existente en la base de datos - * @param ingreso Ingreso a eliminar - */ @Override public void delete(Ingreso ingreso) { log.debug("Se intentara eliminar el ingreso " + ingreso); diff --git a/src/danielcortes/xyz/models/tipo_egreso/SQLiteTipoEgresoDAO.java b/src/danielcortes/xyz/models/tipo_egreso/SQLiteTipoEgresoDAO.java index 17655d8..7f41ad4 100644 --- a/src/danielcortes/xyz/models/tipo_egreso/SQLiteTipoEgresoDAO.java +++ b/src/danielcortes/xyz/models/tipo_egreso/SQLiteTipoEgresoDAO.java @@ -49,11 +49,6 @@ public class SQLiteTipoEgresoDAO implements TipoEgresoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene una lista todos los TipoEgreso existentes - * - * @return Una lista de tipoEgreso - */ @Override public List getAll() { log.debug("Se intentara conseguir todos los tipoEgreso"); @@ -77,13 +72,6 @@ public class SQLiteTipoEgresoDAO implements TipoEgresoDAO { return tipoEgresoList; } - /** - * Obtiene un TipoEgreso dado su id en la base de datos - * - * @param id Id pertenciente al TipoEgreso - * @return Un optional que contiene el TipoEgreso y puede estar vacio, dado que no es 100% seguro - * que el id entregado exista o siquiera sea valido. - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un TipoEgreso con id " + id); @@ -107,13 +95,6 @@ public class SQLiteTipoEgresoDAO implements TipoEgresoDAO { return Optional.ofNullable(tipoEgreso); } - - /** - * Obtiene un TipoEgreso dado su nombre - * @param nombre Nombre del TipoEgreso buscado - * @return Un optional que contiene el TipoEgreso y puede estar vacio, dado que no es 100% seguro - * que el nombre entregado exista o siquiera sea valido. - */ @Override public Optional getByNombre(String nombre) { log.debug("Se intentara conseguir un TipoEgreso con nombre" + nombre); diff --git a/src/danielcortes/xyz/models/tipo_egreso/TipoEgresoDAO.java b/src/danielcortes/xyz/models/tipo_egreso/TipoEgresoDAO.java index cf5bfcf..d598174 100644 --- a/src/danielcortes/xyz/models/tipo_egreso/TipoEgresoDAO.java +++ b/src/danielcortes/xyz/models/tipo_egreso/TipoEgresoDAO.java @@ -52,9 +52,24 @@ import java.util.List; import java.util.Optional; public interface TipoEgresoDAO { + + /** + * Obtiene todos los TipoEgreso + * @return Lista de TipoEgreso + */ List getAll(); + /** + * Obtiene un TipoEgreso dado su Id + * @param id Id del TipoEgreso + * @return Un Optional que puede contener el TipoEgreso o puede estar vacio + */ Optional getById(int id); + /** + * Obtiene un TipoEgreso dado su nombre + * @param nombre Nombre del TipoEgreso + * @return Un Optional que puede contener el TipoEgreso o puede estar vacio + */ Optional getByNombre(String nombre); } diff --git a/src/danielcortes/xyz/models/tipo_ingreso/SQLiteTipoIngresoDAO.java b/src/danielcortes/xyz/models/tipo_ingreso/SQLiteTipoIngresoDAO.java index cc2579e..e492063 100644 --- a/src/danielcortes/xyz/models/tipo_ingreso/SQLiteTipoIngresoDAO.java +++ b/src/danielcortes/xyz/models/tipo_ingreso/SQLiteTipoIngresoDAO.java @@ -36,10 +36,6 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -/** - * Objeto DAO que realiza las querys y mapeos necesarios del objeto TipoIngreso. En especifico esta - * implementacion se comunica con la base de datos SQLite - */ public class SQLiteTipoIngresoDAO implements TipoIngresoDAO { private static final Logger log = LogManager.getLogger(SQLiteTipoIngresoDAO.class); @@ -49,11 +45,6 @@ public class SQLiteTipoIngresoDAO implements TipoIngresoDAO { this.connectionHolder = new SQLiteConnectionHolder(); } - /** - * Obtiene una lista todos los TipoIngreso existentes - * - * @return Una lista de TipoIngreso - */ @Override public List getAll() { log.debug("Se intentara conseguir todos los TipoIngreso"); @@ -77,13 +68,6 @@ public class SQLiteTipoIngresoDAO implements TipoIngresoDAO { return tiposIngresoList; } - /** - * Obtiene un TipoIngreso por su id - * - * @param id Id unico del TipoIngreso - * @return Un optional que puede contener TipoIngreso o puede estar vacio, dado que no es seguro - * que exista un TipoIngreso con el id indicado - */ @Override public Optional getById(int id) { log.debug("Se intentara conseguir un TipoIngreso con id " + id); @@ -107,13 +91,6 @@ public class SQLiteTipoIngresoDAO implements TipoIngresoDAO { return Optional.ofNullable(tipoIngreso); } - /** - * Obtiene un TipoIngreso dado su nombre - * - * @param nombre Nombre del TipoIngreso - * @return Un optional que puede contenter un TipoIngreso o puede estar vacio, ya que no es seguro - * que exista un TipoIngreso para dado nombre - */ @Override public Optional getByNombre(String nombre) { log.debug("Se intentara conseguir un TipoIngreso con nombre " + nombre); diff --git a/src/danielcortes/xyz/models/tipo_ingreso/TipoIngresoDAO.java b/src/danielcortes/xyz/models/tipo_ingreso/TipoIngresoDAO.java index 0ba6918..e10b159 100644 --- a/src/danielcortes/xyz/models/tipo_ingreso/TipoIngresoDAO.java +++ b/src/danielcortes/xyz/models/tipo_ingreso/TipoIngresoDAO.java @@ -28,9 +28,24 @@ import java.util.List; import java.util.Optional; public interface TipoIngresoDAO { + + /** + * Obtiene todos los TipoIngreso + * @return Una lista con los TipoIngreso + */ List getAll(); + /** + * Obtiene un TipoIngreso dado su id + * @param id Id del TipoIngreso + * @return Un Optional que puede contener el TipoIngreso o puede estar Vacio + */ Optional getById(int id); + /** + * Obtiene un TipoIngreso dado su nombre + * @param nombre Nombre del TipoIngreso + * @return Un Optional que puede contener el TipoIngreso o puede estar Vacio + */ Optional getByNombre(String nombre); } diff --git a/src/danielcortes/xyz/models/version/VersionDAO.java b/src/danielcortes/xyz/models/version/VersionDAO.java index bb3fec1..50fc9a2 100644 --- a/src/danielcortes/xyz/models/version/VersionDAO.java +++ b/src/danielcortes/xyz/models/version/VersionDAO.java @@ -1,5 +1,12 @@ package danielcortes.xyz.models.version; -public interface VersionDAO { +public interface VersionDAO { + + /** + * Actualiza la base de datos a una version superior a la actual + * Este metodo no puede volver la base de datos a una version anterior + * + * @param version Version a la que actualizar + */ void updateTo(int version); } diff --git a/src/danielcortes/xyz/views/ArqueoView.java b/src/danielcortes/xyz/views/ArqueoView.java index 81c221c..0d7b005 100644 --- a/src/danielcortes/xyz/views/ArqueoView.java +++ b/src/danielcortes/xyz/views/ArqueoView.java @@ -41,311 +41,451 @@ import javax.swing.border.TitledBorder; public class ArqueoView { - private JPanel contentPanel; - private NumberFormatedTextField veinteMilField; - private NumberFormatedTextField diezMilField; - private NumberFormatedTextField cincoMilField; - private NumberFormatedTextField dosMilField; - private NumberFormatedTextField milField; - private NumberFormatedTextField quinientosField; - private NumberFormatedTextField cienField; - private NumberFormatedTextField cincuentaField; - private NumberFormatedTextField diezField; - private NumberFormatedTextField chequesField; - private NumberFormatedTextField tarjetasField; - private NumberFormatedTextField efectivoField; - private NumberFormatedTextField documentosField; - private NumberFormatedTextField egresosField; - private NumberFormatedTextField rendidoField; - private JButton guardarEfectivoButton; - private JButton guardarDocumentosButton; - private JButton calcularFondoButton; - private NumberFormatedTextField diferenciaField; - private NumberFormatedTextField debeRendirField; - private NumberFormatedTextField retiroField; + private JPanel contentPanel; + private NumberFormatedTextField veinteMilField; + private NumberFormatedTextField diezMilField; + private NumberFormatedTextField cincoMilField; + private NumberFormatedTextField dosMilField; + private NumberFormatedTextField milField; + private NumberFormatedTextField quinientosField; + private NumberFormatedTextField cienField; + private NumberFormatedTextField cincuentaField; + private NumberFormatedTextField diezField; + private NumberFormatedTextField chequesField; + private NumberFormatedTextField tarjetasField; + private NumberFormatedTextField efectivoField; + private NumberFormatedTextField documentosField; + private NumberFormatedTextField egresosField; + private NumberFormatedTextField rendidoField; + private JButton guardarEfectivoButton; + private JButton guardarDocumentosButton; + private JButton calcularFondoButton; + private NumberFormatedTextField diferenciaField; + private NumberFormatedTextField debeRendirField; + private NumberFormatedTextField retiroField; - public JPanel getContentPanel() { - return contentPanel; - } + public JPanel getContentPanel() { + return contentPanel; + } - public NumberFormatedTextField getVeinteMilField() { - return veinteMilField; - } + public NumberFormatedTextField getVeinteMilField() { + return veinteMilField; + } - public NumberFormatedTextField getDiezMilField() { - return diezMilField; - } + public NumberFormatedTextField getDiezMilField() { + return diezMilField; + } - public NumberFormatedTextField getCincoMilField() { - return cincoMilField; - } + public NumberFormatedTextField getCincoMilField() { + return cincoMilField; + } - public NumberFormatedTextField getDosMilField() { - return dosMilField; - } + public NumberFormatedTextField getDosMilField() { + return dosMilField; + } - public NumberFormatedTextField getMilField() { - return milField; - } + public NumberFormatedTextField getMilField() { + return milField; + } - public NumberFormatedTextField getQuinientosField() { - return quinientosField; - } + public NumberFormatedTextField getQuinientosField() { + return quinientosField; + } - public NumberFormatedTextField getCienField() { - return cienField; - } + public NumberFormatedTextField getCienField() { + return cienField; + } - public NumberFormatedTextField getCincuentaField() { - return cincuentaField; - } + public NumberFormatedTextField getCincuentaField() { + return cincuentaField; + } - public NumberFormatedTextField getDiezField() { - return diezField; - } + public NumberFormatedTextField getDiezField() { + return diezField; + } - public NumberFormatedTextField getChequesField() { - return chequesField; - } + public NumberFormatedTextField getChequesField() { + return chequesField; + } - public NumberFormatedTextField getTarjetasField() { - return tarjetasField; - } + public NumberFormatedTextField getTarjetasField() { + return tarjetasField; + } - public NumberFormatedTextField getEfectivoField() { - return efectivoField; - } + public NumberFormatedTextField getEfectivoField() { + return efectivoField; + } - public NumberFormatedTextField getDocumentosField() { - return documentosField; - } + public NumberFormatedTextField getDocumentosField() { + return documentosField; + } - public NumberFormatedTextField getEgresosField() { - return egresosField; - } + public NumberFormatedTextField getEgresosField() { + return egresosField; + } - public NumberFormatedTextField getRendidoField() { - return rendidoField; - } + public NumberFormatedTextField getRendidoField() { + return rendidoField; + } - public JButton getGuardarEfectivoButton() { - return guardarEfectivoButton; - } + public JButton getGuardarEfectivoButton() { + return guardarEfectivoButton; + } - public JButton getGuardarDocumentosButton() { - return guardarDocumentosButton; - } + public JButton getGuardarDocumentosButton() { + return guardarDocumentosButton; + } - public JButton getCalcularFondoButton() { - return calcularFondoButton; - } + public JButton getCalcularFondoButton() { + return calcularFondoButton; + } - public NumberFormatedTextField getDiferenciaField() { - return diferenciaField; - } + public NumberFormatedTextField getDiferenciaField() { + return diferenciaField; + } - public NumberFormatedTextField getDebeRendirField() { - return debeRendirField; - } + public NumberFormatedTextField getDebeRendirField() { + return debeRendirField; + } - public NumberFormatedTextField getRetiroField() { - return retiroField; - } + public NumberFormatedTextField getRetiroField() { + return retiroField; + } - { + { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } + $$$setupUI$$$(); + } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen")); - final JLabel label1 = new JLabel(); - label1.setText("Total Egresos"); - panel1.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - egresosField = new NumberFormatedTextField(); - egresosField.setEditable(false); - egresosField.setText(""); - panel1.add(egresosField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - diferenciaField = new NumberFormatedTextField(); - diferenciaField.setEditable(false); - Font diferenciaFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, diferenciaField.getFont()); - if (diferenciaFieldFont != null) diferenciaField.setFont(diferenciaFieldFont); - diferenciaField.setText(""); - panel1.add(diferenciaField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setText("Diferencia"); - panel1.add(label2, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JSeparator separator1 = new JSeparator(); - panel1.add(separator1, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - final JLabel label3 = new JLabel(); - label3.setText("Debe Rendir"); - panel1.add(label3, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - debeRendirField = new NumberFormatedTextField(); - debeRendirField.setEditable(false); - Font debeRendirFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, debeRendirField.getFont()); - if (debeRendirFieldFont != null) debeRendirField.setFont(debeRendirFieldFont); - debeRendirField.setText(""); - panel1.add(debeRendirField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - rendidoField = new NumberFormatedTextField(); - rendidoField.setEditable(false); - Font rendidoFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, rendidoField.getFont()); - if (rendidoFieldFont != null) rendidoField.setFont(rendidoFieldFont); - rendidoField.setText(""); - panel1.add(rendidoField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label4 = new JLabel(); - label4.setText("Rendido"); - panel1.add(label4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label5 = new JLabel(); - label5.setText("Total Documentos"); - panel1.add(label5, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - documentosField = new NumberFormatedTextField(); - documentosField.setEditable(false); - documentosField.setText(""); - panel1.add(documentosField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label6 = new JLabel(); - label6.setText("Total Efectivo"); - panel1.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - efectivoField = new NumberFormatedTextField(); - efectivoField.setEditable(false); - efectivoField.setText(""); - panel1.add(efectivoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1)); - contentPanel.add(panel2, new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel3 = new JPanel(); - panel3.setLayout(new GridLayoutManager(10, 2, new Insets(10, 10, 10, 10), -1, -1)); - panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Efectivo", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, -1, -1, panel3.getFont()))); - final JLabel label7 = new JLabel(); - label7.setText("$20000"); - panel3.add(label7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - veinteMilField = new NumberFormatedTextField(); - veinteMilField.setText(""); - panel3.add(veinteMilField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label8 = new JLabel(); - label8.setText("$10000"); - panel3.add(label8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - diezMilField = new NumberFormatedTextField(); - diezMilField.setText(""); - panel3.add(diezMilField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - cincoMilField = new NumberFormatedTextField(); - cincoMilField.setText(""); - panel3.add(cincoMilField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label9 = new JLabel(); - label9.setText("$5000"); - panel3.add(label9, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label10 = new JLabel(); - label10.setText("$2000"); - panel3.add(label10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - dosMilField = new NumberFormatedTextField(); - dosMilField.setText(""); - panel3.add(dosMilField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - milField = new NumberFormatedTextField(); - milField.setText(""); - panel3.add(milField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label11 = new JLabel(); - label11.setText("$1000"); - panel3.add(label11, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label12 = new JLabel(); - label12.setText("$500"); - panel3.add(label12, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - quinientosField = new NumberFormatedTextField(); - quinientosField.setText(""); - panel3.add(quinientosField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label13 = new JLabel(); - label13.setText("$100"); - panel3.add(label13, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - cienField = new NumberFormatedTextField(); - cienField.setText(""); - panel3.add(cienField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label14 = new JLabel(); - label14.setText("$50"); - panel3.add(label14, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - cincuentaField = new NumberFormatedTextField(); - cincuentaField.setText(""); - panel3.add(cincuentaField, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JLabel label15 = new JLabel(); - label15.setText("$10"); - panel3.add(label15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - diezField = new NumberFormatedTextField(); - diezField.setText(""); - panel3.add(diezField, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - guardarEfectivoButton = new JButton(); - guardarEfectivoButton.setText("Guardar"); - panel3.add(guardarEfectivoButton, new GridConstraints(9, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new GridLayoutManager(4, 2, new Insets(10, 10, 10, 10), -1, -1)); - panel2.add(panel4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel4.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Documentos", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, -1, -1, panel4.getFont()))); - chequesField = new NumberFormatedTextField(); - chequesField.setText(""); - panel4.add(chequesField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label16 = new JLabel(); - label16.setText("Tarjetas de Credito"); - panel4.add(label16, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - tarjetasField = new NumberFormatedTextField(); - tarjetasField.setText(""); - panel4.add(tarjetasField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - guardarDocumentosButton = new JButton(); - guardarDocumentosButton.setText("Guardar"); - panel4.add(guardarDocumentosButton, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label17 = new JLabel(); - label17.setText("Cheques al Dia"); - panel4.add(label17, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - retiroField = new NumberFormatedTextField(); - retiroField.setText(""); - panel4.add(retiroField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label18 = new JLabel(); - label18.setText("Retiro"); - panel4.add(label18, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel5 = new JPanel(); - panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - contentPanel.add(panel5, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - calcularFondoButton = new JButton(); - calcularFondoButton.setText("Calcular Fondo"); - panel5.add(calcularFondoButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - contentPanel.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel1, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel1 + .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen")); + final JLabel label1 = new JLabel(); + label1.setText("Total Egresos"); + panel1.add(label1, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + egresosField = new NumberFormatedTextField(); + egresosField.setEditable(false); + egresosField.setText(""); + panel1.add(egresosField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + diferenciaField = new NumberFormatedTextField(); + diferenciaField.setEditable(false); + Font diferenciaFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, diferenciaField.getFont()); + if (diferenciaFieldFont != null) { + diferenciaField.setFont(diferenciaFieldFont); } + diferenciaField.setText(""); + panel1.add(diferenciaField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label2 = new JLabel(); + label2.setText("Diferencia"); + panel1.add(label2, + new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JSeparator separator1 = new JSeparator(); + panel1.add(separator1, + new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, + null, 0, false)); + final JLabel label3 = new JLabel(); + label3.setText("Debe Rendir"); + panel1.add(label3, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + debeRendirField = new NumberFormatedTextField(); + debeRendirField.setEditable(false); + Font debeRendirFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, debeRendirField.getFont()); + if (debeRendirFieldFont != null) { + debeRendirField.setFont(debeRendirFieldFont); + } + debeRendirField.setText(""); + panel1.add(debeRendirField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + rendidoField = new NumberFormatedTextField(); + rendidoField.setEditable(false); + Font rendidoFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, rendidoField.getFont()); + if (rendidoFieldFont != null) { + rendidoField.setFont(rendidoFieldFont); + } + rendidoField.setText(""); + panel1.add(rendidoField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label4 = new JLabel(); + label4.setText("Rendido"); + panel1.add(label4, + new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label5 = new JLabel(); + label5.setText("Total Documentos"); + panel1.add(label5, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + documentosField = new NumberFormatedTextField(); + documentosField.setEditable(false); + documentosField.setText(""); + panel1.add(documentosField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label6 = new JLabel(); + label6.setText("Total Efectivo"); + panel1.add(label6, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + efectivoField = new NumberFormatedTextField(); + efectivoField.setEditable(false); + efectivoField.setText(""); + panel1.add(efectivoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JPanel panel2 = new JPanel(); + panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1)); + contentPanel.add(panel2, + new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JPanel panel3 = new JPanel(); + panel3.setLayout(new GridLayoutManager(10, 2, new Insets(10, 10, 10, 10), -1, -1)); + panel2.add(panel3, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel3.setBorder(BorderFactory + .createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Efectivo", + TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, + this.$$$getFont$$$(null, -1, -1, panel3.getFont()))); + final JLabel label7 = new JLabel(); + label7.setText("$20000"); + panel3.add(label7, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + veinteMilField = new NumberFormatedTextField(); + veinteMilField.setText(""); + panel3.add(veinteMilField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label8 = new JLabel(); + label8.setText("$10000"); + panel3.add(label8, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + diezMilField = new NumberFormatedTextField(); + diezMilField.setText(""); + panel3.add(diezMilField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + cincoMilField = new NumberFormatedTextField(); + cincoMilField.setText(""); + panel3.add(cincoMilField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label9 = new JLabel(); + label9.setText("$5000"); + panel3.add(label9, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label10 = new JLabel(); + label10.setText("$2000"); + panel3.add(label10, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + dosMilField = new NumberFormatedTextField(); + dosMilField.setText(""); + panel3.add(dosMilField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + milField = new NumberFormatedTextField(); + milField.setText(""); + panel3.add(milField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label11 = new JLabel(); + label11.setText("$1000"); + panel3.add(label11, + new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label12 = new JLabel(); + label12.setText("$500"); + panel3.add(label12, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + quinientosField = new NumberFormatedTextField(); + quinientosField.setText(""); + panel3.add(quinientosField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label13 = new JLabel(); + label13.setText("$100"); + panel3.add(label13, + new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + cienField = new NumberFormatedTextField(); + cienField.setText(""); + panel3.add(cienField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label14 = new JLabel(); + label14.setText("$50"); + panel3.add(label14, + new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + cincuentaField = new NumberFormatedTextField(); + cincuentaField.setText(""); + panel3.add(cincuentaField, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JLabel label15 = new JLabel(); + label15.setText("$10"); + panel3.add(label15, + new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + diezField = new NumberFormatedTextField(); + diezField.setText(""); + panel3.add(diezField, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + guardarEfectivoButton = new JButton(); + guardarEfectivoButton.setText("Guardar"); + panel3.add(guardarEfectivoButton, new GridConstraints(9, 0, 1, 2, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false)); + final JPanel panel4 = new JPanel(); + panel4.setLayout(new GridLayoutManager(4, 2, new Insets(10, 10, 10, 10), -1, -1)); + panel2.add(panel4, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel4.setBorder(BorderFactory + .createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Documentos", + TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, + this.$$$getFont$$$(null, -1, -1, panel4.getFont()))); + chequesField = new NumberFormatedTextField(); + chequesField.setText(""); + panel4.add(chequesField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label16 = new JLabel(); + label16.setText("Tarjetas de Credito"); + panel4.add(label16, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + tarjetasField = new NumberFormatedTextField(); + tarjetasField.setText(""); + panel4.add(tarjetasField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + guardarDocumentosButton = new JButton(); + guardarDocumentosButton.setText("Guardar"); + panel4.add(guardarDocumentosButton, + new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final JLabel label17 = new JLabel(); + label17.setText("Cheques al Dia"); + panel4.add(label17, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + retiroField = new NumberFormatedTextField(); + retiroField.setText(""); + panel4.add(retiroField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label18 = new JLabel(); + label18.setText("Retiro"); + panel4.add(label18, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JPanel panel5 = new JPanel(); + panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + contentPanel.add(panel5, + new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + calcularFondoButton = new JButton(); + calcularFondoButton.setText("Calcular Fondo"); + panel5.add(calcularFondoButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final Spacer spacer1 = new Spacer(); + contentPanel.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + } - /** - * @noinspection ALL - */ - private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { - if (currentFont == null) return null; - String resultName; - if (fontName == null) { - resultName = currentFont.getName(); - } else { - Font testFont = new Font(fontName, Font.PLAIN, 10); - if (testFont.canDisplay('a') && testFont.canDisplay('1')) { - resultName = fontName; - } else { - resultName = currentFont.getName(); - } - } - return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize()); + /** + * @noinspection ALL + */ + private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { + if (currentFont == null) { + return null; } + String resultName; + if (fontName == null) { + resultName = currentFont.getName(); + } else { + Font testFont = new Font(fontName, Font.PLAIN, 10); + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { + resultName = fontName; + } else { + resultName = currentFont.getName(); + } + } + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), + size >= 0 ? size : currentFont.getSize()); + } - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } } diff --git a/src/danielcortes/xyz/views/EgresosView.java b/src/danielcortes/xyz/views/EgresosView.java index 6c7864e..e213226 100644 --- a/src/danielcortes/xyz/views/EgresosView.java +++ b/src/danielcortes/xyz/views/EgresosView.java @@ -48,215 +48,287 @@ import javax.swing.table.TableRowSorter; public class EgresosView { - public JPanel contentPanel; - private JTable egresosTable; - private JButton guardarButton; - private NumberFormatedTextField valorField; - private JTextField descripcionField; - private JTextField nroField; - private NumberFormatedTextField totalEgresosField; - private JComboBox tipoCombo; + public JPanel contentPanel; + private JTable egresosTable; + private JButton guardarButton; + private NumberFormatedTextField valorField; + private JTextField descripcionField; + private JTextField nroField; + private NumberFormatedTextField totalEgresosField; + private JComboBox tipoCombo; - private JButton eliminarButton; - private JLabel errorNumero; - private JLabel errorDescripcion; - private JLabel errorValor; - private JLabel errorTipoEgreso; - private JButton editarButton; + private JButton eliminarButton; + private JLabel errorNumero; + private JLabel errorDescripcion; + private JLabel errorValor; + private JLabel errorTipoEgreso; + private JButton editarButton; - private EgresosTableModel egresosTableModel; + private EgresosTableModel egresosTableModel; - private void createUIComponents() { - createEgresosTable(); - createTipoCombo(); - } + private void createUIComponents() { + createEgresosTable(); + createTipoCombo(); + } - private void createEgresosTable() { - egresosTableModel = new EgresosTableModel(); - egresosTable = new JTable(egresosTableModel); + private void createEgresosTable() { + egresosTableModel = new EgresosTableModel(); + egresosTable = new JTable(egresosTableModel); - RowSorter sorter = new TableRowSorter<>(egresosTableModel); - egresosTable.setRowSorter(sorter); - egresosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - } + RowSorter sorter = new TableRowSorter<>(egresosTableModel); + egresosTable.setRowSorter(sorter); + egresosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + } - private void createTipoCombo() { - this.tipoCombo = new JComboBox<>(); - } + private void createTipoCombo() { + this.tipoCombo = new JComboBox<>(); + } - public JPanel getContentPanel() { - return contentPanel; - } + public JPanel getContentPanel() { + return contentPanel; + } - public JButton getGuardarButton() { - return guardarButton; - } + public JButton getGuardarButton() { + return guardarButton; + } - public JButton getEliminarButton() { - return eliminarButton; - } + public JButton getEliminarButton() { + return eliminarButton; + } - public JButton getEditarButton() { - return editarButton; - } + public JButton getEditarButton() { + return editarButton; + } - public NumberFormatedTextField getValorField() { - return valorField; - } + public NumberFormatedTextField getValorField() { + return valorField; + } - public JTextField getDescripcionField() { - return descripcionField; - } + public JTextField getDescripcionField() { + return descripcionField; + } - public JTextField getNroField() { - return nroField; - } + public JTextField getNroField() { + return nroField; + } - public NumberFormatedTextField getTotalEgresosField() { - return totalEgresosField; - } + public NumberFormatedTextField getTotalEgresosField() { + return totalEgresosField; + } - public JComboBox getTipoCombo() { - return tipoCombo; - } + public JComboBox getTipoCombo() { + return tipoCombo; + } - public JTable getEgresosTable() { - return egresosTable; - } + public JTable getEgresosTable() { + return egresosTable; + } - public EgresosTableModel getEgresosTableModel() { - return egresosTableModel; - } + public EgresosTableModel getEgresosTableModel() { + return egresosTableModel; + } - public JLabel getErrorNumero() { - return errorNumero; - } + public JLabel getErrorNumero() { + return errorNumero; + } - public JLabel getErrorDescripcion() { - return errorDescripcion; - } + public JLabel getErrorDescripcion() { + return errorDescripcion; + } - public JLabel getErrorValor() { - return errorValor; - } + public JLabel getErrorValor() { + return errorValor; + } - public JLabel getErrorTipoEgreso() { - return errorTipoEgreso; - } + public JLabel getErrorTipoEgreso() { + return errorTipoEgreso; + } - { + { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } + $$$setupUI$$$(); + } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - createUIComponents(); - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Egresos")); - final JScrollPane scrollPane1 = new JScrollPane(); - panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - scrollPane1.setViewportView(egresosTable); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), -1, -1)); - panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label1 = new JLabel(); - label1.setText("N°"); - panel2.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setText("Descripcion"); - panel2.add(label2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - descripcionField = new JTextField(); - panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - nroField = new JTextField(); - panel2.add(nroField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - valorField = new NumberFormatedTextField(); - panel2.add(valorField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label3 = new JLabel(); - label3.setText("Valor"); - panel2.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label4 = new JLabel(); - label4.setText("Tipo"); - panel2.add(label4, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - panel2.add(tipoCombo, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - errorNumero = new JLabel(); - errorNumero.setEnabled(true); - errorNumero.setForeground(new Color(-65536)); - errorNumero.setText("Error"); - errorNumero.setVisible(false); - panel2.add(errorNumero, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorDescripcion = new JLabel(); - errorDescripcion.setEnabled(true); - errorDescripcion.setForeground(new Color(-65536)); - errorDescripcion.setText("Error"); - errorDescripcion.setVisible(false); - panel2.add(errorDescripcion, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorValor = new JLabel(); - errorValor.setEnabled(true); - errorValor.setForeground(new Color(-65536)); - errorValor.setText("Error"); - errorValor.setVisible(false); - panel2.add(errorValor, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorTipoEgreso = new JLabel(); - errorTipoEgreso.setEnabled(true); - errorTipoEgreso.setForeground(new Color(-65536)); - errorTipoEgreso.setText("Error"); - errorTipoEgreso.setVisible(false); - panel2.add(errorTipoEgreso, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel3 = new JPanel(); - panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); - panel1.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); - panel3.add(panel4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - guardarButton = new JButton(); - guardarButton.setText("Añadir"); - guardarButton.setMnemonic('A'); - guardarButton.setDisplayedMnemonicIndex(0); - panel4.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - eliminarButton = new JButton(); - eliminarButton.setEnabled(false); - eliminarButton.setText("Eliminar"); - eliminarButton.setMnemonic('E'); - eliminarButton.setDisplayedMnemonicIndex(0); - panel4.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - editarButton = new JButton(); - editarButton.setEnabled(false); - editarButton.setText("Editar"); - editarButton.setMnemonic('D'); - editarButton.setDisplayedMnemonicIndex(1); - panel4.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final Spacer spacer1 = new Spacer(); - panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - final JPanel panel5 = new JPanel(); - panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); - panel3.add(panel5, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label5 = new JLabel(); - label5.setText("Total Egresos:"); - panel5.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - totalEgresosField = new NumberFormatedTextField(); - totalEgresosField.setEditable(false); - panel5.add(totalEgresosField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - } + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + createUIComponents(); + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel1, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel1 + .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Egresos")); + final JScrollPane scrollPane1 = new JScrollPane(); + panel1.add(scrollPane1, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, + null, null, 0, false)); + scrollPane1.setViewportView(egresosTable); + final JPanel panel2 = new JPanel(); + panel2.setLayout(new GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), -1, -1)); + panel1.add(panel2, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JLabel label1 = new JLabel(); + label1.setText("N°"); + panel2.add(label1, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label2 = new JLabel(); + label2.setText("Descripcion"); + panel2.add(label2, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + descripcionField = new JTextField(); + panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + nroField = new JTextField(); + panel2.add(nroField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + valorField = new NumberFormatedTextField(); + panel2.add(valorField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label3 = new JLabel(); + label3.setText("Valor"); + panel2.add(label3, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label4 = new JLabel(); + label4.setText("Tipo"); + panel2.add(label4, + new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + panel2.add(tipoCombo, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + errorNumero = new JLabel(); + errorNumero.setEnabled(true); + errorNumero.setForeground(new Color(-65536)); + errorNumero.setText("Error"); + errorNumero.setVisible(false); + panel2.add(errorNumero, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorDescripcion = new JLabel(); + errorDescripcion.setEnabled(true); + errorDescripcion.setForeground(new Color(-65536)); + errorDescripcion.setText("Error"); + errorDescripcion.setVisible(false); + panel2.add(errorDescripcion, + new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorValor = new JLabel(); + errorValor.setEnabled(true); + errorValor.setForeground(new Color(-65536)); + errorValor.setText("Error"); + errorValor.setVisible(false); + panel2.add(errorValor, + new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorTipoEgreso = new JLabel(); + errorTipoEgreso.setEnabled(true); + errorTipoEgreso.setForeground(new Color(-65536)); + errorTipoEgreso.setText("Error"); + errorTipoEgreso.setVisible(false); + panel2.add(errorTipoEgreso, + new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JPanel panel3 = new JPanel(); + panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); + panel1.add(panel3, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JPanel panel4 = new JPanel(); + panel4.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); + panel3.add(panel4, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + guardarButton = new JButton(); + guardarButton.setText("Añadir"); + guardarButton.setMnemonic('A'); + guardarButton.setDisplayedMnemonicIndex(0); + panel4.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + eliminarButton = new JButton(); + eliminarButton.setEnabled(false); + eliminarButton.setText("Eliminar"); + eliminarButton.setMnemonic('E'); + eliminarButton.setDisplayedMnemonicIndex(0); + panel4.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + editarButton = new JButton(); + editarButton.setEnabled(false); + editarButton.setText("Editar"); + editarButton.setMnemonic('D'); + editarButton.setDisplayedMnemonicIndex(1); + panel4.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final Spacer spacer1 = new Spacer(); + panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, + 0, false)); + final JPanel panel5 = new JPanel(); + panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); + panel3.add(panel5, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JLabel label5 = new JLabel(); + label5.setText("Total Egresos:"); + panel5.add(label5, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + totalEgresosField = new NumberFormatedTextField(); + totalEgresosField.setEditable(false); + panel5.add(totalEgresosField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + } - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } } diff --git a/src/danielcortes/xyz/views/EstadoResultadoView.java b/src/danielcortes/xyz/views/EstadoResultadoView.java index dbddf44..76fae3a 100644 --- a/src/danielcortes/xyz/views/EstadoResultadoView.java +++ b/src/danielcortes/xyz/views/EstadoResultadoView.java @@ -23,524 +23,771 @@ import javax.swing.SpinnerModel; public class EstadoResultadoView { - private NumberFormatedTextField ventaBrutaField; - private NumberFormatedTextField ventaNetaField; - private NumberFormatedTextField ventaIVAField; - private NumberFormatedTextField ventaExentasField; - private NumberFormatedTextField ventasNetaExentasField; - private NumberFormatedTextField gastosOperacionalesCostoVenta; - private NumberFormatedTextField gastosOperacionalesRemuneraciones; - private NumberFormatedTextField gastosOperacionalesFiniquitos; - private NumberFormatedTextField gastosOperacionalesAguinaldo; - private NumberFormatedTextField gastosOperacionalesPartime; - private NumberFormatedTextField gastosOperacionalesBonos; - private NumberFormatedTextField gastosOperacionalesHonorariosContador; - private NumberFormatedTextField gastosOperacionalesArriendo; - private NumberFormatedTextField gastosOperacionalesTotal; - private NumberFormatedTextField serviciosAgua; - private NumberFormatedTextField serviciosLuz; - private NumberFormatedTextField serviciosGas; - private NumberFormatedTextField serviciosTelefono; - private NumberFormatedTextField serviciosTotal; - private NumberFormatedTextField gastosGeneralesCuentaCorrienteFactura; - private NumberFormatedTextField gastosGeneralesCuentaCorrienteBoleta; - private NumberFormatedTextField gastosGeneralesCuentaCorrienteSinRespaldo; - private NumberFormatedTextField gastosGeneralesEfectivoFacturaField; - private NumberFormatedTextField gastosGeneralesEfectivoBoletaField; - private NumberFormatedTextField gastosGeneralesEfectivoSinRespaldo; - private NumberFormatedTextField gastosGeneralesTotal; - private NumberFormatedTextField resumenUtilidad; - private NumberFormatedTextField resumenPPMMes; - private NumberFormatedTextField resumenIVAMes; - private NumberFormatedTextField resumenIVAFavor; - private NumberFormatedTextField resumenResultado; - private JSpinner yearSpinner; - private JComboBox monthCombo; - private JPanel contentPanel; - private NumberFormatedTextField serviciosOtro; - private NumberFormatedTextField resumenAPagar; - private NumberFormatedTextField resumenIVAPPM; - private DoubleFormatedTextField resumenPPM; - private JButton guardarButton; - private JButton exportarButton; - private DoubleFormatedTextField gastosOperacionesPorcentajeCostoVenta; + private NumberFormatedTextField ventaBrutaField; + private NumberFormatedTextField ventaNetaField; + private NumberFormatedTextField ventaIVAField; + private NumberFormatedTextField ventaExentasField; + private NumberFormatedTextField ventasNetaExentasField; + private NumberFormatedTextField gastosOperacionalesCostoVenta; + private NumberFormatedTextField gastosOperacionalesRemuneraciones; + private NumberFormatedTextField gastosOperacionalesFiniquitos; + private NumberFormatedTextField gastosOperacionalesAguinaldo; + private NumberFormatedTextField gastosOperacionalesPartime; + private NumberFormatedTextField gastosOperacionalesBonos; + private NumberFormatedTextField gastosOperacionalesHonorariosContador; + private NumberFormatedTextField gastosOperacionalesArriendo; + private NumberFormatedTextField gastosOperacionalesTotal; + private NumberFormatedTextField serviciosAgua; + private NumberFormatedTextField serviciosLuz; + private NumberFormatedTextField serviciosGas; + private NumberFormatedTextField serviciosTelefono; + private NumberFormatedTextField serviciosTotal; + private NumberFormatedTextField gastosGeneralesCuentaCorrienteFactura; + private NumberFormatedTextField gastosGeneralesCuentaCorrienteBoleta; + private NumberFormatedTextField gastosGeneralesCuentaCorrienteSinRespaldo; + private NumberFormatedTextField gastosGeneralesEfectivoFacturaField; + private NumberFormatedTextField gastosGeneralesEfectivoBoletaField; + private NumberFormatedTextField gastosGeneralesEfectivoSinRespaldo; + private NumberFormatedTextField gastosGeneralesTotal; + private NumberFormatedTextField resumenUtilidad; + private NumberFormatedTextField resumenPPMMes; + private NumberFormatedTextField resumenIVAMes; + private NumberFormatedTextField resumenIVAFavor; + private NumberFormatedTextField resumenResultado; + private JSpinner yearSpinner; + private JComboBox monthCombo; + private JPanel contentPanel; + private NumberFormatedTextField serviciosOtro; + private NumberFormatedTextField resumenAPagar; + private NumberFormatedTextField resumenIVAPPM; + private DoubleFormatedTextField resumenPPM; + private JButton guardarButton; + private JButton exportarButton; + private DoubleFormatedTextField gastosOperacionesPorcentajeCostoVenta; - private ArrayList months; + private ArrayList months; - public EstadoResultadoView() { - $$$setupUI$$$(); + public EstadoResultadoView() { + $$$setupUI$$$(); + } + + public JPanel getContentPanel() { + return contentPanel; + } + + public YearMonth getMonth() { + int year = Integer.valueOf((String) yearSpinner.getValue()); + int month = this.months.indexOf((String) this.monthCombo.getSelectedItem()) + 1; + + YearMonth yearMonth = YearMonth.of(year, month); + return yearMonth; + } + + public JSpinner getYearSpinner() { + return yearSpinner; + } + + public JComboBox getMonthCombo() { + return monthCombo; + } + + public NumberFormatedTextField getVentaBrutaField() { + return ventaBrutaField; + } + + public NumberFormatedTextField getVentaNetaField() { + return ventaNetaField; + } + + public NumberFormatedTextField getVentaIVAField() { + return ventaIVAField; + } + + public NumberFormatedTextField getVentaExentasField() { + return ventaExentasField; + } + + public NumberFormatedTextField getVentasNetaExentasField() { + return ventasNetaExentasField; + } + + public NumberFormatedTextField getGastosOperacionalesCostoVenta() { + return gastosOperacionalesCostoVenta; + } + + public NumberFormatedTextField getGastosOperacionalesRemuneraciones() { + return gastosOperacionalesRemuneraciones; + } + + public NumberFormatedTextField getGastosOperacionalesFiniquitos() { + return gastosOperacionalesFiniquitos; + } + + public NumberFormatedTextField getGastosOperacionalesAguinaldo() { + return gastosOperacionalesAguinaldo; + } + + public NumberFormatedTextField getGastosOperacionalesPartime() { + return gastosOperacionalesPartime; + } + + public NumberFormatedTextField getGastosOperacionalesBonos() { + return gastosOperacionalesBonos; + } + + public NumberFormatedTextField getGastosOperacionalesHonorariosContador() { + return gastosOperacionalesHonorariosContador; + } + + public NumberFormatedTextField getGastosOperacionalesArriendo() { + return gastosOperacionalesArriendo; + } + + public NumberFormatedTextField getGastosOperacionalesTotal() { + return gastosOperacionalesTotal; + } + + public DoubleFormatedTextField getGastosOperacionesPorcentajeCostoVenta() { + return gastosOperacionesPorcentajeCostoVenta; + } + + public NumberFormatedTextField getServiciosAgua() { + return serviciosAgua; + } + + public NumberFormatedTextField getServiciosLuz() { + return serviciosLuz; + } + + public NumberFormatedTextField getServiciosGas() { + return serviciosGas; + } + + public NumberFormatedTextField getServiciosTelefono() { + return serviciosTelefono; + } + + public NumberFormatedTextField getServiciosTotal() { + return serviciosTotal; + } + + public NumberFormatedTextField getGastosGeneralesCuentaCorrienteFactura() { + return gastosGeneralesCuentaCorrienteFactura; + } + + public NumberFormatedTextField getGastosGeneralesCuentaCorrienteBoleta() { + return gastosGeneralesCuentaCorrienteBoleta; + } + + public NumberFormatedTextField getGastosGeneralesCuentaCorrienteSinRespaldo() { + return gastosGeneralesCuentaCorrienteSinRespaldo; + } + + public NumberFormatedTextField getGastosGeneralesEfectivoFacturaField() { + return gastosGeneralesEfectivoFacturaField; + } + + public NumberFormatedTextField getGastosGeneralesEfectivoBoletaField() { + return gastosGeneralesEfectivoBoletaField; + } + + public NumberFormatedTextField getGastosGeneralesEfectivoSinRespaldo() { + return gastosGeneralesEfectivoSinRespaldo; + } + + public NumberFormatedTextField getGastosGeneralesTotal() { + return gastosGeneralesTotal; + } + + public NumberFormatedTextField getResumenUtilidad() { + return resumenUtilidad; + } + + public NumberFormatedTextField getResumenPPMMes() { + return resumenPPMMes; + } + + public NumberFormatedTextField getResumenIVAMes() { + return resumenIVAMes; + } + + public NumberFormatedTextField getResumenIVAFavor() { + return resumenIVAFavor; + } + + public NumberFormatedTextField getResumenResultado() { + return resumenResultado; + } + + public NumberFormatedTextField getServiciosOtro() { + return serviciosOtro; + } + + public NumberFormatedTextField getResumenAPagar() { + return resumenAPagar; + } + + public NumberFormatedTextField getResumenIVAPPM() { + return resumenIVAPPM; + } + + public DoubleFormatedTextField getResumenPPM() { + return resumenPPM; + } + + public JButton getGuardarButton() { + return guardarButton; + } + + public JButton getExportarButton() { + return exportarButton; + } + + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + createUIComponents(); + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(3, 3, new Insets(10, 10, 10, 10), -1, -1)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(6, 2, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel1, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Venta")); + final JLabel label1 = new JLabel(); + label1.setText("Bruto:"); + panel1.add(label1, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label2 = new JLabel(); + label2.setText("Neto:"); + panel1.add(label2, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label3 = new JLabel(); + label3.setText("IVA:"); + panel1.add(label3, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label4 = new JLabel(); + label4.setText("Exentas:"); + panel1.add(label4, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label5 = new JLabel(); + label5.setText("Neto + Exentas:"); + panel1.add(label5, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + ventaBrutaField = new NumberFormatedTextField(); + ventaBrutaField.setEditable(false); + panel1.add(ventaBrutaField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + ventaNetaField = new NumberFormatedTextField(); + ventaNetaField.setEditable(false); + panel1.add(ventaNetaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + ventaIVAField = new NumberFormatedTextField(); + ventaIVAField.setEditable(false); + panel1.add(ventaIVAField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + ventaExentasField = new NumberFormatedTextField(); + ventaExentasField.setEditable(false); + panel1.add(ventaExentasField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + ventasNetaExentasField = new NumberFormatedTextField(); + ventasNetaExentasField.setEditable(false); + panel1.add(ventasNetaExentasField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final Spacer spacer1 = new Spacer(); + panel1.add(spacer1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + final JPanel panel2 = new JPanel(); + panel2.setLayout(new GridLayoutManager(9, 2, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel2, + new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel2 + .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen")); + resumenUtilidad = new NumberFormatedTextField(); + resumenUtilidad.setEditable(false); + panel2.add(resumenUtilidad, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + resumenPPMMes = new NumberFormatedTextField(); + resumenPPMMes.setEditable(false); + panel2.add(resumenPPMMes, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + resumenIVAMes = new NumberFormatedTextField(); + resumenIVAMes.setEditable(false); + panel2.add(resumenIVAMes, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + resumenIVAFavor = new NumberFormatedTextField(); + resumenIVAFavor.setEditable(true); + panel2.add(resumenIVAFavor, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + resumenResultado = new NumberFormatedTextField(); + resumenResultado.setEditable(false); + panel2.add(resumenResultado, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label6 = new JLabel(); + label6.setText("Utilidad:"); + panel2.add(label6, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label7 = new JLabel(); + label7.setText("PPM Mes:"); + panel2.add(label7, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label8 = new JLabel(); + label8.setText("+ IVA Mes:"); + panel2.add(label8, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label9 = new JLabel(); + label9.setText("- IVA A Favor:"); + panel2.add(label9, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label10 = new JLabel(); + label10.setText("Resultado:"); + panel2.add(label10, + new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final Spacer spacer2 = new Spacer(); + panel2.add(spacer2, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + final JLabel label11 = new JLabel(); + label11.setText("PPM:"); + panel2.add(label11, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + resumenAPagar = new NumberFormatedTextField(); + resumenAPagar.setEditable(false); + panel2.add(resumenAPagar, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label12 = new JLabel(); + label12.setText("A Pagar PPM + IVA"); + panel2.add(label12, + new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + resumenIVAPPM = new NumberFormatedTextField(); + resumenIVAPPM.setEditable(false); + panel2.add(resumenIVAPPM, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + resumenPPM = new DoubleFormatedTextField(); + panel2.add(resumenPPM, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JPanel panel3 = new JPanel(); + panel3.setLayout(new GridLayoutManager(1, 7, new Insets(0, 0, 0, 0), -1, -1)); + contentPanel.add(panel3, + new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final Spacer spacer3 = new Spacer(); + panel3.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, + 0, false)); + final JLabel label13 = new JLabel(); + label13.setText("Mes:"); + panel3.add(label13, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + panel3.add(monthCombo, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label14 = new JLabel(); + label14.setText("Año:"); + panel3.add(label14, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + panel3.add(yearSpinner, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + guardarButton = new JButton(); + guardarButton.setText("Guardar"); + panel3.add(guardarButton, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + exportarButton = new JButton(); + exportarButton.setText("Exportar"); + panel3.add(exportarButton, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JPanel panel4 = new JPanel(); + panel4.setLayout(new GridLayoutManager(10, 3, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel4, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel4.setBorder(BorderFactory + .createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Operacionales")); + final JLabel label15 = new JLabel(); + label15.setText("Costo de Venta:"); + panel4.add(label15, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label16 = new JLabel(); + label16.setText("Remuneraciones:"); + panel4.add(label16, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label17 = new JLabel(); + label17.setText("Finiquitos:"); + panel4.add(label17, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label18 = new JLabel(); + label18.setText("Aguinaldo:"); + panel4.add(label18, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label19 = new JLabel(); + label19.setText("Partime:"); + panel4.add(label19, + new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label20 = new JLabel(); + label20.setText("Bonos Personal:"); + panel4.add(label20, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label21 = new JLabel(); + label21.setText("Honorarios Contador:"); + panel4.add(label21, + new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label22 = new JLabel(); + label22.setText("Arriendo:"); + panel4.add(label22, + new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + gastosOperacionalesCostoVenta = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesCostoVenta, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesRemuneraciones = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesRemuneraciones, + new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesFiniquitos = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesFiniquitos, + new GridConstraints(2, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesAguinaldo = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesAguinaldo, + new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesPartime = new NumberFormatedTextField(); + gastosOperacionalesPartime.setEditable(false); + panel4.add(gastosOperacionalesPartime, + new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesBonos = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesBonos, + new GridConstraints(5, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesHonorariosContador = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesHonorariosContador, + new GridConstraints(6, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosOperacionalesArriendo = new NumberFormatedTextField(); + panel4.add(gastosOperacionalesArriendo, + new GridConstraints(7, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label23 = new JLabel(); + label23.setText("Total:"); + panel4.add(label23, + new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + gastosOperacionalesTotal = new NumberFormatedTextField(); + gastosOperacionalesTotal.setEditable(false); + panel4.add(gastosOperacionalesTotal, + new GridConstraints(9, 1, 1, 2, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final Spacer spacer4 = new Spacer(); + panel4.add(spacer4, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + gastosOperacionesPorcentajeCostoVenta = new DoubleFormatedTextField(); + gastosOperacionesPorcentajeCostoVenta.setColumns(6); + gastosOperacionesPorcentajeCostoVenta.setEditable(false); + panel4.add(gastosOperacionesPorcentajeCostoVenta, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final JPanel panel5 = new JPanel(); + panel5.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel5, + new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel5.setBorder( + BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Servicios")); + final JLabel label24 = new JLabel(); + label24.setText("Agua:"); + panel5.add(label24, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label25 = new JLabel(); + label25.setText("Luz:"); + panel5.add(label25, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label26 = new JLabel(); + label26.setText("Gas:"); + panel5.add(label26, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label27 = new JLabel(); + label27.setText("Telefono:"); + panel5.add(label27, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label28 = new JLabel(); + label28.setText("Total:"); + panel5.add(label28, + new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + serviciosAgua = new NumberFormatedTextField(); + panel5.add(serviciosAgua, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + serviciosLuz = new NumberFormatedTextField(); + panel5.add(serviciosLuz, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + serviciosGas = new NumberFormatedTextField(); + panel5.add(serviciosGas, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + serviciosTelefono = new NumberFormatedTextField(); + panel5.add(serviciosTelefono, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + serviciosTotal = new NumberFormatedTextField(); + serviciosTotal.setEditable(false); + panel5.add(serviciosTotal, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final Spacer spacer5 = new Spacer(); + panel5.add(spacer5, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + serviciosOtro = new NumberFormatedTextField(); + panel5.add(serviciosOtro, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label29 = new JLabel(); + label29.setText("Otros:"); + panel5.add(label29, + new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JPanel panel6 = new JPanel(); + panel6.setLayout(new GridLayoutManager(8, 2, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel6, + new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel6.setBorder( + BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Generales")); + gastosGeneralesCuentaCorrienteFactura = new NumberFormatedTextField(); + panel6.add(gastosGeneralesCuentaCorrienteFactura, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesCuentaCorrienteBoleta = new NumberFormatedTextField(); + panel6.add(gastosGeneralesCuentaCorrienteBoleta, + new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesCuentaCorrienteSinRespaldo = new NumberFormatedTextField(); + panel6.add(gastosGeneralesCuentaCorrienteSinRespaldo, + new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesEfectivoFacturaField = new NumberFormatedTextField(); + gastosGeneralesEfectivoFacturaField.setEditable(false); + panel6.add(gastosGeneralesEfectivoFacturaField, + new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesEfectivoBoletaField = new NumberFormatedTextField(); + gastosGeneralesEfectivoBoletaField.setEditable(false); + panel6.add(gastosGeneralesEfectivoBoletaField, + new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesEfectivoSinRespaldo = new NumberFormatedTextField(); + gastosGeneralesEfectivoSinRespaldo.setEditable(false); + panel6.add(gastosGeneralesEfectivoSinRespaldo, + new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + gastosGeneralesTotal = new NumberFormatedTextField(); + gastosGeneralesTotal.setEditable(false); + panel6.add(gastosGeneralesTotal, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label30 = new JLabel(); + label30.setText("CTA CTE Con Factura:"); + panel6.add(label30, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label31 = new JLabel(); + label31.setText("CTA CTE Con Boleta:"); + panel6.add(label31, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label32 = new JLabel(); + label32.setText("CTA CTE Sin Respaldo:"); + panel6.add(label32, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label33 = new JLabel(); + label33.setText("Efectivo Con Factura:"); + panel6.add(label33, + new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label34 = new JLabel(); + label34.setText("Efectivo Con Boleta:"); + panel6.add(label34, + new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label35 = new JLabel(); + label35.setText("Efectivo Sin Respaldo"); + panel6.add(label35, + new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label36 = new JLabel(); + label36.setText("Total:"); + panel6.add(label36, + new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final Spacer spacer6 = new Spacer(); + panel6.add(spacer6, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + } + + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } + + private void createUIComponents() { + createYearSpinner(); + createMonthCombo(); + } + + private void createYearSpinner() { + SpinnerModel model = new YearSpinnerModel(); + this.yearSpinner = new JSpinner(); + this.yearSpinner.setModel(model); + ((DefaultEditor) this.yearSpinner.getEditor()).getTextField().setEditable(true); + } + + private void createMonthCombo() { + months = new ArrayList<>(); + months.add("Enero"); + months.add("Febrero"); + months.add("Marzo"); + months.add("Abril"); + months.add("Mayo"); + months.add("Junio"); + months.add("Julio"); + months.add("Agosto"); + months.add("Septiembre"); + months.add("Octubre"); + months.add("Noviembre"); + months.add("Diciembre"); + + monthCombo = new JComboBox<>(); + for (String month : months) { + monthCombo.addItem(month); } - public JPanel getContentPanel() { - return contentPanel; - } - - public YearMonth getMonth() { - int year = Integer.valueOf((String) yearSpinner.getValue()); - int month = this.months.indexOf((String) this.monthCombo.getSelectedItem()) + 1; - - YearMonth yearMonth = YearMonth.of(year, month); - return yearMonth; - } - - public JSpinner getYearSpinner() { - return yearSpinner; - } - - public JComboBox getMonthCombo() { - return monthCombo; - } - - public NumberFormatedTextField getVentaBrutaField() { - return ventaBrutaField; - } - - public NumberFormatedTextField getVentaNetaField() { - return ventaNetaField; - } - - public NumberFormatedTextField getVentaIVAField() { - return ventaIVAField; - } - - public NumberFormatedTextField getVentaExentasField() { - return ventaExentasField; - } - - public NumberFormatedTextField getVentasNetaExentasField() { - return ventasNetaExentasField; - } - - public NumberFormatedTextField getGastosOperacionalesCostoVenta() { - return gastosOperacionalesCostoVenta; - } - - public NumberFormatedTextField getGastosOperacionalesRemuneraciones() { - return gastosOperacionalesRemuneraciones; - } - - public NumberFormatedTextField getGastosOperacionalesFiniquitos() { - return gastosOperacionalesFiniquitos; - } - - public NumberFormatedTextField getGastosOperacionalesAguinaldo() { - return gastosOperacionalesAguinaldo; - } - - public NumberFormatedTextField getGastosOperacionalesPartime() { - return gastosOperacionalesPartime; - } - - public NumberFormatedTextField getGastosOperacionalesBonos() { - return gastosOperacionalesBonos; - } - - public NumberFormatedTextField getGastosOperacionalesHonorariosContador() { - return gastosOperacionalesHonorariosContador; - } - - public NumberFormatedTextField getGastosOperacionalesArriendo() { - return gastosOperacionalesArriendo; - } - - public NumberFormatedTextField getGastosOperacionalesTotal() { - return gastosOperacionalesTotal; - } - - public DoubleFormatedTextField getGastosOperacionesPorcentajeCostoVenta() { - return gastosOperacionesPorcentajeCostoVenta; - } - - public NumberFormatedTextField getServiciosAgua() { - return serviciosAgua; - } - - public NumberFormatedTextField getServiciosLuz() { - return serviciosLuz; - } - - public NumberFormatedTextField getServiciosGas() { - return serviciosGas; - } - - public NumberFormatedTextField getServiciosTelefono() { - return serviciosTelefono; - } - - public NumberFormatedTextField getServiciosTotal() { - return serviciosTotal; - } - - public NumberFormatedTextField getGastosGeneralesCuentaCorrienteFactura() { - return gastosGeneralesCuentaCorrienteFactura; - } - - public NumberFormatedTextField getGastosGeneralesCuentaCorrienteBoleta() { - return gastosGeneralesCuentaCorrienteBoleta; - } - - public NumberFormatedTextField getGastosGeneralesCuentaCorrienteSinRespaldo() { - return gastosGeneralesCuentaCorrienteSinRespaldo; - } - - public NumberFormatedTextField getGastosGeneralesEfectivoFacturaField() { - return gastosGeneralesEfectivoFacturaField; - } - - public NumberFormatedTextField getGastosGeneralesEfectivoBoletaField() { - return gastosGeneralesEfectivoBoletaField; - } - - public NumberFormatedTextField getGastosGeneralesEfectivoSinRespaldo() { - return gastosGeneralesEfectivoSinRespaldo; - } - - public NumberFormatedTextField getGastosGeneralesTotal() { - return gastosGeneralesTotal; - } - - public NumberFormatedTextField getResumenUtilidad() { - return resumenUtilidad; - } - - public NumberFormatedTextField getResumenPPMMes() { - return resumenPPMMes; - } - - public NumberFormatedTextField getResumenIVAMes() { - return resumenIVAMes; - } - - public NumberFormatedTextField getResumenIVAFavor() { - return resumenIVAFavor; - } - - public NumberFormatedTextField getResumenResultado() { - return resumenResultado; - } - - public NumberFormatedTextField getServiciosOtro() { - return serviciosOtro; - } - - public NumberFormatedTextField getResumenAPagar() { - return resumenAPagar; - } - - public NumberFormatedTextField getResumenIVAPPM() { - return resumenIVAPPM; - } - - public DoubleFormatedTextField getResumenPPM() { - return resumenPPM; - } - - public JButton getGuardarButton() { - return guardarButton; - } - - public JButton getExportarButton() { - return exportarButton; - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - createUIComponents(); - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(3, 3, new Insets(10, 10, 10, 10), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(6, 2, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Venta")); - final JLabel label1 = new JLabel(); - label1.setText("Bruto:"); - panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setText("Neto:"); - panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label3 = new JLabel(); - label3.setText("IVA:"); - panel1.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label4 = new JLabel(); - label4.setText("Exentas:"); - panel1.add(label4, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label5 = new JLabel(); - label5.setText("Neto + Exentas:"); - panel1.add(label5, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - ventaBrutaField = new NumberFormatedTextField(); - ventaBrutaField.setEditable(false); - panel1.add(ventaBrutaField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - ventaNetaField = new NumberFormatedTextField(); - ventaNetaField.setEditable(false); - panel1.add(ventaNetaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - ventaIVAField = new NumberFormatedTextField(); - ventaIVAField.setEditable(false); - panel1.add(ventaIVAField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - ventaExentasField = new NumberFormatedTextField(); - ventaExentasField.setEditable(false); - panel1.add(ventaExentasField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - ventasNetaExentasField = new NumberFormatedTextField(); - ventasNetaExentasField.setEditable(false); - panel1.add(ventasNetaExentasField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final Spacer spacer1 = new Spacer(); - panel1.add(spacer1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(9, 2, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen")); - resumenUtilidad = new NumberFormatedTextField(); - resumenUtilidad.setEditable(false); - panel2.add(resumenUtilidad, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - resumenPPMMes = new NumberFormatedTextField(); - resumenPPMMes.setEditable(false); - panel2.add(resumenPPMMes, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - resumenIVAMes = new NumberFormatedTextField(); - resumenIVAMes.setEditable(false); - panel2.add(resumenIVAMes, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - resumenIVAFavor = new NumberFormatedTextField(); - resumenIVAFavor.setEditable(true); - panel2.add(resumenIVAFavor, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - resumenResultado = new NumberFormatedTextField(); - resumenResultado.setEditable(false); - panel2.add(resumenResultado, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label6 = new JLabel(); - label6.setText("Utilidad:"); - panel2.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label7 = new JLabel(); - label7.setText("PPM Mes:"); - panel2.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label8 = new JLabel(); - label8.setText("+ IVA Mes:"); - panel2.add(label8, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label9 = new JLabel(); - label9.setText("- IVA A Favor:"); - panel2.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label10 = new JLabel(); - label10.setText("Resultado:"); - panel2.add(label10, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer2 = new Spacer(); - panel2.add(spacer2, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - final JLabel label11 = new JLabel(); - label11.setText("PPM:"); - panel2.add(label11, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - resumenAPagar = new NumberFormatedTextField(); - resumenAPagar.setEditable(false); - panel2.add(resumenAPagar, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label12 = new JLabel(); - label12.setText("A Pagar PPM + IVA"); - panel2.add(label12, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - resumenIVAPPM = new NumberFormatedTextField(); - resumenIVAPPM.setEditable(false); - panel2.add(resumenIVAPPM, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - resumenPPM = new DoubleFormatedTextField(); - panel2.add(resumenPPM, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JPanel panel3 = new JPanel(); - panel3.setLayout(new GridLayoutManager(1, 7, new Insets(0, 0, 0, 0), -1, -1)); - contentPanel.add(panel3, new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer3 = new Spacer(); - panel3.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - final JLabel label13 = new JLabel(); - label13.setText("Mes:"); - panel3.add(label13, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - panel3.add(monthCombo, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label14 = new JLabel(); - label14.setText("Año:"); - panel3.add(label14, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - panel3.add(yearSpinner, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - guardarButton = new JButton(); - guardarButton.setText("Guardar"); - panel3.add(guardarButton, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - exportarButton = new JButton(); - exportarButton.setText("Exportar"); - panel3.add(exportarButton, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new GridLayoutManager(10, 3, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel4.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Operacionales")); - final JLabel label15 = new JLabel(); - label15.setText("Costo de Venta:"); - panel4.add(label15, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label16 = new JLabel(); - label16.setText("Remuneraciones:"); - panel4.add(label16, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label17 = new JLabel(); - label17.setText("Finiquitos:"); - panel4.add(label17, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label18 = new JLabel(); - label18.setText("Aguinaldo:"); - panel4.add(label18, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label19 = new JLabel(); - label19.setText("Partime:"); - panel4.add(label19, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label20 = new JLabel(); - label20.setText("Bonos Personal:"); - panel4.add(label20, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label21 = new JLabel(); - label21.setText("Honorarios Contador:"); - panel4.add(label21, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label22 = new JLabel(); - label22.setText("Arriendo:"); - panel4.add(label22, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - gastosOperacionalesCostoVenta = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesCostoVenta, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesRemuneraciones = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesRemuneraciones, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesFiniquitos = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesFiniquitos, new GridConstraints(2, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesAguinaldo = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesAguinaldo, new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesPartime = new NumberFormatedTextField(); - gastosOperacionalesPartime.setEditable(false); - panel4.add(gastosOperacionalesPartime, new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesBonos = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesBonos, new GridConstraints(5, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesHonorariosContador = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesHonorariosContador, new GridConstraints(6, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosOperacionalesArriendo = new NumberFormatedTextField(); - panel4.add(gastosOperacionalesArriendo, new GridConstraints(7, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label23 = new JLabel(); - label23.setText("Total:"); - panel4.add(label23, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - gastosOperacionalesTotal = new NumberFormatedTextField(); - gastosOperacionalesTotal.setEditable(false); - panel4.add(gastosOperacionalesTotal, new GridConstraints(9, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final Spacer spacer4 = new Spacer(); - panel4.add(spacer4, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - gastosOperacionesPorcentajeCostoVenta = new DoubleFormatedTextField(); - gastosOperacionesPorcentajeCostoVenta.setColumns(6); - gastosOperacionesPorcentajeCostoVenta.setEditable(false); - panel4.add(gastosOperacionesPorcentajeCostoVenta, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel5 = new JPanel(); - panel5.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel5, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel5.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Servicios")); - final JLabel label24 = new JLabel(); - label24.setText("Agua:"); - panel5.add(label24, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label25 = new JLabel(); - label25.setText("Luz:"); - panel5.add(label25, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label26 = new JLabel(); - label26.setText("Gas:"); - panel5.add(label26, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label27 = new JLabel(); - label27.setText("Telefono:"); - panel5.add(label27, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label28 = new JLabel(); - label28.setText("Total:"); - panel5.add(label28, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - serviciosAgua = new NumberFormatedTextField(); - panel5.add(serviciosAgua, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - serviciosLuz = new NumberFormatedTextField(); - panel5.add(serviciosLuz, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - serviciosGas = new NumberFormatedTextField(); - panel5.add(serviciosGas, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - serviciosTelefono = new NumberFormatedTextField(); - panel5.add(serviciosTelefono, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - serviciosTotal = new NumberFormatedTextField(); - serviciosTotal.setEditable(false); - panel5.add(serviciosTotal, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final Spacer spacer5 = new Spacer(); - panel5.add(spacer5, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - serviciosOtro = new NumberFormatedTextField(); - panel5.add(serviciosOtro, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label29 = new JLabel(); - label29.setText("Otros:"); - panel5.add(label29, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel6 = new JPanel(); - panel6.setLayout(new GridLayoutManager(8, 2, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel6, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel6.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Generales")); - gastosGeneralesCuentaCorrienteFactura = new NumberFormatedTextField(); - panel6.add(gastosGeneralesCuentaCorrienteFactura, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesCuentaCorrienteBoleta = new NumberFormatedTextField(); - panel6.add(gastosGeneralesCuentaCorrienteBoleta, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesCuentaCorrienteSinRespaldo = new NumberFormatedTextField(); - panel6.add(gastosGeneralesCuentaCorrienteSinRespaldo, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesEfectivoFacturaField = new NumberFormatedTextField(); - gastosGeneralesEfectivoFacturaField.setEditable(false); - panel6.add(gastosGeneralesEfectivoFacturaField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesEfectivoBoletaField = new NumberFormatedTextField(); - gastosGeneralesEfectivoBoletaField.setEditable(false); - panel6.add(gastosGeneralesEfectivoBoletaField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesEfectivoSinRespaldo = new NumberFormatedTextField(); - gastosGeneralesEfectivoSinRespaldo.setEditable(false); - panel6.add(gastosGeneralesEfectivoSinRespaldo, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - gastosGeneralesTotal = new NumberFormatedTextField(); - gastosGeneralesTotal.setEditable(false); - panel6.add(gastosGeneralesTotal, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label30 = new JLabel(); - label30.setText("CTA CTE Con Factura:"); - panel6.add(label30, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label31 = new JLabel(); - label31.setText("CTA CTE Con Boleta:"); - panel6.add(label31, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label32 = new JLabel(); - label32.setText("CTA CTE Sin Respaldo:"); - panel6.add(label32, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label33 = new JLabel(); - label33.setText("Efectivo Con Factura:"); - panel6.add(label33, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label34 = new JLabel(); - label34.setText("Efectivo Con Boleta:"); - panel6.add(label34, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label35 = new JLabel(); - label35.setText("Efectivo Sin Respaldo"); - panel6.add(label35, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label36 = new JLabel(); - label36.setText("Total:"); - panel6.add(label36, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer6 = new Spacer(); - panel6.add(spacer6, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } - - private void createUIComponents() { - createYearSpinner(); - createMonthCombo(); - } - - private void createYearSpinner() { - SpinnerModel model = new YearSpinnerModel(); - this.yearSpinner = new JSpinner(); - this.yearSpinner.setModel(model); - ((DefaultEditor) this.yearSpinner.getEditor()).getTextField().setEditable(true); - } - - private void createMonthCombo() { - months = new ArrayList<>(); - months.add("Enero"); - months.add("Febrero"); - months.add("Marzo"); - months.add("Abril"); - months.add("Mayo"); - months.add("Junio"); - months.add("Julio"); - months.add("Agosto"); - months.add("Septiembre"); - months.add("Octubre"); - months.add("Noviembre"); - months.add("Diciembre"); - - monthCombo = new JComboBox<>(); - for (String month : months) { - monthCombo.addItem(month); - } - - int currentMonth = LocalDate.now().getMonth().getValue() - 1; - monthCombo.setSelectedIndex(currentMonth); - } + int currentMonth = LocalDate.now().getMonth().getValue() - 1; + monthCombo.setSelectedIndex(currentMonth); + } } diff --git a/src/danielcortes/xyz/views/InformesSideBar.java b/src/danielcortes/xyz/views/InformesSideBar.java index a10dd70..f317a2b 100644 --- a/src/danielcortes/xyz/views/InformesSideBar.java +++ b/src/danielcortes/xyz/views/InformesSideBar.java @@ -35,82 +35,106 @@ import javax.swing.JPanel; public class InformesSideBar { - private JButton generarLibroVentasButton; - private JPanel contentPanel; - private JButton GenerarEgresosFacturasMateriaPrimaButton; - private JButton estadoResultadoButton; - private JButton generarResumenArqueoButton; - private JButton volverButton; + private JButton generarLibroVentasButton; + private JPanel contentPanel; + private JButton GenerarEgresosFacturasMateriaPrimaButton; + private JButton estadoResultadoButton; + private JButton generarResumenArqueoButton; + private JButton volverButton; - public JPanel getContentPanel() { - return contentPanel; - } + public JPanel getContentPanel() { + return contentPanel; + } - public JButton getInformeLibroDeVentasButton() { - return generarLibroVentasButton; - } + public JButton getInformeLibroDeVentasButton() { + return generarLibroVentasButton; + } - public JButton getGenerarEgresosFacturasMateriaPrimaButton() { - return GenerarEgresosFacturasMateriaPrimaButton; - } + public JButton getGenerarEgresosFacturasMateriaPrimaButton() { + return GenerarEgresosFacturasMateriaPrimaButton; + } - public JButton getEstadoResultadoButton() { - return estadoResultadoButton; - } + public JButton getEstadoResultadoButton() { + return estadoResultadoButton; + } - public JButton getGenerarResumenArqueoButton() { - return generarResumenArqueoButton; - } + public JButton getGenerarResumenArqueoButton() { + return generarResumenArqueoButton; + } - public JButton getVolverButton() { - return volverButton; - } + public JButton getVolverButton() { + return volverButton; + } - { + { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } + $$$setupUI$$$(); + } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(6, 1, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales")); - generarLibroVentasButton = new JButton(); - generarLibroVentasButton.setText("Libro de Ventas Mensual"); - panel1.add(generarLibroVentasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - GenerarEgresosFacturasMateriaPrimaButton = new JButton(); - GenerarEgresosFacturasMateriaPrimaButton.setText("Informe de Egresos"); - panel1.add(GenerarEgresosFacturasMateriaPrimaButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - panel1.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - estadoResultadoButton = new JButton(); - estadoResultadoButton.setText("Estado Resultado"); - panel1.add(estadoResultadoButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - volverButton = new JButton(); - volverButton.setText("Volver"); - panel1.add(volverButton, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - generarResumenArqueoButton = new JButton(); - generarResumenArqueoButton.setText("Resumen Arqueo"); - panel1.add(generarResumenArqueoButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - } + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(6, 1, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel1, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel1.setBorder( + BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales")); + generarLibroVentasButton = new JButton(); + generarLibroVentasButton.setText("Libro de Ventas Mensual"); + panel1.add(generarLibroVentasButton, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + GenerarEgresosFacturasMateriaPrimaButton = new JButton(); + GenerarEgresosFacturasMateriaPrimaButton.setText("Informe de Egresos"); + panel1.add(GenerarEgresosFacturasMateriaPrimaButton, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final Spacer spacer1 = new Spacer(); + panel1.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + estadoResultadoButton = new JButton(); + estadoResultadoButton.setText("Estado Resultado"); + panel1.add(estadoResultadoButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + volverButton = new JButton(); + volverButton.setText("Volver"); + panel1.add(volverButton, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + generarResumenArqueoButton = new JButton(); + generarResumenArqueoButton.setText("Resumen Arqueo"); + panel1.add(generarResumenArqueoButton, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + } - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } } diff --git a/src/danielcortes/xyz/views/IngresosView.java b/src/danielcortes/xyz/views/IngresosView.java index 854f764..b636a27 100644 --- a/src/danielcortes/xyz/views/IngresosView.java +++ b/src/danielcortes/xyz/views/IngresosView.java @@ -49,240 +49,325 @@ import javax.swing.table.TableRowSorter; public class IngresosView { - private JPanel contentPanel; - private JTable ingresosTable; - private JButton guardarButton; - private JButton eliminarButton; - private NumberFormatedTextField totalIngresoField; - private NumberFormatedTextField valorField; - private JComboBox tipoCombo; - private JLabel errorTipoIngreso; - private JLabel errorValor; - private JButton editarButton; - private JTextField nroInicialField; - private JTextField nroFinalField; - private JLabel errorNroInicial; - private JLabel errorNroFinal; - private JTextField nroZInicialField; - private JTextField nroZFinalField; - private JLabel errorNroZFinal; - private JLabel errorNroZInicial; + private JPanel contentPanel; + private JTable ingresosTable; + private JButton guardarButton; + private JButton eliminarButton; + private NumberFormatedTextField totalIngresoField; + private NumberFormatedTextField valorField; + private JComboBox tipoCombo; + private JLabel errorTipoIngreso; + private JLabel errorValor; + private JButton editarButton; + private JTextField nroInicialField; + private JTextField nroFinalField; + private JLabel errorNroInicial; + private JLabel errorNroFinal; + private JTextField nroZInicialField; + private JTextField nroZFinalField; + private JLabel errorNroZFinal; + private JLabel errorNroZInicial; - private IngresosTableModel ingresosTableModel; + private IngresosTableModel ingresosTableModel; - private void createUIComponents() { - this.createIngresosTable(); - this.createTipoCombo(); - } + private void createUIComponents() { + this.createIngresosTable(); + this.createTipoCombo(); + } - private void createIngresosTable() { - this.ingresosTableModel = new IngresosTableModel(); - this.ingresosTable = new JTable(ingresosTableModel); + private void createIngresosTable() { + this.ingresosTableModel = new IngresosTableModel(); + this.ingresosTable = new JTable(ingresosTableModel); - RowSorter sorter = new TableRowSorter<>(ingresosTableModel); - this.ingresosTable.setRowSorter(sorter); - this.ingresosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - } + RowSorter sorter = new TableRowSorter<>(ingresosTableModel); + this.ingresosTable.setRowSorter(sorter); + this.ingresosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + } - private void createTipoCombo() { - this.tipoCombo = new JComboBox<>(); - } + private void createTipoCombo() { + this.tipoCombo = new JComboBox<>(); + } - public JPanel getContentPanel() { - return contentPanel; - } + public JPanel getContentPanel() { + return contentPanel; + } - public JTable getIngresosTable() { - return ingresosTable; - } + public JTable getIngresosTable() { + return ingresosTable; + } - public JButton getGuardarButton() { - return guardarButton; - } + public JButton getGuardarButton() { + return guardarButton; + } - public JButton getEliminarButton() { - return eliminarButton; - } + public JButton getEliminarButton() { + return eliminarButton; + } - public NumberFormatedTextField getTotalIngresoField() { - return totalIngresoField; - } + public NumberFormatedTextField getTotalIngresoField() { + return totalIngresoField; + } - public NumberFormatedTextField getValorField() { - return valorField; - } + public NumberFormatedTextField getValorField() { + return valorField; + } - public JComboBox getTipoCombo() { - return tipoCombo; - } + public JComboBox getTipoCombo() { + return tipoCombo; + } - public JLabel getErrorTipoIngreso() { - return errorTipoIngreso; - } + public JLabel getErrorTipoIngreso() { + return errorTipoIngreso; + } - public JLabel getErrorValor() { - return errorValor; - } + public JLabel getErrorValor() { + return errorValor; + } - public JButton getEditarButton() { - return editarButton; - } + public JButton getEditarButton() { + return editarButton; + } - public JTextField getNroInicialField() { - return nroInicialField; - } + public JTextField getNroInicialField() { + return nroInicialField; + } - public JTextField getNroFinalField() { - return nroFinalField; - } + public JTextField getNroFinalField() { + return nroFinalField; + } - public JLabel getErrorNroInicial() { - return errorNroInicial; - } + public JLabel getErrorNroInicial() { + return errorNroInicial; + } - public JLabel getErrorNroFinal() { - return errorNroFinal; - } + public JLabel getErrorNroFinal() { + return errorNroFinal; + } - public IngresosTableModel getIngresosTableModel() { - return ingresosTableModel; - } + public IngresosTableModel getIngresosTableModel() { + return ingresosTableModel; + } - public JTextField getNroZInicialField() { - return nroZInicialField; - } + public JTextField getNroZInicialField() { + return nroZInicialField; + } - public JTextField getNroZFinalField() { - return nroZFinalField; - } + public JTextField getNroZFinalField() { + return nroZFinalField; + } - public JLabel getErrorNroZFinal() { - return errorNroZFinal; - } + public JLabel getErrorNroZFinal() { + return errorNroZFinal; + } - public JLabel getErrorNroZInicial() { - return errorNroZInicial; - } + public JLabel getErrorNroZInicial() { + return errorNroZInicial; + } - { + { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } + $$$setupUI$$$(); + } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - createUIComponents(); - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Ingresos")); - final JScrollPane scrollPane1 = new JScrollPane(); - panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - scrollPane1.setViewportView(ingresosTable); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(3, 6, new Insets(0, 0, 0, 0), -1, -1)); - panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(150, -1), null, 0, false)); - final JLabel label1 = new JLabel(); - label1.setText("Tipo"); - panel2.add(label1, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel(); - tipoCombo.setModel(defaultComboBoxModel1); - panel2.add(tipoCombo, new GridConstraints(1, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label2 = new JLabel(); - label2.setText("Valor"); - panel2.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - valorField = new NumberFormatedTextField(); - panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JLabel label3 = new JLabel(); - label3.setText("N° Inicial"); - panel2.add(label3, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label4 = new JLabel(); - label4.setText("N° Final"); - panel2.add(label4, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - nroInicialField = new JTextField(); - panel2.add(nroInicialField, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - nroFinalField = new JTextField(); - panel2.add(nroFinalField, new GridConstraints(1, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - errorTipoIngreso = new JLabel(); - errorTipoIngreso.setForeground(new Color(-65536)); - errorTipoIngreso.setText("Label"); - errorTipoIngreso.setVisible(false); - panel2.add(errorTipoIngreso, new GridConstraints(2, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorNroInicial = new JLabel(); - errorNroInicial.setForeground(new Color(-65536)); - errorNroInicial.setText("Label"); - errorNroInicial.setVisible(false); - panel2.add(errorNroInicial, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorNroFinal = new JLabel(); - errorNroFinal.setForeground(new Color(-65536)); - errorNroFinal.setText("Label"); - errorNroFinal.setVisible(false); - panel2.add(errorNroFinal, new GridConstraints(2, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label5 = new JLabel(); - label5.setText("N° Z Inicial"); - panel2.add(label5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JLabel label6 = new JLabel(); - label6.setText("N° Z Final"); - panel2.add(label6, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - nroZInicialField = new JTextField(); - panel2.add(nroZInicialField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - nroZFinalField = new JTextField(); - panel2.add(nroZFinalField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - errorNroZInicial = new JLabel(); - errorNroZInicial.setForeground(new Color(-65536)); - errorNroZInicial.setText("Label"); - errorNroZInicial.setVisible(false); - panel2.add(errorNroZInicial, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - errorNroZFinal = new JLabel(); - errorNroZFinal.setForeground(new Color(-65536)); - errorNroZFinal.setText("Label"); - errorNroZFinal.setVisible(false); - panel2.add(errorNroZFinal, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel3 = new JPanel(); - panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); - panel1.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); - panel3.add(panel4, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final JLabel label7 = new JLabel(); - label7.setText("Total Ingresos"); - panel4.add(label7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - totalIngresoField = new NumberFormatedTextField(); - totalIngresoField.setEditable(false); - panel4.add(totalIngresoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final JPanel panel5 = new JPanel(); - panel5.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); - panel3.add(panel5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - guardarButton = new JButton(); - guardarButton.setText("Añadir"); - guardarButton.setMnemonic('A'); - guardarButton.setDisplayedMnemonicIndex(0); - panel5.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - eliminarButton = new JButton(); - eliminarButton.setText("Eliminar"); - panel5.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - editarButton = new JButton(); - editarButton.setText("Editar"); - panel5.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); - final Spacer spacer1 = new Spacer(); - panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); - } + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + createUIComponents(); + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(panel1, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + panel1.setBorder( + BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Ingresos")); + final JScrollPane scrollPane1 = new JScrollPane(); + panel1.add(scrollPane1, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, + null, null, 0, false)); + scrollPane1.setViewportView(ingresosTable); + final JPanel panel2 = new JPanel(); + panel2.setLayout(new GridLayoutManager(3, 6, new Insets(0, 0, 0, 0), -1, -1)); + panel1.add(panel2, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, + new Dimension(150, -1), null, 0, false)); + final JLabel label1 = new JLabel(); + label1.setText("Tipo"); + panel2.add(label1, + new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel(); + tipoCombo.setModel(defaultComboBoxModel1); + panel2.add(tipoCombo, new GridConstraints(1, 5, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label2 = new JLabel(); + label2.setText("Valor"); + panel2.add(label2, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + valorField = new NumberFormatedTextField(); + panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JLabel label3 = new JLabel(); + label3.setText("N° Inicial"); + panel2.add(label3, + new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label4 = new JLabel(); + label4.setText("N° Final"); + panel2.add(label4, + new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + nroInicialField = new JTextField(); + panel2.add(nroInicialField, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + nroFinalField = new JTextField(); + panel2.add(nroFinalField, new GridConstraints(1, 4, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + errorTipoIngreso = new JLabel(); + errorTipoIngreso.setForeground(new Color(-65536)); + errorTipoIngreso.setText("Label"); + errorTipoIngreso.setVisible(false); + panel2.add(errorTipoIngreso, + new GridConstraints(2, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorNroInicial = new JLabel(); + errorNroInicial.setForeground(new Color(-65536)); + errorNroInicial.setText("Label"); + errorNroInicial.setVisible(false); + panel2.add(errorNroInicial, + new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorNroFinal = new JLabel(); + errorNroFinal.setForeground(new Color(-65536)); + errorNroFinal.setText("Label"); + errorNroFinal.setVisible(false); + panel2.add(errorNroFinal, + new GridConstraints(2, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label5 = new JLabel(); + label5.setText("N° Z Inicial"); + panel2.add(label5, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JLabel label6 = new JLabel(); + label6.setText("N° Z Final"); + panel2.add(label6, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + nroZInicialField = new JTextField(); + panel2.add(nroZInicialField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + nroZFinalField = new JTextField(); + panel2.add(nroZFinalField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + errorNroZInicial = new JLabel(); + errorNroZInicial.setForeground(new Color(-65536)); + errorNroZInicial.setText("Label"); + errorNroZInicial.setVisible(false); + panel2.add(errorNroZInicial, + new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + errorNroZFinal = new JLabel(); + errorNroZFinal.setForeground(new Color(-65536)); + errorNroZFinal.setText("Label"); + errorNroZFinal.setVisible(false); + panel2.add(errorNroZFinal, + new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + final JPanel panel3 = new JPanel(); + panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); + panel1.add(panel3, + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JPanel panel4 = new JPanel(); + panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); + panel3.add(panel4, + new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + final JLabel label7 = new JLabel(); + label7.setText("Total Ingresos"); + panel4.add(label7, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, + false)); + totalIngresoField = new NumberFormatedTextField(); + totalIngresoField.setEditable(false); + panel4.add(totalIngresoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final JPanel panel5 = new JPanel(); + panel5.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); + panel3.add(panel5, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + guardarButton = new JButton(); + guardarButton.setText("Añadir"); + guardarButton.setMnemonic('A'); + guardarButton.setDisplayedMnemonicIndex(0); + panel5.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + eliminarButton = new JButton(); + eliminarButton.setText("Eliminar"); + panel5.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + editarButton = new JButton(); + editarButton.setText("Editar"); + panel5.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + final Spacer spacer1 = new Spacer(); + panel3.add(spacer1, + new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, + GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); + } - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } } diff --git a/src/danielcortes/xyz/views/MainSideBar.java b/src/danielcortes/xyz/views/MainSideBar.java index df9189c..f43b4ae 100644 --- a/src/danielcortes/xyz/views/MainSideBar.java +++ b/src/danielcortes/xyz/views/MainSideBar.java @@ -11,63 +11,76 @@ import javax.swing.JPanel; public class MainSideBar { - private JPanel contentPanel; - private JButton informesMensualesButton; - private JButton cajasButton; - private JPanel buttonPanel; + private JPanel contentPanel; + private JButton informesMensualesButton; + private JButton cajasButton; + private JPanel buttonPanel; - public JPanel getContentPanel() { - return contentPanel; - } + public JPanel getContentPanel() { + return contentPanel; + } - public JPanel getButtonPanel() { - return buttonPanel; - } + public JPanel getButtonPanel() { + return buttonPanel; + } - public JButton getInformesMensualesButton() { - return informesMensualesButton; - } + public JButton getInformesMensualesButton() { + return informesMensualesButton; + } - public JButton getCajasButton() { - return cajasButton; - } + public JButton getCajasButton() { + return cajasButton; + } - { + { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! - $$$setupUI$$$(); - } + $$$setupUI$$$(); + } - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - contentPanel = new JPanel(); - contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - buttonPanel = new JPanel(); - buttonPanel.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); - contentPanel.add(buttonPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - buttonPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null)); - cajasButton = new JButton(); - cajasButton.setText("Cajas"); - buttonPanel.add(cajasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final Spacer spacer1 = new Spacer(); - buttonPanel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); - informesMensualesButton = new JButton(); - informesMensualesButton.setText("Informes Mensuales"); - buttonPanel.add(informesMensualesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - } + /** + * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR + * call it in your code! + * + * @noinspection ALL + */ + private void $$$setupUI$$$() { + contentPanel = new JPanel(); + contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + buttonPanel = new JPanel(); + buttonPanel.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); + contentPanel.add(buttonPanel, + new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, + null, 0, false)); + buttonPanel + .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null)); + cajasButton = new JButton(); + cajasButton.setText("Cajas"); + buttonPanel.add(cajasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final Spacer spacer1 = new Spacer(); + buttonPanel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, + false)); + informesMensualesButton = new JButton(); + informesMensualesButton.setText("Informes Mensuales"); + buttonPanel.add(informesMensualesButton, + new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + } - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPanel; - } + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return contentPanel; + } }