Agregados ejemplares de libros al sistema

This commit is contained in:
Daniel Cortés
2019-05-13 19:58:50 -04:00
parent 6ffb2d6b64
commit 0187e71187
15 changed files with 280 additions and 308 deletions

Binary file not shown.

View File

@@ -26,6 +26,7 @@ drop table if exists libro_idioma;
drop table if exists libro_categoria; drop table if exists libro_categoria;
drop table if exists libro_autor; drop table if exists libro_autor;
drop table if exists libro; drop table if exists libro;
drop table if exists ejemplar;
drop table if exists editorial; drop table if exists editorial;
drop table if exists idioma; drop table if exists idioma;
drop table if exists categoria; drop table if exists categoria;
@@ -72,15 +73,22 @@ create table idioma
create table libro create table libro
( (
id int unsigned primary key auto_increment, id int unsigned primary key auto_increment,
serie varchar(255) unique not null, isbn varchar(255) not null,
isbn varchar(255) not null,
titulo varchar(255) default null, titulo varchar(255) default null,
numero_paginas int not null, numero_paginas int not null,
precio_referencia int not null, precio_referencia int not null,
ano_publicacion int default null, ano_publicacion int default null,
editorial_id int unsigned not null, editorial_id int unsigned not null,
estado_id int unsigned default 1, foreign key (editorial_id) references editorial (id) on delete restrict on update cascade
foreign key (editorial_id) references editorial (id) on delete restrict on update cascade, );
create table ejemplar
(
id int unsigned primary key auto_increment,
serie varchar(255) not null,
libro_id int unsigned not null,
estado_id int unsigned default 1,
foreign key (libro_id) references libro (id) on delete restrict on update cascade,
foreign key (estado_id) references estado (id) on delete restrict on update cascade foreign key (estado_id) references estado (id) on delete restrict on update cascade
); );

View File

@@ -54,7 +54,7 @@ public class LibroCreateController extends BaseController {
@Override @Override
public void show() { public void show() {
this.reload(); this.reload();
this.view.getSerieField().requestFocus(); this.view.getIsbnField().requestFocus();
} }
private void setupListeners() { private void setupListeners() {
@@ -62,9 +62,6 @@ public class LibroCreateController extends BaseController {
} }
private void save() { private void save() {
String serie = this.view.getSerieField().getText();
if(!validator.validateSerie(serie)) return;
String isbn = this.view.getIsbnField().getText(); String isbn = this.view.getIsbnField().getText();
if(!validator.validateISBN(isbn)) return; if(!validator.validateISBN(isbn)) return;
isbn = isbn.replaceAll("[^\\d]", ""); isbn = isbn.replaceAll("[^\\d]", "");
@@ -94,7 +91,6 @@ public class LibroCreateController extends BaseController {
if(!validator.validateEditorial(editorial)) return; if(!validator.validateEditorial(editorial)) return;
Libro libro = new Libro(); Libro libro = new Libro();
libro.setSerie(serie);
libro.setIsbn(isbn); libro.setIsbn(isbn);
libro.setTitulo(titulo); libro.setTitulo(titulo);
libro.setNumeroPaginas(Integer.parseInt(numeroPaginas)); libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));

View File

@@ -64,7 +64,6 @@ public class LibroUpdateController extends BaseController {
if (libro == null) if (libro == null)
return; return;
this.view.getSerieField().setText(String.valueOf(libro.getSerie()));
this.view.getIsbnField().setText(libro.getIsbn()); this.view.getIsbnField().setText(libro.getIsbn());
this.view.getTituloField().setText(libro.getTitulo()); this.view.getTituloField().setText(libro.getTitulo());
this.view.getPaginasField().setText(String.valueOf(libro.getNumeroPaginas())); this.view.getPaginasField().setText(String.valueOf(libro.getNumeroPaginas()));
@@ -89,9 +88,6 @@ public class LibroUpdateController extends BaseController {
// @formatter:off // @formatter:off
if(!validator.validateLibro(libro)) return; if(!validator.validateLibro(libro)) return;
String serie = this.view.getSerieField().getText();
if(!validator.validateSerie(serie, libro)) return;
String isbn = this.view.getIsbnField().getText(); String isbn = this.view.getIsbnField().getText();
if(!validator.validateISBN(isbn)) return; if(!validator.validateISBN(isbn)) return;
isbn = isbn.replaceAll("[^\\d]", ""); isbn = isbn.replaceAll("[^\\d]", "");
@@ -123,7 +119,6 @@ public class LibroUpdateController extends BaseController {
assert libro != null; assert libro != null;
libro.setSerie(serie);
libro.setIsbn(isbn); libro.setIsbn(isbn);
libro.setTitulo(titulo); libro.setTitulo(titulo);
libro.setNumeroPaginas(Integer.parseInt(numeroPaginas)); libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));

View File

@@ -66,7 +66,6 @@ public class LibroViewController extends BaseController {
if(libro == null) if(libro == null)
return; return;
this.view.getSerieField().setText(this.libro.getSerie());
this.view.getIsbnField().setText(this.libro.getIsbn()); this.view.getIsbnField().setText(this.libro.getIsbn());
this.view.getTituloField().setText(this.libro.getTitulo()); this.view.getTituloField().setText(this.libro.getTitulo());
this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas())); this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas()));

View File

@@ -0,0 +1,68 @@
package xyz.danielcortes.models;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "ejemplar")
public class Ejemplar {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "serie", nullable = false)
private String serie;
@ManyToOne
@JoinColumn(name = "libro_id")
private Libro libro;
@ManyToOne
@JoinColumn(name = "estado_id")
private Estado estado;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSerie() {
return serie;
}
public void setSerie(String serie) {
this.serie = serie;
}
public Libro getLibro() {
return libro;
}
public void setLibro(Libro libro) {
this.libro = libro;
}
public Estado getEstado() {
return estado;
}
public void setEstado(Estado estado) {
this.estado = estado;
}
@Override
public String toString() {
return this.serie + " " + this.estado.getNombre();
}
}

View File

@@ -23,7 +23,7 @@ public class Estado {
private String nombre; private String nombre;
@OneToMany(mappedBy = "estado") @OneToMany(mappedBy = "estado")
private Set<Libro> libros; private Set<Ejemplar> ejemplares;
public Integer getId() { public Integer getId() {
return id; return id;
@@ -41,15 +41,15 @@ public class Estado {
this.nombre = nombre; this.nombre = nombre;
} }
public Set<Libro> getLibros() { public Set<Ejemplar> getLibros() {
if (this.libros == null) { if (this.ejemplares == null) {
this.libros = new HashSet<>(); this.ejemplares = new HashSet<>();
} }
return libros; return ejemplares;
} }
public void setLibros(Set<Libro> libros) { public void setLibros(Set<Ejemplar> ejemplares) {
this.libros = libros; this.ejemplares = ejemplares;
} }
@Override @Override

View File

@@ -1,6 +1,7 @@
package xyz.danielcortes.models; package xyz.danielcortes.models;
import java.time.Year; import java.time.Year;
import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Convert; import javax.persistence.Convert;
@@ -12,6 +13,7 @@ import javax.persistence.JoinColumn;
import javax.persistence.JoinTable; import javax.persistence.JoinTable;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table; import javax.persistence.Table;
import xyz.danielcortes.framework.YearAttributeConverter; import xyz.danielcortes.framework.YearAttributeConverter;
@@ -24,9 +26,6 @@ public class Libro {
@Column(name = "id", nullable = false) @Column(name = "id", nullable = false)
private Integer id; private Integer id;
@Column(name = "serie", unique = true)
private String serie;
@Column(name = "isbn", nullable = false) @Column(name = "isbn", nullable = false)
private String isbn; private String isbn;
@@ -71,9 +70,8 @@ public class Libro {
@JoinColumn(name = "editorial_id") @JoinColumn(name = "editorial_id")
private Editorial editorial; private Editorial editorial;
@ManyToOne @OneToMany(mappedBy = "libro")
@JoinColumn(name = "estado_id") private Set<Ejemplar> ejemplares;
private Estado estado;
public Integer getId() { public Integer getId() {
return id; return id;
@@ -83,14 +81,6 @@ public class Libro {
this.id = id; this.id = id;
} }
public String getSerie() {
return serie;
}
public void setSerie(String serie) {
this.serie = serie;
}
public String getIsbn() { public String getIsbn() {
return isbn; return isbn;
} }
@@ -132,6 +122,8 @@ public class Libro {
} }
public Set<Idioma> getIdiomas() { public Set<Idioma> getIdiomas() {
if(idiomas == null)
this.idiomas = new HashSet<>();
return idiomas; return idiomas;
} }
@@ -140,6 +132,8 @@ public class Libro {
} }
public Set<Autor> getAutores() { public Set<Autor> getAutores() {
if(autores == null)
this.autores = new HashSet<>();
return autores; return autores;
} }
@@ -148,6 +142,9 @@ public class Libro {
} }
public Set<Categoria> getCategorias() { public Set<Categoria> getCategorias() {
if(this.categorias == null)
this.categorias = new HashSet<>();
return categorias; return categorias;
} }
@@ -163,17 +160,19 @@ public class Libro {
this.editorial = editorial; this.editorial = editorial;
} }
public Estado getEstado() { public Set<Ejemplar> getEjemplares() {
return estado; if(ejemplares == null)
this.ejemplares = new HashSet<>();
return ejemplares;
} }
public void setEstado(Estado estado) { public void setEjemplares(Set<Ejemplar> ejemplar) {
this.estado = estado; this.ejemplares = ejemplar;
} }
@Override @Override
public String toString() { public String toString() {
return this.serie + " " + this.isbn + " " + this.titulo; return this.isbn + " " + this.titulo;
} }
} }

View File

@@ -1,14 +1,14 @@
<?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="20" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="20" left="20" bottom="20" right="20"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="664"/> <xy x="20" y="20" width="500" height="604"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<component id="7dfd" class="javax.swing.JTextField" binding="serieField"> <component id="f3244" class="javax.swing.JTextField" binding="isbnField">
<constraints> <constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
@@ -16,17 +16,9 @@
</constraints> </constraints>
<properties/> <properties/>
</component> </component>
<component id="f3244" class="javax.swing.JTextField" binding="isbnField">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="49da" class="javax.swing.JTextField" binding="tituloField"> <component id="49da" class="javax.swing.JTextField" binding="tituloField">
<constraints> <constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -36,7 +28,7 @@
</component> </component>
<component id="a5f4c" class="javax.swing.JTextField" binding="paginasField"> <component id="a5f4c" class="javax.swing.JTextField" binding="paginasField">
<constraints> <constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -44,7 +36,7 @@
</component> </component>
<component id="1bb31" class="javax.swing.JTextField" binding="anoPublicacionField"> <component id="1bb31" class="javax.swing.JTextField" binding="anoPublicacionField">
<constraints> <constraints>
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -52,7 +44,7 @@
</component> </component>
<component id="f8b93" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true"> <component id="f8b93" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
<constraints> <constraints>
<grid row="19" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="17" 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"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -60,7 +52,7 @@
</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="18" 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>
@@ -70,7 +62,7 @@
</component> </component>
<scrollpane id="ff034"> <scrollpane id="ff034">
<constraints> <constraints>
<grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="11" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -85,7 +77,7 @@
</scrollpane> </scrollpane>
<scrollpane id="47272"> <scrollpane id="47272">
<constraints> <constraints>
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -100,7 +92,7 @@
</scrollpane> </scrollpane>
<scrollpane id="5b4f1"> <scrollpane id="5b4f1">
<constraints> <constraints>
<grid row="17" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -113,17 +105,9 @@
</component> </component>
</children> </children>
</scrollpane> </scrollpane>
<component id="10e24" 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="Nº Serie:"/>
</properties>
</component>
<component id="15" class="javax.swing.JLabel"> <component id="15" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <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> </constraints>
<properties> <properties>
<text value="ISBN:"/> <text value="ISBN:"/>
@@ -131,7 +115,7 @@
</component> </component>
<component id="61c2f" class="javax.swing.JLabel"> <component id="61c2f" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Titulo:"/> <text value="Titulo:"/>
@@ -139,7 +123,7 @@
</component> </component>
<component id="72cc4" class="javax.swing.JLabel"> <component id="72cc4" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="4" 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> </constraints>
<properties> <properties>
<text value="Nº Paginas:"/> <text value="Nº Paginas:"/>
@@ -147,7 +131,7 @@
</component> </component>
<component id="725bf" class="javax.swing.JLabel"> <component id="725bf" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="6" 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> </constraints>
<properties> <properties>
<text value="Año Publicacion:"/> <text value="Año Publicacion:"/>
@@ -155,7 +139,7 @@
</component> </component>
<component id="3c2eb" class="javax.swing.JLabel"> <component id="3c2eb" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="10" 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> </constraints>
<properties> <properties>
<text value="Idiomas:"/> <text value="Idiomas:"/>
@@ -163,7 +147,7 @@
</component> </component>
<component id="f7906" class="javax.swing.JLabel"> <component id="f7906" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="14" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="12" 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> </constraints>
<properties> <properties>
<text value="Autores:"/> <text value="Autores:"/>
@@ -171,7 +155,7 @@
</component> </component>
<component id="5981d" class="javax.swing.JLabel"> <component id="5981d" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="16" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="14" 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> </constraints>
<properties> <properties>
<text value="Categorias:"/> <text value="Categorias:"/>
@@ -179,7 +163,7 @@
</component> </component>
<component id="dc81" class="javax.swing.JLabel"> <component id="dc81" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="18" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="16" 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> </constraints>
<properties> <properties>
<text value="Editorial:"/> <text value="Editorial:"/>
@@ -187,22 +171,22 @@
</component> </component>
<hspacer id="a5b67"> <hspacer id="a5b67">
<constraints> <constraints>
<grid row="7" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="5" 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> </constraints>
</hspacer> </hspacer>
<hspacer id="8c06a"> <hspacer id="8c06a">
<constraints> <constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="5" 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> </constraints>
</hspacer> </hspacer>
<vspacer id="7f6dd"> <vspacer id="7f6dd">
<constraints> <constraints>
<grid row="21" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</vspacer> </vspacer>
<component id="cd3f9" class="javax.swing.JLabel"> <component id="cd3f9" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="8" 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> </constraints>
<properties> <properties>
<text value="Precio Referencia:"/> <text value="Precio Referencia:"/>
@@ -210,7 +194,7 @@
</component> </component>
<component id="a406" class="javax.swing.JTextField" binding="precioReferenciaField"> <component id="a406" class="javax.swing.JTextField" binding="precioReferenciaField">
<constraints> <constraints>
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>

View File

@@ -25,7 +25,6 @@ import xyz.danielcortes.views.BasePanel;
public class LibroCreatePanel extends BasePanel { public class LibroCreatePanel extends BasePanel {
private JPanel contentPane; private JPanel contentPane;
private JTextField serieField;
private JTextField isbnField; private JTextField isbnField;
private JTextField tituloField; private JTextField tituloField;
private JTextField paginasField; private JTextField paginasField;
@@ -45,10 +44,6 @@ public class LibroCreatePanel extends BasePanel {
return contentPane; return contentPane;
} }
public JTextField getSerieField() {
return serieField;
}
public JTextField getIsbnField() { public JTextField getIsbnField() {
return isbnField; return isbnField;
} }
@@ -120,107 +115,98 @@ public class LibroCreatePanel extends BasePanel {
private void $$$setupUI$$$() { private void $$$setupUI$$$() {
createUIComponents(); createUIComponents();
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(22, 3, new Insets(20, 20, 20, 20), -1, -1)); contentPane.setLayout(new GridLayoutManager(20, 3, new Insets(20, 20, 20, 20), -1, -1));
serieField = new JTextField();
contentPane.add(serieField,
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));
isbnField = new JTextField(); isbnField = new JTextField();
contentPane.add(isbnField, contentPane.add(isbnField,
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
tituloField = new JTextField(); tituloField = new JTextField();
tituloField.setText(""); tituloField.setText("");
contentPane.add(tituloField, contentPane.add(tituloField,
new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
paginasField = new JTextField(); paginasField = new JTextField();
contentPane.add(paginasField, contentPane.add(paginasField,
new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
anoPublicacionField = new JTextField(); anoPublicacionField = new JTextField();
contentPane.add(anoPublicacionField, contentPane.add(anoPublicacionField,
new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
contentPane.add(editorialCombo, contentPane.add(editorialCombo,
new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, new GridConstraints(17, 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, new GridConstraints(20, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, contentPane.add(guardarButton, new GridConstraints(18, 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));
final JScrollPane scrollPane1 = new JScrollPane(); final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane1, new GridConstraints(11, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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, new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane2, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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, new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane3, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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("ISBN:");
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,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label2 = new JLabel(); final JLabel label2 = new JLabel();
label2.setText("ISBN:"); label2.setText("Titulo:");
contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel(); final JLabel label3 = new JLabel();
label3.setText("Titulo:"); label3.setText("Nº Paginas:");
contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label4 = new JLabel(); final JLabel label4 = new JLabel();
label4.setText("Nº Paginas:"); label4.setText("Año Publicacion:");
contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); 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("Idiomas:");
contentPane.add(label5, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label5, new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label6 = new JLabel(); final JLabel label6 = new JLabel();
label6.setText("Idiomas:"); label6.setText("Autores:");
contentPane.add(label6, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label6, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label7 = new JLabel(); final JLabel label7 = new JLabel();
label7.setText("Autores:"); label7.setText("Categorias:");
contentPane.add(label7, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label7, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label8 = new JLabel(); final JLabel label8 = new JLabel();
label8.setText("Categorias:"); label8.setText("Editorial:");
contentPane.add(label8, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label8, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label9 = new JLabel();
label9.setText("Editorial:");
contentPane.add(label9, new GridConstraints(18, 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(); final Spacer spacer1 = new Spacer();
contentPane.add(spacer1, contentPane.add(spacer1,
new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
null, null, 0, false)); null, null, 0, false));
final Spacer spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, contentPane.add(spacer2,
new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
null, null, 0, false)); null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, contentPane.add(spacer3,
new GridConstraints(21, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
null, null, 0, false)); null, null, 0, false));
final JLabel label10 = new JLabel(); final JLabel label9 = new JLabel();
label10.setText("Precio Referencia:"); label9.setText("Precio Referencia:");
contentPane.add(label10, contentPane.add(label9, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
precioReferenciaField = new JTextField(); precioReferenciaField = new JTextField();
contentPane.add(precioReferenciaField, contentPane.add(precioReferenciaField,
new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(9, 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));
} }

View File

@@ -65,13 +65,13 @@ public class LibroSearchPanel extends BasePanel {
private void createLibrosTable() { private void createLibrosTable() {
//@formatter:off //@formatter:off
this.librosModel = new BaseTableModel<>( this.librosModel = new BaseTableModel<>(
new String[]{"Serie", "ISBN", "Titulo", "Precio Referencial"}, new String[]{"ISBN", "Titulo", "Precio Referencial", "Stock"},
(rows, rowIndex, colIndex) -> { (rows, rowIndex, colIndex) -> {
switch(colIndex) { switch(colIndex) {
case 0: return rows.get(rowIndex).getSerie(); case 0: return rows.get(rowIndex).getIsbn();
case 1: return rows.get(rowIndex).getIsbn(); case 1: return rows.get(rowIndex).getTitulo();
case 2: return rows.get(rowIndex).getTitulo(); case 2: return rows.get(rowIndex).getPrecioReferencia();
case 3: return rows.get(rowIndex).getPrecioReferencia(); case 3: return rows.get(rowIndex).getEjemplares().size();
default: return null; default: return null;
} }
} }

View File

@@ -1,32 +1,16 @@
<?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="20" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="20" left="20" bottom="20" right="20"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="664"/> <xy x="20" y="20" width="500" height="604"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<component id="512df" 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="Nº Serie:"/>
</properties>
</component>
<component id="498b6" class="javax.swing.JTextField" binding="serieField">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="ff327" class="javax.swing.JLabel"> <component id="ff327" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <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> </constraints>
<properties> <properties>
<text value="ISBN:"/> <text value="ISBN:"/>
@@ -34,7 +18,7 @@
</component> </component>
<component id="3af48" class="javax.swing.JTextField" binding="isbnField"> <component id="3af48" class="javax.swing.JTextField" binding="isbnField">
<constraints> <constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -42,7 +26,7 @@
</component> </component>
<component id="d8528" class="javax.swing.JLabel"> <component id="d8528" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Titulo:"/> <text value="Titulo:"/>
@@ -50,7 +34,7 @@
</component> </component>
<component id="d2cef" class="javax.swing.JTextField" binding="tituloField"> <component id="d2cef" class="javax.swing.JTextField" binding="tituloField">
<constraints> <constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -58,7 +42,7 @@
</component> </component>
<component id="ba291" class="javax.swing.JLabel"> <component id="ba291" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="4" 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> </constraints>
<properties> <properties>
<text value="Nº Paginas:"/> <text value="Nº Paginas:"/>
@@ -66,7 +50,7 @@
</component> </component>
<component id="7585e" class="javax.swing.JTextField" binding="paginasField"> <component id="7585e" class="javax.swing.JTextField" binding="paginasField">
<constraints> <constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -74,7 +58,7 @@
</component> </component>
<component id="858e6" class="javax.swing.JLabel"> <component id="858e6" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="6" 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> </constraints>
<properties> <properties>
<text value="Año Publicacion:"/> <text value="Año Publicacion:"/>
@@ -82,7 +66,7 @@
</component> </component>
<component id="9113f" class="javax.swing.JTextField" binding="anoPublicacionField"> <component id="9113f" class="javax.swing.JTextField" binding="anoPublicacionField">
<constraints> <constraints>
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -90,7 +74,7 @@
</component> </component>
<component id="f24b8" class="javax.swing.JLabel"> <component id="f24b8" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="8" 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> </constraints>
<properties> <properties>
<text value="Precio Referencia:"/> <text value="Precio Referencia:"/>
@@ -98,7 +82,7 @@
</component> </component>
<component id="9e50c" class="javax.swing.JTextField" binding="precioReferenciaField"> <component id="9e50c" class="javax.swing.JTextField" binding="precioReferenciaField">
<constraints> <constraints>
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -106,7 +90,7 @@
</component> </component>
<component id="ecff" class="javax.swing.JLabel"> <component id="ecff" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="10" 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> </constraints>
<properties> <properties>
<text value="Idiomas:"/> <text value="Idiomas:"/>
@@ -114,7 +98,7 @@
</component> </component>
<scrollpane id="3454d"> <scrollpane id="3454d">
<constraints> <constraints>
<grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="11" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -129,7 +113,7 @@
</scrollpane> </scrollpane>
<component id="1f092" class="javax.swing.JLabel"> <component id="1f092" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="14" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="12" 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> </constraints>
<properties> <properties>
<text value="Autores:"/> <text value="Autores:"/>
@@ -137,7 +121,7 @@
</component> </component>
<scrollpane id="db428"> <scrollpane id="db428">
<constraints> <constraints>
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -152,7 +136,7 @@
</scrollpane> </scrollpane>
<component id="9e933" class="javax.swing.JLabel"> <component id="9e933" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="16" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="14" 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> </constraints>
<properties> <properties>
<text value="Categorias:"/> <text value="Categorias:"/>
@@ -160,7 +144,7 @@
</component> </component>
<scrollpane id="76cca"> <scrollpane id="76cca">
<constraints> <constraints>
<grid row="17" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -175,7 +159,7 @@
</scrollpane> </scrollpane>
<component id="8b4b1" class="javax.swing.JLabel"> <component id="8b4b1" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="18" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="16" 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> </constraints>
<properties> <properties>
<text value="Editorial:"/> <text value="Editorial:"/>
@@ -183,7 +167,7 @@
</component> </component>
<component id="d3b68" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true"> <component id="d3b68" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
<constraints> <constraints>
<grid row="19" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="17" 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"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -191,7 +175,7 @@
</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="18" 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>
@@ -201,17 +185,17 @@
</component> </component>
<vspacer id="f08c"> <vspacer id="f08c">
<constraints> <constraints>
<grid row="21" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</vspacer> </vspacer>
<hspacer id="dbf95"> <hspacer id="dbf95">
<constraints> <constraints>
<grid row="21" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</hspacer> </hspacer>
<hspacer id="c8afd"> <hspacer id="c8afd">
<constraints> <constraints>
<grid row="21" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</hspacer> </hspacer>
</children> </children>

View File

@@ -25,7 +25,6 @@ import xyz.danielcortes.views.BasePanel;
public class LibroUpdatePanel extends BasePanel { public class LibroUpdatePanel extends BasePanel {
private JPanel contentPane; private JPanel contentPane;
private JTextField serieField;
private JTextField isbnField; private JTextField isbnField;
private JTextField tituloField; private JTextField tituloField;
private JTextField paginasField; private JTextField paginasField;
@@ -45,10 +44,6 @@ public class LibroUpdatePanel extends BasePanel {
return contentPane; return contentPane;
} }
public JTextField getSerieField() {
return serieField;
}
public JTextField getIsbnField() { public JTextField getIsbnField() {
return isbnField; return isbnField;
} }
@@ -150,106 +145,97 @@ 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(20, 20, 20, 20), -1, -1)); contentPane.setLayout(new GridLayoutManager(20, 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("ISBN:");
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,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
serieField = new JTextField();
contentPane.add(serieField,
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));
final JLabel label2 = new JLabel();
label2.setText("ISBN:");
contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
isbnField = new JTextField(); isbnField = new JTextField();
contentPane.add(isbnField, contentPane.add(isbnField,
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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 JLabel label3 = new JLabel(); final JLabel label2 = new JLabel();
label3.setText("Titulo:"); label2.setText("Titulo:");
contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
tituloField = new JTextField(); tituloField = new JTextField();
contentPane.add(tituloField, contentPane.add(tituloField,
new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
final JLabel label4 = new JLabel(); final JLabel label3 = new JLabel();
label4.setText("Nº Paginas:"); label3.setText("Nº Paginas:");
contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
paginasField = new JTextField(); paginasField = new JTextField();
contentPane.add(paginasField, contentPane.add(paginasField,
new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
final JLabel label5 = new JLabel(); final JLabel label4 = new JLabel();
label5.setText("Año Publicacion:"); label4.setText("Año Publicacion:");
contentPane.add(label5, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
anoPublicacionField = new JTextField(); anoPublicacionField = new JTextField();
contentPane.add(anoPublicacionField, contentPane.add(anoPublicacionField,
new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
final JLabel label6 = new JLabel(); final JLabel label5 = new JLabel();
label6.setText("Precio Referencia:"); label5.setText("Precio Referencia:");
contentPane.add(label6, new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label5, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
precioReferenciaField = new JTextField(); precioReferenciaField = new JTextField();
contentPane.add(precioReferenciaField, contentPane.add(precioReferenciaField,
new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(9, 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 JLabel label7 = new JLabel(); final JLabel label6 = new JLabel();
label7.setText("Idiomas:"); label6.setText("Idiomas:");
contentPane.add(label7, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label6, new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JScrollPane scrollPane1 = new JScrollPane(); final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane1, new GridConstraints(11, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
scrollPane1.setViewportView(idiomasList); scrollPane1.setViewportView(idiomasList);
final JLabel label8 = new JLabel(); final JLabel label7 = new JLabel();
label8.setText("Autores:"); label7.setText("Autores:");
contentPane.add(label8, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label7, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JScrollPane scrollPane2 = new JScrollPane(); final JScrollPane scrollPane2 = new JScrollPane();
contentPane.add(scrollPane2, new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane2, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
scrollPane2.setViewportView(autoresList); scrollPane2.setViewportView(autoresList);
final JLabel label9 = new JLabel(); final JLabel label8 = new JLabel();
label9.setText("Categorias:"); label8.setText("Categorias:");
contentPane.add(label9, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label8, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JScrollPane scrollPane3 = new JScrollPane(); final JScrollPane scrollPane3 = new JScrollPane();
contentPane.add(scrollPane3, new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane3, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
scrollPane3.setViewportView(categoriasList); scrollPane3.setViewportView(categoriasList);
final JLabel label10 = new JLabel(); final JLabel label9 = new JLabel();
label10.setText("Editorial:"); label9.setText("Editorial:");
contentPane.add(label10, contentPane.add(label9, new GridConstraints(16, 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, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
contentPane.add(editorialCombo, contentPane.add(editorialCombo,
new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, new GridConstraints(17, 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));
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(18, 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));
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(19, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
null, null, 0, false)); null, null, 0, false));
final Spacer spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, contentPane.add(spacer2,
new GridConstraints(21, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
null, null, null, 0, false)); null, null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, contentPane.add(spacer3,
new GridConstraints(21, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new GridConstraints(19, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
null, null, null, 0, false)); null, null, null, 0, false));
} }

View File

@@ -1,14 +1,14 @@
<?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="20" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="20" left="20" bottom="20" right="20"/> <margin top="20" left="20" bottom="20" right="20"/>
<constraints> <constraints>
<xy x="20" y="20" width="500" height="664"/> <xy x="20" y="20" width="500" height="604"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<component id="7dfd" class="javax.swing.JTextField" binding="serieField"> <component id="f3244" class="javax.swing.JTextField" binding="isbnField">
<constraints> <constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
@@ -18,19 +18,9 @@
<editable value="false"/> <editable value="false"/>
</properties> </properties>
</component> </component>
<component id="f3244" class="javax.swing.JTextField" binding="isbnField">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/>
</grid>
</constraints>
<properties>
<editable value="false"/>
</properties>
</component>
<component id="49da" class="javax.swing.JTextField" binding="tituloField"> <component id="49da" class="javax.swing.JTextField" binding="tituloField">
<constraints> <constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -41,7 +31,7 @@
</component> </component>
<component id="a5f4c" class="javax.swing.JTextField" binding="paginasField"> <component id="a5f4c" class="javax.swing.JTextField" binding="paginasField">
<constraints> <constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -51,7 +41,7 @@
</component> </component>
<component id="1bb31" class="javax.swing.JTextField" binding="anoPublicacionField"> <component id="1bb31" class="javax.swing.JTextField" binding="anoPublicacionField">
<constraints> <constraints>
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -61,7 +51,7 @@
</component> </component>
<component id="f8b93" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true"> <component id="f8b93" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
<constraints> <constraints>
<grid row="19" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="17" 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"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -69,7 +59,7 @@
</component> </component>
<component id="b355b" class="javax.swing.JButton" binding="volverButton"> <component id="b355b" class="javax.swing.JButton" binding="volverButton">
<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="18" 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>
@@ -79,7 +69,7 @@
</component> </component>
<scrollpane id="ff034"> <scrollpane id="ff034">
<constraints> <constraints>
<grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="11" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -94,7 +84,7 @@
</scrollpane> </scrollpane>
<scrollpane id="47272"> <scrollpane id="47272">
<constraints> <constraints>
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="13" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -109,7 +99,7 @@
</scrollpane> </scrollpane>
<scrollpane id="5b4f1"> <scrollpane id="5b4f1">
<constraints> <constraints>
<grid row="17" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="15" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -122,17 +112,9 @@
</component> </component>
</children> </children>
</scrollpane> </scrollpane>
<component id="10e24" 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="Nº Serie:"/>
</properties>
</component>
<component id="15" class="javax.swing.JLabel"> <component id="15" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <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> </constraints>
<properties> <properties>
<text value="ISBN:"/> <text value="ISBN:"/>
@@ -140,7 +122,7 @@
</component> </component>
<component id="61c2f" class="javax.swing.JLabel"> <component id="61c2f" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="2" 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> </constraints>
<properties> <properties>
<text value="Titulo:"/> <text value="Titulo:"/>
@@ -148,7 +130,7 @@
</component> </component>
<component id="72cc4" class="javax.swing.JLabel"> <component id="72cc4" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="4" 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> </constraints>
<properties> <properties>
<text value="Nº Paginas:"/> <text value="Nº Paginas:"/>
@@ -156,7 +138,7 @@
</component> </component>
<component id="725bf" class="javax.swing.JLabel"> <component id="725bf" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="6" 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> </constraints>
<properties> <properties>
<text value="Año Publicacion:"/> <text value="Año Publicacion:"/>
@@ -164,7 +146,7 @@
</component> </component>
<component id="3c2eb" class="javax.swing.JLabel"> <component id="3c2eb" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="10" 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> </constraints>
<properties> <properties>
<text value="Idiomas:"/> <text value="Idiomas:"/>
@@ -172,7 +154,7 @@
</component> </component>
<component id="f7906" class="javax.swing.JLabel"> <component id="f7906" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="14" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="12" 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> </constraints>
<properties> <properties>
<text value="Autores:"/> <text value="Autores:"/>
@@ -180,7 +162,7 @@
</component> </component>
<component id="5981d" class="javax.swing.JLabel"> <component id="5981d" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="16" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="14" 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> </constraints>
<properties> <properties>
<text value="Categorias:"/> <text value="Categorias:"/>
@@ -188,7 +170,7 @@
</component> </component>
<component id="dc81" class="javax.swing.JLabel"> <component id="dc81" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="18" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="16" 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> </constraints>
<properties> <properties>
<text value="Editorial:"/> <text value="Editorial:"/>
@@ -196,12 +178,12 @@
</component> </component>
<vspacer id="7f6dd"> <vspacer id="7f6dd">
<constraints> <constraints>
<grid row="21" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</vspacer> </vspacer>
<component id="cd3f9" class="javax.swing.JLabel"> <component id="cd3f9" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="8" 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> </constraints>
<properties> <properties>
<text value="Precio Referencia:"/> <text value="Precio Referencia:"/>
@@ -209,7 +191,7 @@
</component> </component>
<component id="a406" class="javax.swing.JTextField" binding="precioReferenciaField"> <component id="a406" class="javax.swing.JTextField" binding="precioReferenciaField">
<constraints> <constraints>
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="400" height="-1"/> <preferred-size width="400" height="-1"/>
</grid> </grid>
</constraints> </constraints>
@@ -219,12 +201,12 @@
</component> </component>
<hspacer id="a5b67"> <hspacer id="a5b67">
<constraints> <constraints>
<grid row="21" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</hspacer> </hspacer>
<hspacer id="8c06a"> <hspacer id="8c06a">
<constraints> <constraints>
<grid row="21" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="19" 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> </constraints>
</hspacer> </hspacer>
</children> </children>

View File

@@ -25,7 +25,6 @@ import xyz.danielcortes.views.BasePanel;
public class LibroViewPanel extends BasePanel { public class LibroViewPanel extends BasePanel {
private JPanel contentPane; private JPanel contentPane;
private JTextField serieField;
private JTextField isbnField; private JTextField isbnField;
private JTextField tituloField; private JTextField tituloField;
private JTextField paginasField; private JTextField paginasField;
@@ -45,10 +44,6 @@ public class LibroViewPanel extends BasePanel {
return contentPane; return contentPane;
} }
public JTextField getSerieField() {
return serieField;
}
public JTextField getIsbnField() { public JTextField getIsbnField() {
return isbnField; return isbnField;
} }
@@ -120,113 +115,103 @@ 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(20, 20, 20, 20), -1, -1)); contentPane.setLayout(new GridLayoutManager(20, 3, new Insets(20, 20, 20, 20), -1, -1));
serieField = new JTextField();
serieField.setEditable(false);
contentPane.add(serieField,
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));
isbnField = new JTextField(); isbnField = new JTextField();
isbnField.setEditable(false); isbnField.setEditable(false);
contentPane.add(isbnField, contentPane.add(isbnField,
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
tituloField = new JTextField(); tituloField = new JTextField();
tituloField.setEditable(false); tituloField.setEditable(false);
tituloField.setText(""); tituloField.setText("");
contentPane.add(tituloField, contentPane.add(tituloField,
new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
paginasField = new JTextField(); paginasField = new JTextField();
paginasField.setEditable(false); paginasField.setEditable(false);
contentPane.add(paginasField, contentPane.add(paginasField,
new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
anoPublicacionField = new JTextField(); anoPublicacionField = new JTextField();
anoPublicacionField.setEditable(false); anoPublicacionField.setEditable(false);
contentPane.add(anoPublicacionField, contentPane.add(anoPublicacionField,
new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, 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));
contentPane.add(editorialCombo, contentPane.add(editorialCombo,
new GridConstraints(19, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, new GridConstraints(17, 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));
volverButton = new JButton(); volverButton = new JButton();
volverButton.setText("Volver"); volverButton.setText("Volver");
contentPane.add(volverButton, new GridConstraints(20, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, contentPane.add(volverButton, new GridConstraints(18, 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));
final JScrollPane scrollPane1 = new JScrollPane(); final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, new GridConstraints(13, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane1, new GridConstraints(11, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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, new GridConstraints(15, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane2, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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, new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, contentPane.add(scrollPane3, 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, new Dimension(400, -1), null, 0, false)); GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, 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("ISBN:");
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,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label2 = new JLabel(); final JLabel label2 = new JLabel();
label2.setText("ISBN:"); label2.setText("Titulo:");
contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label2, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel(); final JLabel label3 = new JLabel();
label3.setText("Titulo:"); label3.setText("Nº Paginas:");
contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label3, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label4 = new JLabel(); final JLabel label4 = new JLabel();
label4.setText("Nº Paginas:"); label4.setText("Año Publicacion:");
contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label4, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); 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("Idiomas:");
contentPane.add(label5, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label5, new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label6 = new JLabel(); final JLabel label6 = new JLabel();
label6.setText("Idiomas:"); label6.setText("Autores:");
contentPane.add(label6, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label6, new GridConstraints(12, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label7 = new JLabel(); final JLabel label7 = new JLabel();
label7.setText("Autores:"); label7.setText("Categorias:");
contentPane.add(label7, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label7, new GridConstraints(14, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label8 = new JLabel(); final JLabel label8 = new JLabel();
label8.setText("Categorias:"); label8.setText("Editorial:");
contentPane.add(label8, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, contentPane.add(label8, new GridConstraints(16, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label9 = new JLabel();
label9.setText("Editorial:");
contentPane.add(label9, new GridConstraints(18, 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(); 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(19, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
null, null, 0, false)); null, null, 0, false));
final JLabel label10 = new JLabel(); final JLabel label9 = new JLabel();
label10.setText("Precio Referencia:"); label9.setText("Precio Referencia:");
contentPane.add(label10, contentPane.add(label9, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
new GridConstraints(10, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
precioReferenciaField = new JTextField(); precioReferenciaField = new JTextField();
precioReferenciaField.setEditable(false); precioReferenciaField.setEditable(false);
contentPane.add(precioReferenciaField, contentPane.add(precioReferenciaField,
new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, new GridConstraints(9, 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 spacer2 = new Spacer(); final Spacer spacer2 = new Spacer();
contentPane.add(spacer2, contentPane.add(spacer2,
new GridConstraints(21, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new GridConstraints(19, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
null, null, null, 0, false)); null, null, null, 0, false));
final Spacer spacer3 = new Spacer(); final Spacer spacer3 = new Spacer();
contentPane.add(spacer3, contentPane.add(spacer3,
new GridConstraints(21, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
null, null, null, 0, false)); null, null, null, 0, false));
} }