Mejorada interaccion con las vistas :3
This commit is contained in:
@@ -32,8 +32,6 @@ import danielcortes.xyz.views.EgresosView;
|
|||||||
import danielcortes.xyz.views.components.EgresosTableModel;
|
import danielcortes.xyz.views.components.EgresosTableModel;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.KeyAdapter;
|
import java.awt.event.KeyAdapter;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
@@ -95,6 +93,7 @@ public class EgresosController {
|
|||||||
this.updateTotalEgresos();
|
this.updateTotalEgresos();
|
||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
}
|
}
|
||||||
|
this.resetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void eliminarActionListener(){
|
private void eliminarActionListener(){
|
||||||
@@ -232,4 +231,8 @@ public class EgresosController {
|
|||||||
this.view.getValorField().setText("");
|
this.view.getValorField().setText("");
|
||||||
this.view.getDescripcionField().setText("");
|
this.view.getDescripcionField().setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetFocus(){
|
||||||
|
this.view.getNroField().requestFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ import danielcortes.xyz.views.IngresosView;
|
|||||||
import danielcortes.xyz.views.components.IngresosTableModel;
|
import danielcortes.xyz.views.components.IngresosTableModel;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
|
||||||
import javax.xml.bind.SchemaOutputResolver;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.KeyAdapter;
|
import java.awt.event.KeyAdapter;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
@@ -94,6 +91,7 @@ public class IngresosController {
|
|||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
this.updateTotalIngresos();
|
this.updateTotalIngresos();
|
||||||
}
|
}
|
||||||
|
this.resetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void eliminarActionListener() {
|
private void eliminarActionListener() {
|
||||||
@@ -191,4 +189,8 @@ public class IngresosController {
|
|||||||
this.view.getTipoCombo().setSelectedIndex(0);
|
this.view.getTipoCombo().setSelectedIndex(0);
|
||||||
this.view.getValorField().setText("");
|
this.view.getValorField().setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetFocus(){
|
||||||
|
this.view.getTipoCombo().requestFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.EgresosView">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.EgresosView">
|
||||||
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="15" left="15" bottom="15" right="15"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="860" height="487"/>
|
<xy x="20" y="20" width="860" height="487"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.IngresosView">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.IngresosView">
|
||||||
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="15" left="15" bottom="15" right="15"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="766" height="411"/>
|
<xy x="20" y="20" width="766" height="411"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|||||||
@@ -1,47 +1,42 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.ManagerView">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="danielcortes.xyz.views.ManagerView">
|
||||||
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="10" left="10" bottom="10" right="10"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="829" height="539"/>
|
<xy x="20" y="20" width="561" height="307"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<grid id="b2933" binding="controlsPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="10" vgap="10">
|
<grid id="100a8" binding="cardPanel" layout-manager="CardLayout" hgap="0" vgap="0">
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children/>
|
||||||
|
</grid>
|
||||||
|
<grid id="b2933" binding="controlsPanel" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="2" 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"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="2ed8e" class="javax.swing.JButton" binding="egresosButton">
|
<component id="2ed8e" class="javax.swing.JButton" binding="egresosButton">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="200" height="-1"/>
|
|
||||||
<preferred-size width="200" height="-1"/>
|
<preferred-size width="200" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Egresos"/>
|
<text value="&Egresos"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="f54ab" class="javax.swing.JButton" binding="ingresosButton">
|
<component id="48887" class="javax.swing.JButton" binding="button4" default-binding="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="200" height="-1"/>
|
|
||||||
<preferred-size width="200" height="-1"/>
|
|
||||||
</grid>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<text value="Ingresos"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="93758" class="javax.swing.JButton" binding="button3" default-binding="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
|
||||||
<minimum-size width="200" height="-1"/>
|
|
||||||
<preferred-size width="200" height="-1"/>
|
<preferred-size width="200" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
@@ -49,10 +44,19 @@
|
|||||||
<text value="Button"/>
|
<text value="Button"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="48887" class="javax.swing.JButton" binding="button4" default-binding="true">
|
<component id="f54ab" class="javax.swing.JButton" binding="ingresosButton">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="200" height="-1"/>
|
<preferred-size width="200" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="&Ingresos"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="93758" class="javax.swing.JButton" binding="button3" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
<preferred-size width="200" height="-1"/>
|
<preferred-size width="200" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
@@ -62,14 +66,10 @@
|
|||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
<grid id="100a8" binding="cardPanel" layout-manager="CardLayout" hgap="10" vgap="10">
|
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties/>
|
|
||||||
<border type="none"/>
|
|
||||||
<children/>
|
|
||||||
</grid>
|
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
|
<inspectionSuppressions>
|
||||||
|
<suppress inspection="I18nForm"/>
|
||||||
|
<suppress inspection="FormSpellChecking"/>
|
||||||
|
</inspectionSuppressions>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user