Se arreglaron los tamaños de las vistas

This commit is contained in:
Daniel Cortés
2019-05-13 11:59:59 -04:00
parent 13fca1425f
commit 6ffb2d6b64
25 changed files with 238 additions and 327 deletions

View File

@@ -1,10 +1,21 @@
package xyz.danielcortes.controllers.libro; package xyz.danielcortes.controllers.libro;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.JComboBox;
import xyz.danielcortes.controllers.BaseController; import xyz.danielcortes.controllers.BaseController;
import xyz.danielcortes.controllers.LaunchController; import xyz.danielcortes.controllers.LaunchController;
import xyz.danielcortes.framework.JListUtils; import xyz.danielcortes.framework.JListUtils;
import xyz.danielcortes.framework.PanelName; import xyz.danielcortes.framework.PanelName;
import xyz.danielcortes.models.Autor;
import xyz.danielcortes.models.Categoria;
import xyz.danielcortes.models.Editorial;
import xyz.danielcortes.models.Idioma;
import xyz.danielcortes.models.Libro; import xyz.danielcortes.models.Libro;
import xyz.danielcortes.repository.AutorRepository;
import xyz.danielcortes.repository.CategoriaRepository;
import xyz.danielcortes.repository.EditorialRepository;
import xyz.danielcortes.repository.IdiomaRepository;
import xyz.danielcortes.views.BasePanel; import xyz.danielcortes.views.BasePanel;
import xyz.danielcortes.views.libro.LibroViewPanel; import xyz.danielcortes.views.libro.LibroViewPanel;
@@ -12,15 +23,25 @@ public class LibroViewController extends BaseController {
private Libro libro; private Libro libro;
private LibroViewPanel view; private LibroViewPanel view;
private IdiomaRepository idiomaRepository;
private CategoriaRepository categoriaRepository;
private AutorRepository autorRepository;
private EditorialRepository editorialRepository;
public LibroViewController(LibroViewPanel view, LaunchController parent){ public LibroViewController(LibroViewPanel view, LaunchController parent){
super(parent); super(parent);
this.view = view; this.view = view;
this.idiomaRepository = new IdiomaRepository();
this.categoriaRepository = new CategoriaRepository();
this.autorRepository = new AutorRepository();
this.editorialRepository = new EditorialRepository();
this.setupListeners(); this.setupListeners();
} }
@Override @Override
public void show() { public void show() {
this.fillLibro(); this.reload();
} }
public void setLibro(Libro libro) { public void setLibro(Libro libro) {
@@ -33,8 +54,16 @@ public class LibroViewController extends BaseController {
}); });
} }
private void reload() {
this.loadAutorList();
this.loadCategoriasList();
this.loadEditorialCombo();
this.loadIdiomasList();
this.fillLibro();
}
private void fillLibro() { private void fillLibro() {
if(libro != null) if(libro == null)
return; return;
this.view.getSerieField().setText(this.libro.getSerie()); this.view.getSerieField().setText(this.libro.getSerie());
@@ -49,6 +78,42 @@ public class LibroViewController extends BaseController {
this.view.getEditorialCombo().setSelectedItem(this.libro.getEditorial()); this.view.getEditorialCombo().setSelectedItem(this.libro.getEditorial());
} }
private void loadIdiomasList() {
List<Idioma> idiomas = idiomaRepository.getAll();
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
model.clear();
for (Idioma idioma : idiomas) {
model.addElement(idioma);
}
}
private void loadCategoriasList() {
List<Categoria> categorias = categoriaRepository.getAll();
DefaultListModel<Categoria> model = this.view.getCategoriasModel();
model.clear();
for (Categoria categoria : categorias) {
model.addElement(categoria);
}
}
private void loadAutorList() {
List<Autor> autores = autorRepository.getAll();
DefaultListModel<Autor> model = this.view.getAutoresModel();
model.clear();
for (Autor autor : autores) {
model.addElement(autor);
}
}
private void loadEditorialCombo() {
List<Editorial> editoriales = this.editorialRepository.getAll();
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
combobox.removeAllItems();
for (Editorial editorial : editoriales) {
combobox.addItem(editorial);
}
}
@Override @Override
public BasePanel getView() { public BasePanel getView() {
return this.view; return this.view;

View File

@@ -33,7 +33,9 @@
</component> </component>
<component id="d89c0" class="javax.swing.JButton" binding="buscarButton" default-binding="true"> <component id="d89c0" class="javax.swing.JButton" binding="buscarButton" default-binding="true">
<constraints> <constraints>
<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"/> <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="150" height="-1"/>
</grid>
</constraints> </constraints>
<properties> <properties>
<text value="Buscar"/> <text value="Buscar"/>

View File

@@ -109,7 +109,8 @@ public class AutorSearchPanel extends BasePanel {
buscarButton = new JButton(); buscarButton = new JButton();
buscarButton.setText("Buscar"); buscarButton.setText("Buscar");
contentPane.add(buscarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, contentPane.add(buscarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
final JPanel panel1 = new JPanel(); final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel1, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(panel1, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,

View File

@@ -49,7 +49,7 @@
<children> <children>
<component id="bc042" class="javax.swing.JButton" binding="updateButton"> <component id="bc042" class="javax.swing.JButton" binding="updateButton">
<constraints> <constraints>
<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"> <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"/> <preferred-size width="150" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -59,7 +59,7 @@
</component> </component>
<component id="6761c" class="javax.swing.JButton" binding="volverButton" default-binding="true"> <component id="6761c" class="javax.swing.JButton" binding="volverButton" default-binding="true">
<constraints> <constraints>
<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"> <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"/> <preferred-size width="150" height="-1"/>
</grid> </grid>
</constraints> </constraints>

View File

@@ -79,12 +79,12 @@ public class CategoriaUpdatePanel extends BasePanel {
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
updateButton = new JButton(); updateButton = new JButton();
updateButton.setText("Actualizar"); updateButton.setText("Actualizar");
panel1.add(updateButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, panel1.add(updateButton, 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), GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false)); null, 0, false));
volverButton = new JButton(); volverButton = new JButton();
volverButton.setText("Volver"); volverButton.setText("Volver");
panel1.add(volverButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 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), GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false)); null, 0, false));
} }

View File

@@ -26,7 +26,9 @@
</component> </component>
<component id="c23eb" class="javax.swing.JButton" binding="volverButton" default-binding="true"> <component id="c23eb" class="javax.swing.JButton" binding="volverButton" default-binding="true">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Volver"/> <text value="Volver"/>

View File

@@ -55,8 +55,9 @@ public class CategoriaViewPanel extends BasePanel {
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
volverButton = new JButton(); volverButton = new JButton();
volverButton.setText("Volver"); volverButton.setText("Volver");
contentPane.add(volverButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, contentPane.add(volverButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
final Spacer spacer1 = new Spacer(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, contentPane.add(spacer1,
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
@@ -77,4 +78,5 @@ public class CategoriaViewPanel extends BasePanel {
public JComponent $$$getRootComponent$$$() { public JComponent $$$getRootComponent$$$() {
return contentPane; return contentPane;
} }
} }

View File

@@ -31,7 +31,9 @@
</component> </component>
<component id="360a" class="javax.swing.JButton" binding="guardarButton" default-binding="true"> <component id="360a" class="javax.swing.JButton" binding="guardarButton" default-binding="true">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Guardar"/> <text value="Guardar"/>

View File

@@ -38,8 +38,7 @@ public class EditorialCreatePanel extends BasePanel {
} }
/** /**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
* call it in your code!
* *
* @noinspection ALL * @noinspection ALL
*/ */
@@ -47,33 +46,30 @@ public class EditorialCreatePanel extends BasePanel {
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1)); contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1));
nombreField = new JTextField(); nombreField = new JTextField();
contentPane.add(nombreField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(nombreField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
final Spacer spacer1 = new Spacer(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer1,
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
false)); null, null, 0, false));
final JLabel label1 = new JLabel(); final JLabel label1 = new JLabel();
label1.setText("Nombre:"); label1.setText("Nombre:");
contentPane.add(label1, contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
guardarButton = new JButton(); guardarButton = new JButton();
guardarButton.setText("Guardar"); guardarButton.setText("Guardar");
contentPane.add(guardarButton, contentPane.add(guardarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
new GridConstraints(2, 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),
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final Spacer spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer2,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer3,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
} }
/** /**
@@ -82,4 +78,5 @@ public class EditorialCreatePanel extends BasePanel {
public JComponent $$$getRootComponent$$$() { public JComponent $$$getRootComponent$$$() {
return contentPane; return contentPane;
} }
} }

View File

@@ -41,7 +41,9 @@
</hspacer> </hspacer>
<component id="84fc7" class="javax.swing.JButton" binding="actualizarButton" default-binding="true"> <component id="84fc7" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Actualizar"/> <text value="Actualizar"/>

View File

@@ -25,6 +25,7 @@ public class EditorialUpdatePanel extends BasePanel {
public JTextField getNombreField() { public JTextField getNombreField() {
return nombreField; return nombreField;
} }
public JButton getActualizarButton() { public JButton getActualizarButton() {
return actualizarButton; return actualizarButton;
} }
@@ -67,7 +68,8 @@ public class EditorialUpdatePanel extends BasePanel {
actualizarButton = new JButton(); actualizarButton = new JButton();
actualizarButton.setText("Actualizar"); actualizarButton.setText("Actualizar");
contentPane.add(actualizarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, contentPane.add(actualizarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
} }
/** /**

View File

@@ -18,7 +18,9 @@
</component> </component>
<component id="dbfd0" class="javax.swing.JButton" binding="guardarButton" default-binding="true"> <component id="dbfd0" class="javax.swing.JButton" binding="guardarButton" default-binding="true">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Guardar"/> <text value="Guardar"/>

View File

@@ -38,8 +38,7 @@ public class IdiomaCreatePanel extends BasePanel {
} }
/** /**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
* call it in your code!
* *
* @noinspection ALL * @noinspection ALL
*/ */
@@ -47,33 +46,30 @@ public class IdiomaCreatePanel extends BasePanel {
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1)); contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1));
nombreField = new JTextField(); nombreField = new JTextField();
contentPane.add(nombreField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(nombreField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
guardarButton = new JButton(); guardarButton = new JButton();
guardarButton.setText("Guardar"); guardarButton.setText("Guardar");
contentPane.add(guardarButton, contentPane.add(guardarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
new GridConstraints(2, 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),
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final Spacer spacer1 = new Spacer(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer1,
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
false)); null, null, 0, false));
final Spacer spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer2,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer3,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
final JLabel label1 = new JLabel(); final JLabel label1 = new JLabel();
label1.setText("Nombre:"); label1.setText("Nombre:");
contentPane.add(label1, contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
} }
/** /**

View File

@@ -33,7 +33,9 @@
</hspacer> </hspacer>
<component id="e80d1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true"> <component id="e80d1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
<constraints> <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"/> <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> </constraints>
<properties> <properties>
<text value="Actualizar"/> <text value="Actualizar"/>

View File

@@ -64,7 +64,8 @@ public class IdiomaUpdatePanel extends BasePanel {
actualizarButton = new JButton(); actualizarButton = new JButton();
actualizarButton.setText("Actualizar"); actualizarButton.setText("Actualizar");
contentPane.add(actualizarButton, new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, 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, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
final JLabel label1 = new JLabel(); final JLabel label1 = new JLabel();
label1.setText("Nombre:"); label1.setText("Nombre:");
contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,

View File

@@ -1,9 +1,9 @@
<?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="xyz.danielcortes.views.libro.LibroCreatePanel"> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.libro.LibroCreatePanel">
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="644"/> <xy x="20" y="20" width="500" height="664"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
@@ -60,7 +60,9 @@
</component> </component>
<component id="b355b" class="javax.swing.JButton" binding="guardarButton" default-binding="true"> <component id="b355b" class="javax.swing.JButton" binding="guardarButton" default-binding="true">
<constraints> <constraints>
<grid row="20" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/> <grid row="20" 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> </constraints>
<properties> <properties>
<text value="Guardar"/> <text value="Guardar"/>

View File

@@ -113,143 +113,114 @@ public class LibroCreatePanel extends BasePanel {
} }
/** /**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
* call it in your code!
* *
* @noinspection ALL * @noinspection ALL
*/ */
private void $$$setupUI$$$() { private void $$$setupUI$$$() {
createUIComponents(); createUIComponents();
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(10, 10, 10, 10), -1, -1)); contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(20, 20, 20, 20), -1, -1));
serieField = new JTextField(); serieField = new JTextField();
contentPane.add(serieField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(serieField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
isbnField = new JTextField(); isbnField = new JTextField();
contentPane.add(isbnField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(isbnField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
tituloField = new JTextField(); tituloField = new JTextField();
tituloField.setText(""); tituloField.setText("");
contentPane.add(tituloField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(tituloField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
paginasField = new JTextField(); paginasField = new JTextField();
contentPane.add(paginasField, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(paginasField,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
anoPublicacionField = new JTextField(); anoPublicacionField = new JTextField();
contentPane.add(anoPublicacionField, contentPane.add(anoPublicacionField,
new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
contentPane.add(editorialCombo, new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_WEST, contentPane.add(editorialCombo,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
guardarButton = new JButton(); guardarButton = new JButton();
guardarButton.setText("Guardar"); guardarButton.setText("Guardar");
contentPane.add(guardarButton, contentPane.add(guardarButton, new GridConstraints(20, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
new GridConstraints(20, 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),
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JScrollPane scrollPane1 = new JScrollPane(); final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, contentPane.add(scrollPane1, new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
new Dimension(400, -1), null, 0, false));
scrollPane1.setViewportView(idiomasList); scrollPane1.setViewportView(idiomasList);
final JScrollPane scrollPane2 = new JScrollPane(); final JScrollPane scrollPane2 = new JScrollPane();
contentPane.add(scrollPane2, contentPane.add(scrollPane2, new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
new Dimension(400, -1), null, 0, false));
scrollPane2.setViewportView(autoresList); scrollPane2.setViewportView(autoresList);
final JScrollPane scrollPane3 = new JScrollPane(); final JScrollPane scrollPane3 = new JScrollPane();
contentPane.add(scrollPane3, contentPane.add(scrollPane3, new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
new Dimension(400, -1), null, 0, false));
scrollPane3.setViewportView(categoriasList); scrollPane3.setViewportView(categoriasList);
final JLabel label1 = new JLabel(); final JLabel label1 = new JLabel();
label1.setText("Nº Serie:"); label1.setText("Nº Serie:");
contentPane.add(label1, contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label2 = new JLabel(); final JLabel label2 = new JLabel();
label2.setText("ISBN:"); label2.setText("ISBN:");
contentPane.add(label2, contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label3 = new JLabel(); final JLabel label3 = new JLabel();
label3.setText("Titulo:"); label3.setText("Titulo:");
contentPane.add(label3, contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label4 = new JLabel(); final JLabel label4 = new JLabel();
label4.setText("Nº Paginas:"); label4.setText("Nº Paginas:");
contentPane.add(label4, contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label5 = new JLabel(); final JLabel label5 = new JLabel();
label5.setText("Año Publicacion:"); label5.setText("Año Publicacion:");
contentPane.add(label5, contentPane.add(label5, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label6 = new JLabel(); final JLabel label6 = new JLabel();
label6.setText("Idiomas:"); label6.setText("Idiomas:");
contentPane.add(label6, contentPane.add(label6, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label7 = new JLabel(); final JLabel label7 = new JLabel();
label7.setText("Autores:"); label7.setText("Autores:");
contentPane.add(label7, contentPane.add(label7, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label8 = new JLabel(); final JLabel label8 = new JLabel();
label8.setText("Categorias:"); label8.setText("Categorias:");
contentPane.add(label8, contentPane.add(label8, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final JLabel label9 = new JLabel(); final JLabel label9 = new JLabel();
label9.setText("Editorial:"); label9.setText("Editorial:");
contentPane.add(label9, contentPane.add(label9, new GridConstraints(18, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(18, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
false));
final Spacer spacer1 = new Spacer(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer1,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
final Spacer spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer2,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
0, false)); null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, new GridConstraints(21, 1, 1, 1, GridConstraints.ANCHOR_CENTER, contentPane.add(spacer3,
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, new GridConstraints(21, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
false)); null, null, 0, false));
final JLabel label10 = new JLabel(); final JLabel label10 = new JLabel();
label10.setText("Precio Referencia:"); label10.setText("Precio Referencia:");
contentPane.add(label10, contentPane.add(label10,
new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
false));
precioReferenciaField = new JTextField(); precioReferenciaField = new JTextField();
contentPane.add(precioReferenciaField, contentPane.add(precioReferenciaField,
new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_WEST, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
} }

View File

@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.libro.LibroDeletePanel">
<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="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="a3d30" 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"/>
</constraints>
<properties>
<text value="Libro:"/>
</properties>
</component>
<vspacer id="86e32">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="d7688" class="javax.swing.JButton" binding="eliminarButton">
<constraints>
<grid row="2" column="1" 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="Eliminar"/>
</properties>
</component>
<component id="28e5d" class="javax.swing.JComboBox" binding="libroCombo" custom-create="true">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<hspacer id="9f536">
<constraints>
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<hspacer id="508ff">
<constraints>
<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>
</children>
</grid>
</form>

View File

@@ -1,101 +0,0 @@
package xyz.danielcortes.views.libro;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import java.awt.Dimension;
import java.awt.Insets;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import xyz.danielcortes.models.Libro;
import xyz.danielcortes.views.BasePanel;
public class LibroDeletePanel extends BasePanel {
private JButton eliminarButton;
private JComboBox<Libro> libroCombo;
private JPanel contentPane;
private DefaultComboBoxModel<Libro> libroModel;
public JPanel getContentPane() {
return contentPane;
}
public JButton getEliminarButton() {
return eliminarButton;
}
public JComboBox<Libro> getLibroCombo() {
return libroCombo;
}
public DefaultComboBoxModel<Libro> getLibroModel() {
return libroModel;
}
{
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
$$$setupUI$$$();
}
/**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
* call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
createUIComponents();
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(10, 10, 10, 10), -1, -1));
final JLabel label1 = new JLabel();
label1.setText("Libro:");
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 Spacer spacer1 = new Spacer();
contentPane.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
false));
eliminarButton = new JButton();
eliminarButton.setText("Eliminar");
contentPane.add(eliminarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
contentPane.add(libroCombo, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
0, false));
final Spacer spacer3 = new Spacer();
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));
}
/**
* @noinspection ALL
*/
public JComponent $$$getRootComponent$$$() {
return contentPane;
}
private void createUIComponents() {
this.createLibroCombo();
}
private void createLibroCombo() {
this.libroModel = new DefaultComboBoxModel<>();
this.libroCombo = new JComboBox<>(this.libroModel);
}
}

View File

@@ -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="xyz.danielcortes.views.libro.LibroSearchPanel"> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.libro.LibroSearchPanel">
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="27dc6" binding="contentPane" 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="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="400"/> <xy x="20" y="20" width="500" height="400"/>
</constraints> </constraints>
@@ -41,7 +41,9 @@
</component> </component>
<component id="8daa9" class="javax.swing.JButton" binding="buscarButton" default-binding="true"> <component id="8daa9" class="javax.swing.JButton" binding="buscarButton" default-binding="true">
<constraints> <constraints>
<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"/> <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="150" height="-1"/>
</grid>
</constraints> </constraints>
<properties> <properties>
<text value="Buscar"/> <text value="Buscar"/>
@@ -59,7 +61,9 @@
<children> <children>
<component id="55e55" class="javax.swing.JButton" binding="verButton" default-binding="true"> <component id="55e55" class="javax.swing.JButton" binding="verButton" default-binding="true">
<constraints> <constraints>
<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"/> <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> </constraints>
<properties> <properties>
<text value="Ver"/> <text value="Ver"/>
@@ -67,7 +71,9 @@
</component> </component>
<component id="37f2b" class="javax.swing.JButton" binding="editarButton" default-binding="true"> <component id="37f2b" class="javax.swing.JButton" binding="editarButton" default-binding="true">
<constraints> <constraints>
<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"/> <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> </constraints>
<properties> <properties>
<text value="Editar"/> <text value="Editar"/>
@@ -75,7 +81,9 @@
</component> </component>
<component id="bc714" class="javax.swing.JButton" binding="eliminarButton" default-binding="true"> <component id="bc714" class="javax.swing.JButton" binding="eliminarButton" default-binding="true">
<constraints> <constraints>
<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"/> <grid row="0" column="2" 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> </constraints>
<properties> <properties>
<text value="Eliminar"/> <text value="Eliminar"/>

View File

@@ -96,7 +96,7 @@ public class LibroSearchPanel extends BasePanel {
private void $$$setupUI$$$() { private void $$$setupUI$$$() {
createUIComponents(); createUIComponents();
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1)); contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(20, 20, 20, 20), -1, -1));
final JScrollPane scrollPane1 = new JScrollPane(); final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane1, new GridConstraints(1, 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,
@@ -114,7 +114,8 @@ public class LibroSearchPanel extends BasePanel {
buscarButton = new JButton(); buscarButton = new JButton();
buscarButton.setText("Buscar"); buscarButton.setText("Buscar");
panel1.add(buscarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, panel1.add(buscarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
final JPanel panel2 = new JPanel(); final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
contentPane.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
@@ -122,16 +123,19 @@ public class LibroSearchPanel extends BasePanel {
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
verButton = new JButton(); verButton = new JButton();
verButton.setText("Ver"); verButton.setText("Ver");
panel2.add(verButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, panel2.add(verButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
editarButton = new JButton(); editarButton = new JButton();
editarButton.setText("Editar"); editarButton.setText("Editar");
panel2.add(editarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, panel2.add(editarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
eliminarButton = new JButton(); eliminarButton = new JButton();
eliminarButton.setText("Eliminar"); eliminarButton.setText("Eliminar");
panel2.add(eliminarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, panel2.add(eliminarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
} }
/** /**

View File

@@ -1,9 +1,9 @@
<?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="xyz.danielcortes.views.libro.LibroUpdatePanel"> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.libro.LibroUpdatePanel">
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="644"/> <xy x="20" y="20" width="500" height="664"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
@@ -191,7 +191,9 @@
</component> </component>
<component id="16ee1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true"> <component id="16ee1" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
<constraints> <constraints>
<grid row="20" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/> <grid row="20" 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> </constraints>
<properties> <properties>
<text value="Actualizar"/> <text value="Actualizar"/>

View File

@@ -150,7 +150,7 @@ public class LibroUpdatePanel extends BasePanel {
private void $$$setupUI$$$() { private void $$$setupUI$$$() {
createUIComponents(); createUIComponents();
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(10, 10, 10, 10), -1, -1)); contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(20, 20, 20, 20), -1, -1));
final JLabel label1 = new JLabel(); final JLabel label1 = new JLabel();
label1.setText("Nº Serie:"); label1.setText("Nº Serie:");
contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
@@ -237,7 +237,8 @@ public class LibroUpdatePanel extends BasePanel {
actualizarButton = new JButton(); actualizarButton = new JButton();
actualizarButton.setText("Actualizar"); actualizarButton.setText("Actualizar");
contentPane.add(actualizarButton, new GridConstraints(20, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, contentPane.add(actualizarButton, new GridConstraints(20, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
null, 0, false));
final Spacer spacer1 = new Spacer(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, contentPane.add(spacer1,
new GridConstraints(21, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, new GridConstraints(21, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,

View File

@@ -1,9 +1,9 @@
<?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="xyz.danielcortes.views.libro.LibroViewPanel"> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.libro.LibroViewPanel">
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="22" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="644"/> <xy x="20" y="20" width="500" height="664"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>

View File

@@ -120,7 +120,7 @@ public class LibroViewPanel extends BasePanel {
private void $$$setupUI$$$() { private void $$$setupUI$$$() {
createUIComponents(); createUIComponents();
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(10, 10, 10, 10), -1, -1)); contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(20, 20, 20, 20), -1, -1));
serieField = new JTextField(); serieField = new JTextField();
serieField.setEditable(false); serieField.setEditable(false);
contentPane.add(serieField, contentPane.add(serieField,