Creada vista de ver autor

Esta sin usar en ninguna parte pero esta creada
This commit is contained in:
Daniel Cortés
2019-05-07 20:02:08 -04:00
parent 64017090b3
commit 0868bc13c2
3 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package xyz.danielcortes.controllers.autor;
import xyz.danielcortes.models.Autor;
import xyz.danielcortes.views.autor.AutorViewPanel;
public class AutorViewController {
private AutorViewPanel view;
private Autor autor;
public AutorViewController(AutorViewPanel view, Autor autor){
this.view = view;
this.autor = autor;
this.fillAutor();
}
private void fillAutor() {
this.view.getNombreField().setText(this.autor.getNombre());
this.view.getApellidoPaternoField().setText(this.autor.getApellidoPaterno());
this.view.getApellidoMaternoField().setText(this.autor.getApellidoMaterno());
}
}

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.autor.AutorViewPanel">
<grid id="27dc6" layout-manager="GridLayoutManager" row-count="8" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="7a2da" 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="Nombre:"/>
</properties>
</component>
<component id="7e150" class="javax.swing.JTextField" binding="nombreField">
<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>
<editable value="false"/>
<enabled value="false"/>
</properties>
</component>
<component id="8b4b2" class="javax.swing.JLabel">
<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"/>
</constraints>
<properties>
<text value="Apellido Paterno:"/>
</properties>
</component>
<component id="7e46d" class="javax.swing.JTextField" binding="apellidoPaternoField">
<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"/>
<enabled value="false"/>
</properties>
</component>
<component id="e4aeb" class="javax.swing.JLabel">
<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"/>
</constraints>
<properties>
<text value="Apellido Materno:"/>
</properties>
</component>
<component id="67fe6" class="javax.swing.JTextField" binding="apellidoMaternoField">
<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">
<preferred-size width="400" height="-1"/>
</grid>
</constraints>
<properties>
<editable value="false"/>
<enabled value="false"/>
</properties>
</component>
<component id="107b1" class="javax.swing.JButton" binding="volverButton" default-binding="true">
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Volver"/>
</properties>
</component>
<vspacer id="31a4">
<constraints>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<hspacer id="28129">
<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"/>
</constraints>
</hspacer>
<hspacer id="69f08">
<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"/>
</constraints>
</hspacer>
</children>
</grid>
</form>

View File

@@ -0,0 +1,28 @@
package xyz.danielcortes.views.autor;
import javax.swing.JButton;
import javax.swing.JTextField;
public class AutorViewPanel {
private JTextField nombreField;
private JTextField apellidoPaternoField;
private JTextField apellidoMaternoField;
private JButton volverButton;
public JTextField getNombreField() {
return nombreField;
}
public JTextField getApellidoPaternoField() {
return apellidoPaternoField;
}
public JTextField getApellidoMaternoField() {
return apellidoMaternoField;
}
public JButton getVolverButton() {
return volverButton;
}
}