Corregida usabilidad en autores, idioma
This commit is contained in:
@@ -66,6 +66,9 @@ public class AutorCreateController extends BaseController {
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
this.view.getNombreField().setText("");
|
||||
this.view.getApellidoPaternoField().setText("");
|
||||
this.view.getApellidoMaternoField().setText("");
|
||||
this.view.getNombreField().requestFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ public class AutorSearchController extends BaseController {
|
||||
|
||||
public void reload() {
|
||||
this.loadAutorTable();
|
||||
this.view.getSearchField().requestFocus();
|
||||
this.view.getAutorTable().setRowSelectionInterval(0, 0);
|
||||
}
|
||||
|
||||
private void loadAutorTable() {
|
||||
@@ -117,7 +119,6 @@ public class AutorSearchController extends BaseController {
|
||||
@Override
|
||||
public void show() {
|
||||
this.reload();
|
||||
this.view.getAutorTable().clearSelection();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -112,6 +112,8 @@ public class IdiomaSearchController extends BaseController {
|
||||
|
||||
public void reload() {
|
||||
this.loadIdiomaTable();
|
||||
this.view.getBuscarField().requestFocus();
|
||||
this.view.getIdiomaTable().setRowSelectionInterval(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,6 +28,7 @@ public class IdiomaUpdateController extends BaseController {
|
||||
private void setupListeners() {
|
||||
this.view.getNombreField().addActionListener(e -> this.update());
|
||||
this.view.getActualizarButton().addActionListener(e -> this.update());
|
||||
this.view.getVolverButton().addActionListener(e -> this.getParentController().showCard(PanelName.IDIOMA_SEARCH));
|
||||
}
|
||||
|
||||
private void update() {
|
||||
@@ -54,10 +55,8 @@ public class IdiomaUpdateController extends BaseController {
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
if (this.idioma == null)
|
||||
return;
|
||||
|
||||
this.fillIdioma();
|
||||
this.view.getNombreField().requestFocus();
|
||||
}
|
||||
|
||||
private void fillIdioma() {
|
||||
|
||||
@@ -106,6 +106,7 @@ public class LibroSearchController extends BaseController {
|
||||
public void reload() {
|
||||
this.loadLibroTable();
|
||||
this.view.getBuscarField().requestFocus();
|
||||
this.view.getLibrosTable().setRowSelectionInterval(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,4 +38,5 @@ public class ComprarLibroPanel extends BasePanel {
|
||||
public JComponent $$$getRootComponent$$$() {
|
||||
return contentPane;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="20" left="20" bottom="20" right="20"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="484" height="154"/>
|
||||
<xy x="20" y="20" width="484" height="174"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -31,16 +31,6 @@
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<component id="e80d1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Actualizar"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5cc79" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
@@ -49,6 +39,36 @@
|
||||
<text value="Nombre:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="5107e" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="2" 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>
|
||||
<component id="e80d1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
|
||||
<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">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Actualizar"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="444b5" class="javax.swing.JButton" binding="volverButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Volver"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
@@ -17,6 +17,7 @@ public class IdiomaUpdatePanel extends BasePanel {
|
||||
private JPanel contentPane;
|
||||
private JTextField nombreField;
|
||||
private JButton actualizarButton;
|
||||
private JButton volverButton;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -38,6 +39,10 @@ public class IdiomaUpdatePanel extends BasePanel {
|
||||
return this.actualizarButton;
|
||||
}
|
||||
|
||||
public JButton getVolverButton() {
|
||||
return this.volverButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||
*
|
||||
@@ -62,15 +67,25 @@ public class IdiomaUpdatePanel extends BasePanel {
|
||||
contentPane.add(spacer3,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
|
||||
null, null, 0, false));
|
||||
actualizarButton = new JButton();
|
||||
actualizarButton.setText("Actualizar");
|
||||
contentPane.add(actualizarButton, new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||
null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Nombre:");
|
||||
contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(2, 1, 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));
|
||||
actualizarButton = new JButton();
|
||||
actualizarButton.setText("Actualizar");
|
||||
panel1.add(actualizarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||
null, 0, false));
|
||||
volverButton = new JButton();
|
||||
volverButton.setText("Volver");
|
||||
panel1.add(volverButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||
null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user