Mejorada interaccion con las vistas :3

This commit is contained in:
Daniel Cortes
2018-12-24 21:58:39 -03:00
parent ece503afc1
commit f6df709679
5 changed files with 45 additions and 40 deletions

View File

@@ -32,8 +32,6 @@ import danielcortes.xyz.views.EgresosView;
import danielcortes.xyz.views.components.EgresosTableModel;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import java.awt.event.ActionEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
@@ -95,6 +93,7 @@ public class EgresosController {
this.updateTotalEgresos();
this.clearInputs();
}
this.resetFocus();
}
private void eliminarActionListener(){
@@ -232,4 +231,8 @@ public class EgresosController {
this.view.getValorField().setText("");
this.view.getDescripcionField().setText("");
}
private void resetFocus(){
this.view.getNroField().requestFocus();
}
}

View File

@@ -32,9 +32,6 @@ import danielcortes.xyz.views.IngresosView;
import danielcortes.xyz.views.components.IngresosTableModel;
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.KeyEvent;
@@ -94,6 +91,7 @@ public class IngresosController {
this.clearInputs();
this.updateTotalIngresos();
}
this.resetFocus();
}
private void eliminarActionListener() {
@@ -191,4 +189,8 @@ public class IngresosController {
this.view.getTipoCombo().setSelectedIndex(0);
this.view.getValorField().setText("");
}
private void resetFocus(){
this.view.getTipoCombo().requestFocus();
}
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<margin top="15" left="15" bottom="15" right="15"/>
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="860" height="487"/>
</constraints>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<margin top="15" left="15" bottom="15" right="15"/>
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="766" height="411"/>
</constraints>

View File

@@ -1,47 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<margin top="0" left="0" bottom="0" right="0"/>
<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="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="20" y="20" width="829" height="539"/>
<xy x="20" y="20" width="561" height="307"/>
</constraints>
<properties/>
<border type="none"/>
<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"/>
<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>
<properties/>
<border type="none"/>
<children>
<component id="2ed8e" class="javax.swing.JButton" binding="egresosButton">
<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">
<minimum-size width="200" height="-1"/>
<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">
<preferred-size width="200" height="-1"/>
</grid>
</constraints>
<properties>
<text value="Egresos"/>
<text value="&amp;Egresos"/>
</properties>
</component>
<component id="f54ab" class="javax.swing.JButton" binding="ingresosButton">
<component id="48887" class="javax.swing.JButton" binding="button4" default-binding="true">
<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">
<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"/>
<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">
<preferred-size width="200" height="-1"/>
</grid>
</constraints>
@@ -49,10 +44,19 @@
<text value="Button"/>
</properties>
</component>
<component id="48887" class="javax.swing.JButton" binding="button4" default-binding="true">
<component id="f54ab" class="javax.swing.JButton" binding="ingresosButton">
<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">
<minimum-size width="200" height="-1"/>
<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">
<preferred-size width="200" height="-1"/>
</grid>
</constraints>
<properties>
<text value="&amp;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"/>
</grid>
</constraints>
@@ -62,14 +66,10 @@
</component>
</children>
</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>
</grid>
<inspectionSuppressions>
<suppress inspection="I18nForm"/>
<suppress inspection="FormSpellChecking"/>
</inspectionSuppressions>
</form>