Se sube ventana principal practicamente completa
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/visual/Prueba.class
Normal file
BIN
bin/visual/Prueba.class
Normal file
Binary file not shown.
@@ -1,9 +1,7 @@
|
|||||||
package utiles;
|
package utiles;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.time.YearMonth;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
public class ControlPrincipal
|
public class ControlPrincipal
|
||||||
{
|
{
|
||||||
@@ -68,7 +66,7 @@ public class ControlPrincipal
|
|||||||
String[] aux = arch[x].split(";");
|
String[] aux = arch[x].split(";");
|
||||||
if (arch[x].length() > 1)
|
if (arch[x].length() > 1)
|
||||||
{
|
{
|
||||||
saldo = saldoAnterior + Integer.parseInt(aux[aux.length - 3]) - Integer.parseInt(aux[aux.length - 2]);
|
saldo = saldoAnterior + Integer.parseInt(aux[5]) - Integer.parseInt(aux[6]);
|
||||||
}
|
}
|
||||||
for (int z = 0; z < aux.length - 1; z++)
|
for (int z = 0; z < aux.length - 1; z++)
|
||||||
{
|
{
|
||||||
@@ -99,6 +97,9 @@ public class ControlPrincipal
|
|||||||
return (archivo.leerArchivo().length() > 1);
|
return (archivo.leerArchivo().length() > 1);
|
||||||
}
|
}
|
||||||
public String[][] resumenMes()
|
public String[][] resumenMes()
|
||||||
|
{
|
||||||
|
String[][] fin = new String[4][1];
|
||||||
|
if (archivo.leerArchivo().length() > 5)
|
||||||
{
|
{
|
||||||
String[] arch = archivo.entregarProcesado();
|
String[] arch = archivo.entregarProcesado();
|
||||||
ArrayList<String> fechas = new ArrayList<String>();
|
ArrayList<String> fechas = new ArrayList<String>();
|
||||||
@@ -106,7 +107,7 @@ public class ControlPrincipal
|
|||||||
ArrayList<String> egrs = new ArrayList<String>();
|
ArrayList<String> egrs = new ArrayList<String>();
|
||||||
for (int x = 0; x < arch.length; x++)
|
for (int x = 0; x < arch.length; x++)
|
||||||
{
|
{
|
||||||
String fecha = arch[x].split(";")[1];
|
String fecha = arch[x].split(";")[1].split("/")[2] + "-" + arch[x].split(";")[1].split("/")[1];
|
||||||
if (!fechas.contains(fecha))
|
if (!fechas.contains(fecha))
|
||||||
{
|
{
|
||||||
fechas.add(fecha);
|
fechas.add(fecha);
|
||||||
@@ -116,67 +117,86 @@ public class ControlPrincipal
|
|||||||
}
|
}
|
||||||
for (int x = 0; x < arch.length; x++)
|
for (int x = 0; x < arch.length; x++)
|
||||||
{
|
{
|
||||||
String fecha = arch[x].split(";")[1];
|
String fecha = arch[x].split(";")[1].split("/")[2] + "-" + arch[x].split(";")[1].split("/")[1];
|
||||||
String ing = arch[x].split(";")[5];
|
String ing = arch[x].split(";")[5];
|
||||||
String egr = arch[x].split(";")[6];
|
String egr = arch[x].split(";")[6];
|
||||||
int index = fechas.indexOf(fecha);
|
int index = fechas.indexOf(fecha);
|
||||||
ings.set(index, String.valueOf(Integer.parseInt(ings.get(index)) + Integer.parseInt(ing)));
|
ings.set(index, String.valueOf(Integer.parseInt(ings.get(index)) + Integer.parseInt(ing)));
|
||||||
egrs.set(index, String.valueOf(Integer.parseInt(egrs.get(index)) + Integer.parseInt(egr)));
|
egrs.set(index, String.valueOf(Integer.parseInt(egrs.get(index)) + Integer.parseInt(egr)));
|
||||||
|
|
||||||
}
|
}
|
||||||
String[][] fin = new String[4][fechas.size()];
|
fin = new String[4][fechas.size()];
|
||||||
for (int x = 0; x < fechas.size(); x++)
|
for (int x = 0; x < fechas.size(); x++)
|
||||||
{
|
{
|
||||||
fin[0][x] = fechas.get(x);
|
fin[0][x] = fechas.get(x);
|
||||||
fin[1][x] = String.valueOf(Integer.parseInt(ings.get(x)) - Integer.parseInt(egrs.get(x)));
|
fin[1][x] = String.valueOf(Integer.parseInt(ings.get(x)) - Integer.parseInt(egrs.get(x)));
|
||||||
fin[2][x] = ings.get(x);
|
fin[2][x] = ings.get(x);
|
||||||
|
fin[3][x] = egrs.get(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
fin = ordenarSaldos(fin);
|
fin = ordenarSaldos(fin);
|
||||||
|
}
|
||||||
return fin;
|
return fin;
|
||||||
}
|
}
|
||||||
public String[][] ordenarSaldos(String[][] saldos)
|
public String[][] ordenarSaldos(String[][] saldos)
|
||||||
{
|
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
boolean swapped = true;
|
boolean swapped = true;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
String tmp;
|
String tmp;
|
||||||
String tmp1;
|
String tmp1;
|
||||||
|
String tmp2;
|
||||||
|
String tmp3;
|
||||||
while (swapped)
|
while (swapped)
|
||||||
{
|
{
|
||||||
swapped = false;
|
swapped = false;
|
||||||
j++;
|
j++;
|
||||||
for (int i = 0; i < saldos[0].length - j; i++)
|
for (int i = 0; i < saldos[0].length - j; i++)
|
||||||
{
|
{
|
||||||
if (formatter.parse(saldos[0][i]).after(formatter.parse(saldos[0][i+1])))
|
YearMonth f1 = YearMonth.parse(saldos[0][i]);
|
||||||
|
YearMonth f2 = YearMonth.parse(saldos[0][i + 1]);
|
||||||
|
if (f1.isAfter(f2))
|
||||||
{
|
{
|
||||||
tmp = saldos[0][i];
|
tmp = saldos[0][i];
|
||||||
tmp1 = saldos[1][i];
|
tmp1 = saldos[1][i];
|
||||||
|
tmp2 = saldos[2][i];
|
||||||
|
tmp3 = saldos[3][i];
|
||||||
saldos[0][i] = saldos[0][i + 1];
|
saldos[0][i] = saldos[0][i + 1];
|
||||||
saldos[1][i] = saldos[1][i + 1];
|
saldos[1][i] = saldos[1][i + 1];
|
||||||
|
saldos[2][i] = saldos[2][i + 1];
|
||||||
|
saldos[3][i] = saldos[3][i + 1];
|
||||||
saldos[0][i + 1] = tmp;
|
saldos[0][i + 1] = tmp;
|
||||||
saldos[1][i + 1] = tmp1;
|
saldos[1][i + 1] = tmp1;
|
||||||
|
saldos[2][i + 1] = tmp2;
|
||||||
|
saldos[3][i + 1] = tmp3;
|
||||||
swapped = true;
|
swapped = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ParseException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return saldos;
|
return saldos;
|
||||||
}
|
}
|
||||||
public void prueba()
|
public int[] resumenDoc()
|
||||||
{
|
{
|
||||||
String[][] prueba = resumenMes();
|
String[] arch = archivo.entregarProcesado();
|
||||||
for(int x = 0; x < prueba[0].length; x++)
|
int[] docs = { 0, 0, 0};
|
||||||
|
if (archivo.leerArchivo().length() > 5)
|
||||||
{
|
{
|
||||||
System.out.println(prueba[0][x]+" "+prueba[1][x]);
|
for (int x = 0; x < arch.length; x++)
|
||||||
|
{
|
||||||
|
String[] aux = arch[x].split(";");
|
||||||
|
switch(aux[2])
|
||||||
|
{
|
||||||
|
case "Efectivo":
|
||||||
|
docs[0] += Integer.parseInt(aux[5])-Integer.parseInt(aux[6]);
|
||||||
|
break;
|
||||||
|
case "Transferencia":
|
||||||
|
docs[1] += Integer.parseInt(aux[5])-Integer.parseInt(aux[6]);
|
||||||
|
break;
|
||||||
|
case "Credito":
|
||||||
|
docs[2] += Integer.parseInt(aux[5])-Integer.parseInt(aux[6]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
public void getRuta()
|
public void getRuta()
|
||||||
{
|
{
|
||||||
String os = System.getProperty("os.name");
|
String os = System.getProperty("os.name");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package visual;
|
package visual;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
import java.awt.CardLayout;
|
import java.awt.CardLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@@ -9,7 +10,6 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import javax.swing.DefaultComboBoxModel;
|
import javax.swing.DefaultComboBoxModel;
|
||||||
import javax.swing.GroupLayout;
|
import javax.swing.GroupLayout;
|
||||||
@@ -28,9 +28,15 @@ import javax.swing.WindowConstants;
|
|||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
|
||||||
import org.jdesktop.swingx.JXDatePicker;
|
import org.jdesktop.swingx.JXDatePicker;
|
||||||
|
import org.jfree.chart.ChartFactory;
|
||||||
|
import org.jfree.chart.ChartPanel;
|
||||||
|
import org.jfree.chart.JFreeChart;
|
||||||
|
import org.jfree.chart.plot.PlotOrientation;
|
||||||
|
import org.jfree.data.category.DefaultCategoryDataset;
|
||||||
import utiles.*;
|
import utiles.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Principal
|
public class Principal
|
||||||
{
|
{
|
||||||
private JFrame principal;
|
private JFrame principal;
|
||||||
@@ -57,8 +63,8 @@ public class Principal
|
|||||||
private JTextField fNumber;
|
private JTextField fNumber;
|
||||||
private JTextField fUsuario;
|
private JTextField fUsuario;
|
||||||
private JPanel graph;
|
private JPanel graph;
|
||||||
private JPanel graphDoc;
|
private ChartPanel graphDoc;
|
||||||
private JPanel graphMes;
|
private ChartPanel graphMes;
|
||||||
private JTextField iM1;
|
private JTextField iM1;
|
||||||
private JTextField iM2;
|
private JTextField iM2;
|
||||||
private JTextField iM3;
|
private JTextField iM3;
|
||||||
@@ -110,7 +116,8 @@ public class Principal
|
|||||||
private JXDatePicker jXDatePicker1;
|
private JXDatePicker jXDatePicker1;
|
||||||
private JXDatePicker jXDatePicker2;
|
private JXDatePicker jXDatePicker2;
|
||||||
private String usuario;
|
private String usuario;
|
||||||
|
private DefaultCategoryDataset dataSetMes;
|
||||||
|
private DefaultCategoryDataset dataSetDoc;
|
||||||
public Principal(String usuario)
|
public Principal(String usuario)
|
||||||
{
|
{
|
||||||
this.usuario = usuario;
|
this.usuario = usuario;
|
||||||
@@ -153,8 +160,6 @@ public class Principal
|
|||||||
fNumber = new JTextField();
|
fNumber = new JTextField();
|
||||||
panelResumen = new JPanel();
|
panelResumen = new JPanel();
|
||||||
graph = new JPanel();
|
graph = new JPanel();
|
||||||
graphMes = new JPanel();
|
|
||||||
graphDoc = new JPanel();
|
|
||||||
tipoGraph = new JComboBox<>();
|
tipoGraph = new JComboBox<>();
|
||||||
jLabel1 = new JLabel();
|
jLabel1 = new JLabel();
|
||||||
lMes1 = new JLabel();
|
lMes1 = new JLabel();
|
||||||
@@ -420,25 +425,15 @@ public class Principal
|
|||||||
.addComponent(eliminar)))
|
.addComponent(eliminar)))
|
||||||
.addGap(29, 29, 29)));
|
.addGap(29, 29, 29)));
|
||||||
panel.add(panelCartola, "card2");
|
panel.add(panelCartola, "card2");
|
||||||
|
graphMes = crearGraphMes();
|
||||||
|
graphDoc = crearGraphDoc();
|
||||||
panelResumen.setBackground(new Color(21, 21, 21));
|
panelResumen.setBackground(new Color(21, 21, 21));
|
||||||
panelResumen.setForeground(new Color(255, 255, 255));
|
panelResumen.setForeground(new Color(255, 255, 255));
|
||||||
graph.setBackground(new Color(153, 153, 153));
|
graph.setBackground(new Color(153, 153, 153));
|
||||||
graph.setLayout(new CardLayout());
|
graph.setLayout(new CardLayout());
|
||||||
graphMes.setBackground(new Color(0, 0, 0));
|
|
||||||
GroupLayout graphMesLayout = new GroupLayout(graphMes);
|
|
||||||
graphMes.setLayout(graphMesLayout);
|
|
||||||
graphMesLayout.setHorizontalGroup(
|
|
||||||
graphMesLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGap(0, 719, Short.MAX_VALUE));
|
|
||||||
graphMesLayout.setVerticalGroup(
|
|
||||||
graphMesLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGap(0, 449, Short.MAX_VALUE));
|
|
||||||
graph.add(graphMes, "Mes");
|
graph.add(graphMes, "Mes");
|
||||||
graphDoc.setBackground(new Color(255, 255, 255));
|
graphDoc.setBackground(new Color(255, 255, 255));
|
||||||
GroupLayout graphDocLayout = new GroupLayout(graphDoc);
|
graphDoc.setLayout(new BorderLayout());
|
||||||
graphDoc.setLayout(graphDocLayout);
|
|
||||||
graphDocLayout.setHorizontalGroup(
|
|
||||||
graphDocLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGap(0, 719, Short.MAX_VALUE));
|
|
||||||
graphDocLayout.setVerticalGroup(
|
|
||||||
graphDocLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGap(0, 449, Short.MAX_VALUE));
|
|
||||||
graph.add(graphDoc, "Documento");
|
graph.add(graphDoc, "Documento");
|
||||||
tipoGraph.setFont(new Font("Eras Light ITC", 0, 14)); // NOI18N
|
tipoGraph.setFont(new Font("Eras Light ITC", 0, 14)); // NOI18N
|
||||||
tipoGraph.setModel(new DefaultComboBoxModel<>(new String[] { "Mes", "Documento" }));
|
tipoGraph.setModel(new DefaultComboBoxModel<>(new String[] { "Mes", "Documento" }));
|
||||||
@@ -503,224 +498,278 @@ public class Principal
|
|||||||
GroupLayout panelResumenLayout = new GroupLayout(panelResumen);
|
GroupLayout panelResumenLayout = new GroupLayout(panelResumen);
|
||||||
panelResumen.setLayout(panelResumenLayout);
|
panelResumen.setLayout(panelResumenLayout);
|
||||||
panelResumenLayout
|
panelResumenLayout
|
||||||
.setHorizontalGroup(
|
.setHorizontalGroup(panelResumenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
panelResumenLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelResumenLayout.createSequentialGroup()
|
||||||
.addGroup(GroupLayout.Alignment.TRAILING, panelResumenLayout.createSequentialGroup()
|
.addContainerGap().addGroup(panelResumenLayout
|
||||||
.addContainerGap().addGroup(panelResumenLayout.createParallelGroup(
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
|
||||||
GroupLayout.Alignment.LEADING)
|
lIng2, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(lIng2,
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
|
||||||
GroupLayout.Alignment.TRAILING)
|
|
||||||
.addGroup(GroupLayout.Alignment.TRAILING,
|
|
||||||
panelResumenLayout
|
panelResumenLayout
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(lSaldo2).addComponent(lEgr2)))
|
.addComponent(lSaldo2).addComponent(lEgr2)))
|
||||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24,
|
||||||
.addGroup(panelResumenLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
|
Short.MAX_VALUE)
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup().addGap(19, 19, 19)
|
|
||||||
.addComponent(lMes1).addGap(43, 43, 43).addComponent(lMes2)
|
|
||||||
.addGap(49, 49, 49).addComponent(lMes3).addGap(40, 40, 40)
|
|
||||||
.addComponent(lMes4).addGap(44, 44, 44).addComponent(lMes5)
|
|
||||||
.addGap(43, 43, 43).addComponent(lMes6))
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(sM1, GroupLayout.PREFERRED_SIZE, 63,
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(eM1, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(iM1, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addGroup(panelResumenLayout
|
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
|
||||||
.addComponent(sM2, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(eM2, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(iM2, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addGroup(panelResumenLayout
|
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
|
||||||
.addComponent(sM3, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(eM3, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(iM3, GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addGroup(panelResumenLayout
|
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
|
||||||
.addComponent(sM4, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addComponent(sM5, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18).addComponent(sM6,
|
|
||||||
GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
|
||||||
.addComponent(eM4, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addComponent(eM5, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18).addComponent(eM6,
|
|
||||||
GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
|
||||||
.addComponent(iM4, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addComponent(iM5, GroupLayout.PREFERRED_SIZE,
|
|
||||||
63, GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(18, 18, 18).addComponent(iM6,
|
|
||||||
GroupLayout.PREFERRED_SIZE, 63,
|
|
||||||
GroupLayout.PREFERRED_SIZE))))
|
|
||||||
.addGroup(GroupLayout.Alignment.TRAILING,
|
|
||||||
panelResumenLayout.createSequentialGroup()
|
panelResumenLayout.createSequentialGroup()
|
||||||
.addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 310,
|
.addComponent(
|
||||||
GroupLayout.PREFERRED_SIZE)
|
jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 310,
|
||||||
.addGap(81, 81, 81)))
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(35, 35, 35)
|
.addGap(116, 116, 116))
|
||||||
.addGroup(panelResumenLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
.addGroup(panelResumenLayout.createSequentialGroup()
|
||||||
.addComponent(jLabel1).addGap(4, 4, 4).addComponent(tipoGraph,
|
.addGroup(panelResumenLayout
|
||||||
GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
GroupLayout.PREFERRED_SIZE))
|
.addComponent(sM1, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
.addComponent(graph, GroupLayout.PREFERRED_SIZE, 719,
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
GroupLayout.PREFERRED_SIZE))
|
.addComponent(eM1, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(iM1, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lMes1))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(lMes2)
|
||||||
|
.addComponent(sM2, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(eM2, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(iM2, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(lMes3)
|
||||||
|
.addGroup(panelResumenLayout.createSequentialGroup()
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(sM3,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(eM3,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(iM3,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createSequentialGroup()
|
||||||
|
.addComponent(sM4,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(sM5,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(18, 18, 18).addComponent(sM6,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createSequentialGroup()
|
||||||
|
.addComponent(eM4,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(eM5,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(18, 18, 18).addComponent(eM6,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createSequentialGroup()
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(iM4,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lMes4))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(iM5,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lMes5))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(lMes6)
|
||||||
|
.addComponent(iM6,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
63,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))))))
|
||||||
|
.addGap(35, 35, 35)))
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(panelResumenLayout.createSequentialGroup().addComponent(jLabel1)
|
||||||
|
.addGap(4, 4, 4)
|
||||||
|
.addComponent(tipoGraph, javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addComponent(graph, javax.swing.GroupLayout.PREFERRED_SIZE, 719,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addGap(6, 6, 6)));
|
.addGap(6, 6, 6)));
|
||||||
panelResumenLayout
|
panelResumenLayout
|
||||||
.setVerticalGroup(
|
.setVerticalGroup(
|
||||||
panelResumenLayout
|
panelResumenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.createParallelGroup(
|
|
||||||
GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(
|
.addGroup(
|
||||||
panelResumenLayout.createSequentialGroup().addGroup(panelResumenLayout
|
panelResumenLayout
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(graph,
|
.createSequentialGroup().addGroup(panelResumenLayout
|
||||||
GroupLayout.PREFERRED_SIZE, 449,
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
GroupLayout.PREFERRED_SIZE)
|
.addComponent(graph, javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup().addGap(50, 50, 50)
|
449, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 52,
|
.addGroup(panelResumenLayout.createSequentialGroup().addGap(50,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
50, 50)
|
||||||
|
.addComponent(jLabel2,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE, 52,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(40, 40, 40)
|
.addGap(40, 40, 40)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(GroupLayout.Alignment.BASELINE)
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(lMes1).addComponent(lMes2)
|
.addComponent(lMes1).addComponent(lMes2)
|
||||||
.addComponent(lMes3).addComponent(lMes4)
|
.addComponent(lMes3).addComponent(lMes4)
|
||||||
.addComponent(lMes5).addComponent(lMes6))
|
.addComponent(lMes5).addComponent(lMes6))
|
||||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(
|
||||||
.addGroup(panelResumenLayout
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.createParallelGroup(GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(
|
.createParallelGroup(
|
||||||
GroupLayout.Alignment.BASELINE)
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createSequentialGroup()
|
||||||
|
.addGroup(panelResumenLayout
|
||||||
|
.createParallelGroup(
|
||||||
|
javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(iM1,
|
.addComponent(iM1,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(iM2,
|
.addComponent(iM2,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(iM4,
|
.addComponent(iM4,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(iM5,
|
.addComponent(iM5,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(iM6,
|
.addComponent(iM6,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE))
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addPreferredGap(
|
.addPreferredGap(
|
||||||
LayoutStyle.ComponentPlacement.RELATED)
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(
|
.createParallelGroup(
|
||||||
GroupLayout.Alignment.BASELINE)
|
javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(eM1,
|
.addComponent(eM1,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(eM2,
|
.addComponent(eM2,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(eM4,
|
.addComponent(eM4,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(eM5,
|
.addComponent(eM5,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(eM6,
|
.addComponent(eM6,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE))
|
javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addPreferredGap(
|
.addPreferredGap(
|
||||||
LayoutStyle.ComponentPlacement.RELATED)
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(
|
.createParallelGroup(
|
||||||
GroupLayout.Alignment.BASELINE)
|
javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(sM1,
|
.addComponent(sM1,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(sM2,
|
.addComponent(sM2,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(sM4,
|
.addComponent(sM4,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(sM5,
|
.addComponent(sM5,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(sM6,
|
.addComponent(sM6,
|
||||||
GroupLayout.PREFERRED_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)))
|
javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
.addGroup(panelResumenLayout
|
||||||
|
.createSequentialGroup()
|
||||||
.addComponent(lIng2)
|
.addComponent(lIng2)
|
||||||
.addPreferredGap(
|
.addPreferredGap(
|
||||||
LayoutStyle.ComponentPlacement.RELATED)
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(
|
.createParallelGroup(
|
||||||
GroupLayout.Alignment.LEADING)
|
javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createSequentialGroup()
|
.createSequentialGroup()
|
||||||
.addGap(26, 26, 26)
|
.addGap(26, 26, 26)
|
||||||
.addComponent(lSaldo2))
|
.addComponent(lSaldo2))
|
||||||
.addComponent(lEgr2)))
|
.addComponent(lEgr2)))
|
||||||
.addGroup(panelResumenLayout.createSequentialGroup()
|
.addGroup(panelResumenLayout
|
||||||
.addComponent(iM3, GroupLayout.PREFERRED_SIZE,
|
.createSequentialGroup()
|
||||||
GroupLayout.DEFAULT_SIZE,
|
.addComponent(iM3,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(
|
.addPreferredGap(
|
||||||
LayoutStyle.ComponentPlacement.RELATED)
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(eM3, GroupLayout.PREFERRED_SIZE,
|
.addComponent(eM3,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(
|
.addPreferredGap(
|
||||||
LayoutStyle.ComponentPlacement.RELATED)
|
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(sM3, GroupLayout.PREFERRED_SIZE,
|
.addComponent(sM3,
|
||||||
GroupLayout.DEFAULT_SIZE,
|
javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.PREFERRED_SIZE)))))
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||||
.addGap(43, 43, 43)
|
.addGap(43, 43, 43)
|
||||||
.addGroup(panelResumenLayout
|
.addGroup(panelResumenLayout
|
||||||
.createParallelGroup(GroupLayout.Alignment.BASELINE)
|
.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(tipoGraph, GroupLayout.PREFERRED_SIZE,
|
.addComponent(tipoGraph, javax.swing.GroupLayout.PREFERRED_SIZE,
|
||||||
GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
|
javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jLabel1))
|
.addComponent(jLabel1))
|
||||||
.addGap(0, 41, Short.MAX_VALUE)));
|
.addGap(0, 65, Short.MAX_VALUE)));
|
||||||
panel.add(panelResumen, "card3");
|
panel.add(panelResumen, "card3");
|
||||||
panelPrincipal.setBackground(new Color(21, 21, 21));
|
panelPrincipal.setBackground(new Color(21, 21, 21));
|
||||||
pam.setFont(new Font("LM Roman Caps 10", 1, 60)); // NOI18N
|
pam.setFont(new Font("LM Roman Caps 10", 1, 60)); // NOI18N
|
||||||
@@ -829,6 +878,9 @@ public class Principal
|
|||||||
}
|
}
|
||||||
private void resumenActionPerformed(ActionEvent evt)
|
private void resumenActionPerformed(ActionEvent evt)
|
||||||
{
|
{
|
||||||
|
actualizarGraphMes();
|
||||||
|
actualizarGraphDoc();
|
||||||
|
llenarResumen();
|
||||||
CardLayout cardLayout = (CardLayout) panel.getLayout();
|
CardLayout cardLayout = (CardLayout) panel.getLayout();
|
||||||
cardLayout.show(panel, "card3");
|
cardLayout.show(panel, "card3");
|
||||||
}
|
}
|
||||||
@@ -855,14 +907,12 @@ public class Principal
|
|||||||
{
|
{
|
||||||
CardLayout cardLayout = (CardLayout) graph.getLayout();
|
CardLayout cardLayout = (CardLayout) graph.getLayout();
|
||||||
cardLayout.show(graph, (String) tipoGraph.getSelectedItem());
|
cardLayout.show(graph, (String) tipoGraph.getSelectedItem());
|
||||||
crearGraph();
|
|
||||||
}
|
}
|
||||||
private void añadirFila()
|
private void añadirFila()
|
||||||
{
|
{
|
||||||
ControlPrincipal control = new ControlPrincipal(usuario);
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
|
SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
String fecha = formateador.format(jXDatePicker1.getDate());
|
String fecha = formateador.format(jXDatePicker1.getDate());
|
||||||
jXDatePicker1.setDate(new Date());
|
|
||||||
String documento = this.documento.getSelectedItem().toString();
|
String documento = this.documento.getSelectedItem().toString();
|
||||||
String fD = fFD.getText();
|
String fD = fFD.getText();
|
||||||
fFD.setText("");
|
fFD.setText("");
|
||||||
@@ -909,10 +959,142 @@ public class Principal
|
|||||||
control.modificarFila(number, fecha, documento, fD, desc, ing, egr);
|
control.modificarFila(number, fecha, documento, fD, desc, ing, egr);
|
||||||
iniciarTabla();
|
iniciarTabla();
|
||||||
}
|
}
|
||||||
private void crearGraph()
|
private void llenarResumen()
|
||||||
{
|
{
|
||||||
ControlPrincipal control = new ControlPrincipal(usuario);
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
control.prueba();
|
String[][] resumen = control.resumenMes();
|
||||||
|
ArrayList<JLabel> lMeses = new ArrayList<JLabel>();
|
||||||
|
ArrayList<JTextField> fIngresos = new ArrayList<JTextField>();
|
||||||
|
ArrayList<JTextField> fEgresos = new ArrayList<JTextField>();
|
||||||
|
ArrayList<JTextField> fSaldo = new ArrayList<JTextField>();
|
||||||
|
lMeses.add(lMes1);
|
||||||
|
lMeses.add(lMes2);
|
||||||
|
lMeses.add(lMes3);
|
||||||
|
lMeses.add(lMes4);
|
||||||
|
lMeses.add(lMes5);
|
||||||
|
lMeses.add(lMes6);
|
||||||
|
fIngresos.add(iM1);
|
||||||
|
fIngresos.add(iM2);
|
||||||
|
fIngresos.add(iM3);
|
||||||
|
fIngresos.add(iM4);
|
||||||
|
fIngresos.add(iM5);
|
||||||
|
fIngresos.add(iM6);
|
||||||
|
fEgresos.add(eM1);
|
||||||
|
fEgresos.add(eM2);
|
||||||
|
fEgresos.add(eM3);
|
||||||
|
fEgresos.add(eM4);
|
||||||
|
fEgresos.add(eM5);
|
||||||
|
fEgresos.add(eM6);
|
||||||
|
fSaldo.add(sM1);
|
||||||
|
fSaldo.add(sM2);
|
||||||
|
fSaldo.add(sM3);
|
||||||
|
fSaldo.add(sM4);
|
||||||
|
fSaldo.add(sM5);
|
||||||
|
fSaldo.add(sM6);
|
||||||
|
if (resumen[0][0] != null)
|
||||||
|
{
|
||||||
|
for (int x = resumen[0].length - 1, z = lMeses.size() - 1; x > resumen[0].length - 7; x--, z--)
|
||||||
|
{
|
||||||
|
fIngresos.get(z).setText(resumen[2][x]);
|
||||||
|
fEgresos.get(z).setText(resumen[3][x]);
|
||||||
|
fSaldo.get(z).setText(resumen[1][x]);
|
||||||
|
if (resumen[0][x].matches("[0-9]{4}-01"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Enero");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-02"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Febrero");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-03"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Marzo");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-04"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Abril");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-05"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Mayo");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-06"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Junio");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-07"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Julio");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-08"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Agosto");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-09"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Septiembre");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-10"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Octubre");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-11"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Noviembre");
|
||||||
|
} else if (resumen[0][x].matches("[0-9]{4}-12"))
|
||||||
|
{
|
||||||
|
lMeses.get(z).setText("Diciembre");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private ChartPanel crearGraphMes()
|
||||||
|
{
|
||||||
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
|
String[][] resumen = control.resumenMes();
|
||||||
|
dataSetMes = new DefaultCategoryDataset();
|
||||||
|
if (resumen[0][0] != null)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < resumen[0].length; x++)
|
||||||
|
{
|
||||||
|
dataSetMes.setValue(Integer.parseInt(resumen[1][x]), "Saldo", resumen[0][x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JFreeChart chart = ChartFactory.createBarChart("Resumen Mensual", "Mes", "Saldo", dataSetMes,
|
||||||
|
PlotOrientation.VERTICAL, false, true, false);
|
||||||
|
chart.getPlot().setBackgroundPaint(new Color(0, 204, 204));
|
||||||
|
chart.getCategoryPlot().getRenderer().setSeriesPaint(0, new Color(21, 21, 21));
|
||||||
|
chart.setBackgroundPaint(new Color(0, 204, 204));
|
||||||
|
ChartPanel graph = new ChartPanel(chart);
|
||||||
|
return graph;
|
||||||
|
}
|
||||||
|
private ChartPanel crearGraphDoc()
|
||||||
|
{
|
||||||
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
|
int[] resumen = control.resumenDoc();
|
||||||
|
dataSetDoc = new DefaultCategoryDataset();
|
||||||
|
dataSetDoc.setValue(resumen[0], "Saldo", "Efectivo");
|
||||||
|
dataSetDoc.setValue(resumen[1], "Saldo", "Transferencia");
|
||||||
|
dataSetDoc.setValue(resumen[2], "Saldo", "Credito");
|
||||||
|
JFreeChart chart = ChartFactory.createBarChart("Resumen por Documentos", "Documento", "Saldo", dataSetDoc,
|
||||||
|
PlotOrientation.VERTICAL, false, true, false);
|
||||||
|
chart.getPlot().setBackgroundPaint(new Color(0, 204, 204));
|
||||||
|
chart.getCategoryPlot().getRenderer().setSeriesPaint(0, new Color(21, 21, 21));
|
||||||
|
chart.setBackgroundPaint(new Color(0, 204, 204));
|
||||||
|
ChartPanel graph = new ChartPanel(chart);
|
||||||
|
return graph;
|
||||||
|
}
|
||||||
|
private void actualizarGraphMes()
|
||||||
|
{
|
||||||
|
dataSetMes.clear();
|
||||||
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
|
String[][] resumen = control.resumenMes();
|
||||||
|
if (resumen[0][0] != null)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < resumen[0].length; x++)
|
||||||
|
{
|
||||||
|
dataSetMes.setValue(Integer.parseInt(resumen[1][x]), "Saldo", resumen[0][x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void actualizarGraphDoc()
|
||||||
|
{
|
||||||
|
ControlPrincipal control = new ControlPrincipal(usuario);
|
||||||
|
dataSetDoc.clear();
|
||||||
|
int[] resumen = control.resumenDoc();
|
||||||
|
dataSetDoc.setValue(resumen[0], "Saldo", "Efectivo");
|
||||||
|
dataSetDoc.setValue(resumen[1], "Saldo", "Transferencia");
|
||||||
|
dataSetDoc.setValue(resumen[2], "Saldo", "Credito");
|
||||||
}
|
}
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
39
src/visual/Prueba.java
Normal file
39
src/visual/Prueba.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package visual;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.time.YearMonth;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
import org.jfree.chart.ChartFactory;
|
||||||
|
import org.jfree.chart.ChartPanel;
|
||||||
|
import org.jfree.chart.JFreeChart;
|
||||||
|
import org.jfree.chart.plot.PlotOrientation;
|
||||||
|
import org.jfree.data.category.DefaultCategoryDataset;
|
||||||
|
import org.jfree.data.time.Day;
|
||||||
|
import org.jfree.data.time.TimeSeries;
|
||||||
|
import org.jfree.data.time.TimeSeriesCollection;
|
||||||
|
|
||||||
|
public class Prueba
|
||||||
|
{
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
JFrame principal = new JFrame();
|
||||||
|
JPanel main = new JPanel();
|
||||||
|
principal.add(main);
|
||||||
|
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
|
||||||
|
dataset.setValue(6, "Profit", "Jane");
|
||||||
|
dataset.setValue(7, "Profit", "Tom");
|
||||||
|
dataset.setValue(8, "Profit", "Jill");
|
||||||
|
dataset.setValue(5, "Profit", "John");
|
||||||
|
dataset.setValue(12, "Profit", "Fred");
|
||||||
|
JFreeChart chart = ChartFactory.createBarChart("Comparison between Salesman",
|
||||||
|
"Salesman", "Profit", dataset, PlotOrientation.VERTICAL,
|
||||||
|
false, true, false);
|
||||||
|
ChartPanel graph = new ChartPanel(chart);
|
||||||
|
main.add(graph);
|
||||||
|
principal.pack();
|
||||||
|
principal.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user