diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1252f74..5a98dc8 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,17 +6,20 @@
-
+
+
+
-
+
+
@@ -72,90 +75,132 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -203,6 +248,7 @@
DAO
mysql
updateB
+ inputmap
2018 Daniel Cortes
@@ -222,8 +268,6 @@
@@ -327,7 +373,6 @@
-
@@ -354,10 +399,19 @@
+
+
+
+
+
+
+
+
+
@@ -371,7 +425,7 @@
-
+
@@ -539,7 +593,13 @@
-
+
+
+
+
+
+
+
1545280618093
@@ -702,11 +762,18 @@
1546215759307
-
+
+ 1546303228134
+
+
+
+ 1546303228134
+
+
-
+
@@ -721,7 +788,7 @@
-
+
@@ -751,7 +818,7 @@
-
+
@@ -831,54 +898,14 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -993,81 +1020,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1085,13 +1037,6 @@
-
-
-
-
-
-
-
@@ -1106,11 +1051,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
@@ -1121,7 +1269,6 @@
-
@@ -1138,6 +1285,7 @@
+
@@ -1147,21 +1295,26 @@
+
+
+
-
-
+
+
+
+
@@ -1182,20 +1335,33 @@
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1204,90 +1370,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/database.sqlite b/database.sqlite
index 68274fb..3996d83 100644
Binary files a/database.sqlite and b/database.sqlite differ
diff --git a/src/danielcortes/xyz/Main.java b/src/danielcortes/xyz/Main.java
index 905e6b6..fcb88d8 100644
--- a/src/danielcortes/xyz/Main.java
+++ b/src/danielcortes/xyz/Main.java
@@ -99,6 +99,7 @@ public class Main {
JFrame frame = new JFrame("Caja");
frame.setContentPane(view.getContentPanel());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
//frame.setSize(780, 450);
frame.pack();
frame.setLocationRelativeTo(null);
diff --git a/src/danielcortes/xyz/controllers/ArqueoController.java b/src/danielcortes/xyz/controllers/ArqueoController.java
index ba81644..51bb980 100644
--- a/src/danielcortes/xyz/controllers/ArqueoController.java
+++ b/src/danielcortes/xyz/controllers/ArqueoController.java
@@ -24,6 +24,7 @@
package danielcortes.xyz.controllers;
+import danielcortes.xyz.controllers.actions.NextAction;
import danielcortes.xyz.models.caja.Caja;
import danielcortes.xyz.models.documentos.Documentos;
import danielcortes.xyz.models.documentos.DocumentosDAO;
@@ -35,6 +36,7 @@ import danielcortes.xyz.views.ArqueoView;
import javax.swing.*;
import java.awt.*;
+import java.awt.event.ActionEvent;
/**
* Controlador destinado a la vista ArqueoView
@@ -191,19 +193,58 @@ public class ArqueoController {
}
/**
- * Setea los eventos de los botones de guardar
+ * Setea los eventos de los fields de la vista
*/
private void setUpViewEvents() {
- this.view.getGuardarEfectivoButton().addActionListener(e -> {
- this.normalizeEfectivoInput();
- this.hiddeEfectivoErrorMessages();
- this.guardarEfectivo();
- });
- this.view.getGuardarDocumentosButton().addActionListener(e -> {
- this.normalizeDocumentosInput();
- this.hiddeDocumentosErrorMessages();
- this.guardarDocumentos();
- });
+ this.view.getVeinteMilField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getDiezMilField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getCincoMilField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getDosMilField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getMilField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getQuinientosField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getCienField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getCincuentaField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getDiezField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"save");
+
+ this.view.getVeinteMilField().getActionMap().put("nextField", new NextAction(this.view.getDiezMilField()));
+ this.view.getDiezMilField().getActionMap().put("nextField", new NextAction(this.view.getCincoMilField()));
+ this.view.getCincoMilField().getActionMap().put("nextField", new NextAction(this.view.getDosMilField()));
+ this.view.getDosMilField().getActionMap().put("nextField", new NextAction(this.view.getMilField()));
+ this.view.getMilField().getActionMap().put("nextField", new NextAction(this.view.getQuinientosField()));
+ this.view.getQuinientosField().getActionMap().put("nextField", new NextAction(this.view.getCienField()));
+ this.view.getCienField().getActionMap().put("nextField", new NextAction(this.view.getCincuentaField()));
+ this.view.getCincuentaField().getActionMap().put("nextField", new NextAction(this.view.getDiezField()));
+ this.view.getDiezField().getActionMap().put("save", new GuardarEfectivoAction(this));
+
+
+ this.view.getChequesField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
+ this.view.getTarjetasField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"save");
+ this.view.getChequesField().getActionMap().put("nextField", new NextAction(this.view.getTarjetasField()));
+ this.view.getTarjetasField().getActionMap().put("save", new GuardarDocumentosAction(this));
+
+
+ this.view.getGuardarEfectivoButton().addActionListener(e -> guardarEfectivoActionListener());
+ this.view.getGuardarDocumentosButton().addActionListener(e -> guardarDocumentosActionListener());
+ }
+
+ /**
+ * Llama a los metodos necesarios para guardar los campos de efectivo
+ * Primero llama a normalizar el input, luego a esconder los mensajes de error, para finalmente llamar a guardar el efectivo
+ */
+ private void guardarEfectivoActionListener(){
+ this.normalizeEfectivoInput();
+ this.hiddeEfectivoErrorMessages();
+ this.guardarEfectivo();
+ }
+
+ /**
+ * Llama a los metodos necesarios para guardar los documentos
+ * Primero llama a normalizar el input, luego a esconder los mensajes de error y finalmente a guardar los documentos
+ */
+ private void guardarDocumentosActionListener(){
+ this.normalizeDocumentosInput();
+ this.hiddeDocumentosErrorMessages();
+ this.guardarDocumentos();
}
/**
@@ -408,4 +449,28 @@ public class ArqueoController {
this.view.getTarjetasField().setText(this.view.getTarjetasField().getText().trim());
}
+ private class GuardarEfectivoAction extends AbstractAction{
+ ArqueoController controller;
+ GuardarEfectivoAction(ArqueoController controller){
+ this.controller = controller;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.controller.guardarEfectivoActionListener();
+ }
+ }
+
+ private class GuardarDocumentosAction extends AbstractAction{
+ ArqueoController controller;
+ GuardarDocumentosAction(ArqueoController controller){
+ this.controller = controller;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.controller.guardarDocumentosActionListener();
+ }
+ }
+
}
diff --git a/src/danielcortes/xyz/controllers/EgresosController.java b/src/danielcortes/xyz/controllers/EgresosController.java
index aeee506..f97b86c 100644
--- a/src/danielcortes/xyz/controllers/EgresosController.java
+++ b/src/danielcortes/xyz/controllers/EgresosController.java
@@ -24,6 +24,7 @@
package danielcortes.xyz.controllers;
+import danielcortes.xyz.controllers.actions.NextAction;
import danielcortes.xyz.models.caja.Caja;
import danielcortes.xyz.models.egreso.Egreso;
import danielcortes.xyz.models.egreso.EgresoDAO;
@@ -33,10 +34,7 @@ import danielcortes.xyz.views.EgresosView;
import danielcortes.xyz.views.components.EgresosTableModel;
import javax.swing.*;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
+import java.awt.event.*;
/**
* Controlador el cual esta orientado a manejar la vista de EgresosView
@@ -123,21 +121,21 @@ public class EgresosController {
* - Cuando se selecciona una fila en la tabla se llama a updateButtonsEnabled
*/
private void setUpViewEvents() {
+ this.view.getNroField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getValorField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getDescripcionField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getTipoCombo().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "save");
+
+ this.view.getNroField().getActionMap().put("nextField", new NextAction(this.view.getDescripcionField()));
+ this.view.getDescripcionField().getActionMap().put("nextField", new NextAction(this.view.getValorField()));
+ this.view.getValorField().getActionMap().put("nextField", new NextAction(this.view.getTipoCombo()));
+ this.view.getTipoCombo().getActionMap().put("save", new GuardarAction(this));
+
this.view.getEgresosTable().getSelectionModel().addListSelectionListener(e -> updateButtonsEnabled());
this.view.getGuardarButton().addActionListener(e -> guardarActionListener());
this.view.getEliminarButton().addActionListener(e -> eliminarActionListener());
this.view.getEditarButton().addActionListener(e -> editarActionListener());
- this.view.getDescripcionField().addActionListener(e -> guardarActionListener());
- this.view.getNroField().addActionListener(e -> guardarActionListener());
- this.view.getValorField().addActionListener(e -> guardarActionListener());
- this.view.getTipoCombo().addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent e) {
- if (e.getKeyCode() == KeyEvent.VK_ENTER) {
- guardarActionListener();
- }
- }
- });
+
this.view.getEgresosTable().addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent mouseEvent) {
JTable table = (JTable) mouseEvent.getSource();
@@ -430,4 +428,16 @@ public class EgresosController {
private void resetFocus() {
this.view.getNroField().requestFocus();
}
+
+ private class GuardarAction extends AbstractAction{
+ EgresosController controller;
+ GuardarAction(EgresosController controller){
+ this.controller = controller;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.controller.guardarActionListener();
+ }
+ }
}
diff --git a/src/danielcortes/xyz/controllers/IngresosController.java b/src/danielcortes/xyz/controllers/IngresosController.java
index 439f74f..add907d 100644
--- a/src/danielcortes/xyz/controllers/IngresosController.java
+++ b/src/danielcortes/xyz/controllers/IngresosController.java
@@ -34,10 +34,7 @@ import danielcortes.xyz.views.components.IngresosTableModel;
import org.jetbrains.annotations.Contract;
import javax.swing.*;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
+import java.awt.event.*;
/**
* Controlador el cual esta orientado a manejar la vista de IngresosView
@@ -123,23 +120,21 @@ public class IngresosController {
* - Cuando se presiona el boton de editar o se hace doble click sobre una fila de la tabla se llama a editarActionListener
*/
private void setupViewEvents() {
+ this.view.getValorField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getNroInicialField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getNroFinalField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "nextField");
+ this.view.getTipoCombo().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "save");
+
+ this.view.getValorField().getActionMap().put("nextField", new NextAction(this.view.getNroInicialField()));
+ this.view.getNroInicialField().getActionMap().put("nextField", new NextAction(this.view.getNroFinalField()));
+ this.view.getNroFinalField().getActionMap().put("nextField", new NextAction(this.view.getTipoCombo()));
+ this.view.getTipoCombo().getActionMap().put("save", new GuardarAction(this));
+
this.view.getIngresosTable().getSelectionModel().addListSelectionListener(e -> updateButtonsEnabled());
this.view.getGuardarButton().addActionListener(e -> guardarActionListener());
- this.view.getValorField().addActionListener(e -> guardarActionListener());
- this.view.getNroInicialField().addActionListener(e -> guardarActionListener());
- this.view.getNroFinalField().addActionListener(e -> guardarActionListener());
this.view.getEliminarButton().addActionListener(e -> eliminarActionListener());
this.view.getEditarButton().addActionListener(e -> editarActionListener());
- this.view.getTipoCombo().addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent e) {
- if(e.getKeyCode() == KeyEvent.VK_ENTER){
- guardarActionListener();
- }
- }
- });
-
this.view.getIngresosTable().addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent mouseEvent) {
JTable table = (JTable) mouseEvent.getSource();
@@ -431,6 +426,31 @@ public class IngresosController {
* Le pide focus al tipo combo
*/
private void resetFocus(){
- this.view.getTipoCombo().requestFocus();
+ this.view.getValorField().requestFocus();
+ }
+
+ private class NextAction extends AbstractAction{
+ JComponent next;
+
+ NextAction(JComponent next){
+ this.next = next;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.next.requestFocus();
+ }
+ }
+
+ private class GuardarAction extends AbstractAction{
+ IngresosController controller;
+ GuardarAction(IngresosController controller){
+ this.controller = controller;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.controller.guardarActionListener();
+ }
}
}
diff --git a/src/danielcortes/xyz/controllers/actions/NextAction.java b/src/danielcortes/xyz/controllers/actions/NextAction.java
new file mode 100644
index 0000000..cd76ea8
--- /dev/null
+++ b/src/danielcortes/xyz/controllers/actions/NextAction.java
@@ -0,0 +1,41 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2018 Daniel Cortes
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package danielcortes.xyz.controllers.actions;
+
+import javax.swing.*;
+import java.awt.event.ActionEvent;
+
+public class NextAction extends AbstractAction {
+ private JComponent next;
+
+ public NextAction(JComponent next){
+ this.next = next;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ this.next.requestFocus();
+ }
+}
diff --git a/src/danielcortes/xyz/views/ManagerView.form b/src/danielcortes/xyz/views/ManagerView.form
index b19ef8c..099a22b 100644
--- a/src/danielcortes/xyz/views/ManagerView.form
+++ b/src/danielcortes/xyz/views/ManagerView.form
@@ -16,17 +16,17 @@
-
+
-
+
-
+
@@ -36,7 +36,7 @@
-
+
@@ -46,7 +46,7 @@
-
+
@@ -60,6 +60,11 @@
+
+
+
+
+
diff --git a/src/danielcortes/xyz/views/ManagerView.java b/src/danielcortes/xyz/views/ManagerView.java
index 084518f..cb10b41 100644
--- a/src/danielcortes/xyz/views/ManagerView.java
+++ b/src/danielcortes/xyz/views/ManagerView.java
@@ -27,6 +27,7 @@ package danielcortes.xyz.views;
import com.github.lgooddatepicker.components.DatePicker;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
+import com.intellij.uiDesigner.core.Spacer;
import javax.swing.*;
import java.awt.*;
@@ -85,25 +86,27 @@ public class ManagerView {
cardPanel.setLayout(new CardLayout(0, 0));
contentPanel.add(cardPanel, 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));
controlsPanel = new JPanel();
- controlsPanel.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
- contentPanel.add(controlsPanel, 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));
+ controlsPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));
+ contentPanel.add(controlsPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
egresosButton = new JToggleButton();
egresosButton.setText("Egresos");
egresosButton.setMnemonic('E');
egresosButton.setDisplayedMnemonicIndex(0);
- controlsPanel.add(egresosButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
+ controlsPanel.add(egresosButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
ingresosButton = new JToggleButton();
ingresosButton.setText("Ingresos");
ingresosButton.setMnemonic('I');
ingresosButton.setDisplayedMnemonicIndex(0);
- controlsPanel.add(ingresosButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
+ controlsPanel.add(ingresosButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
arqueoButton = new JToggleButton();
arqueoButton.setText("Arqueo");
arqueoButton.setMnemonic('A');
arqueoButton.setDisplayedMnemonicIndex(0);
- controlsPanel.add(arqueoButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
+ controlsPanel.add(arqueoButton, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
datePicker = new DatePicker();
controlsPanel.add(datePicker, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
+ final Spacer spacer1 = new Spacer();
+ controlsPanel.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
ButtonGroup buttonGroup;
buttonGroup = new ButtonGroup();
buttonGroup.add(egresosButton);
@@ -117,4 +120,5 @@ public class ManagerView {
public JComponent $$$getRootComponent$$$() {
return contentPanel;
}
+
}