No me gusto como quedaba el codigo al colocar un boton de salida, por ahora se debera usar el nativo del sistema
This commit is contained in:
BIN
dist/local-release/Programa Caja.jar
vendored
BIN
dist/local-release/Programa Caja.jar
vendored
Binary file not shown.
2
dist/local-release/config/app.properties
vendored
2
dist/local-release/config/app.properties
vendored
@@ -9,7 +9,7 @@
|
|||||||
# database_uri es la uri de la base de datos con la que se conectara el sistema.
|
# database_uri es la uri de la base de datos con la que se conectara el sistema.
|
||||||
# por ahora soporte solo a sqlite asi que debe ser la uri correspondiente
|
# por ahora soporte solo a sqlite asi que debe ser la uri correspondiente
|
||||||
|
|
||||||
sqlite_database_uri = jdbc:sqlite:data/rodriguez.dat
|
sqlite_database_uri = jdbc:sqlite:data/local.dat
|
||||||
|
|
||||||
|
|
||||||
# look_and_feel elige el look and feel que intentara utilizar la aplicacion, si el seleccionado no funciona en el sistema operativo se hara fallback a metal.
|
# look_and_feel elige el look and feel que intentara utilizar la aplicacion, si el seleccionado no funciona en el sistema operativo se hara fallback a metal.
|
||||||
|
|||||||
@@ -65,10 +65,6 @@ public class InformesController {
|
|||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.view.getSalirButton().addActionListener(e -> {
|
|
||||||
((JFrame) this.view.getContentPanel().getParent().getParent().getParent()).dispose();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generarInformeLibroDeVentasListener() {
|
private void generarInformeLibroDeVentasListener() {
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ public class MainController {
|
|||||||
|
|
||||||
this.executeView(view.getContentPanel(), "Informes Mensuales", new Dimension(250, 500));
|
this.executeView(view.getContentPanel(), "Informes Mensuales", new Dimension(250, 500));
|
||||||
});
|
});
|
||||||
this.view.getSalirButton().addActionListener(e -> {
|
|
||||||
System.exit(0);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeView(JComponent view, String title, Dimension d){
|
private void executeView(JComponent view, String title, Dimension d){
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<grid id="ae41b" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="ae41b" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="10" left="10" bottom="10" right="10"/>
|
<margin top="10" left="10" bottom="10" right="10"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
@@ -45,14 +45,6 @@
|
|||||||
<text value="Estado Resultado"/>
|
<text value="Estado Resultado"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="64177" class="javax.swing.JButton" binding="salirButton" default-binding="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<text value="Salir"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ public class InformesView {
|
|||||||
return estadoResultadoButton;
|
return estadoResultadoButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getSalirButton() {
|
|
||||||
return salirButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
@@ -76,7 +73,7 @@ public class InformesView {
|
|||||||
contentPanel = new JPanel();
|
contentPanel = new JPanel();
|
||||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||||
final JPanel panel1 = new JPanel();
|
final JPanel panel1 = new JPanel();
|
||||||
panel1.setLayout(new GridLayoutManager(5, 1, new Insets(10, 10, 10, 10), -1, -1));
|
panel1.setLayout(new GridLayoutManager(4, 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));
|
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"));
|
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales"));
|
||||||
generarLibroVentasButton = new JButton();
|
generarLibroVentasButton = new JButton();
|
||||||
@@ -90,9 +87,6 @@ public class InformesView {
|
|||||||
estadoResultadoButton = new JButton();
|
estadoResultadoButton = new JButton();
|
||||||
estadoResultadoButton.setText("Estado Resultado");
|
estadoResultadoButton.setText("Estado Resultado");
|
||||||
panel1.add(estadoResultadoButton, 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));
|
panel1.add(estadoResultadoButton, 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));
|
||||||
salirButton = new JButton();
|
|
||||||
salirButton.setText("Salir");
|
|
||||||
panel1.add(salirButton, new GridConstraints(4, 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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<grid id="bc8d7" binding="buttonPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="bc8d7" binding="buttonPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="10" left="10" bottom="10" right="10"/>
|
<margin top="10" left="10" bottom="10" right="10"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
@@ -37,14 +37,6 @@
|
|||||||
<text value="Informes Mensuales"/>
|
<text value="Informes Mensuales"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="5a8d1" class="javax.swing.JButton" binding="salirButton" default-binding="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<text value="Salir"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ public class MainView {
|
|||||||
return informesGeneralesButton;
|
return informesGeneralesButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getSalirButton() {
|
|
||||||
return salirButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
@@ -57,7 +54,7 @@ public class MainView {
|
|||||||
contentPanel = new JPanel();
|
contentPanel = new JPanel();
|
||||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||||
buttonPanel = new JPanel();
|
buttonPanel = new JPanel();
|
||||||
buttonPanel.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
|
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));
|
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));
|
buttonPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
|
||||||
cajasButton = new JButton();
|
cajasButton = new JButton();
|
||||||
@@ -68,9 +65,6 @@ public class MainView {
|
|||||||
informesMensualesButton = new JButton();
|
informesMensualesButton = new JButton();
|
||||||
informesMensualesButton.setText("Informes Mensuales");
|
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));
|
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));
|
||||||
salirButton = new JButton();
|
|
||||||
salirButton.setText("Salir");
|
|
||||||
buttonPanel.add(salirButton, 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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user