Cosas, cambio el mantenedor de editorial
This commit is contained in:
BIN
biblioteca.vpp
BIN
biblioteca.vpp
Binary file not shown.
@@ -16,8 +16,9 @@ import xyz.danielcortes.controllers.categoria.CategoriaSearchController;
|
|||||||
import xyz.danielcortes.controllers.categoria.CategoriaUpdateController;
|
import xyz.danielcortes.controllers.categoria.CategoriaUpdateController;
|
||||||
import xyz.danielcortes.controllers.categoria.CategoriaViewController;
|
import xyz.danielcortes.controllers.categoria.CategoriaViewController;
|
||||||
import xyz.danielcortes.controllers.editorial.EditorialCreateController;
|
import xyz.danielcortes.controllers.editorial.EditorialCreateController;
|
||||||
import xyz.danielcortes.controllers.editorial.EditorialListController;
|
import xyz.danielcortes.controllers.editorial.EditorialSearchController;
|
||||||
import xyz.danielcortes.controllers.editorial.EditorialUpdateController;
|
import xyz.danielcortes.controllers.editorial.EditorialUpdateController;
|
||||||
|
import xyz.danielcortes.controllers.editorial.EditorialViewController;
|
||||||
import xyz.danielcortes.controllers.idioma.IdiomaCreateController;
|
import xyz.danielcortes.controllers.idioma.IdiomaCreateController;
|
||||||
import xyz.danielcortes.controllers.idioma.IdiomaListController;
|
import xyz.danielcortes.controllers.idioma.IdiomaListController;
|
||||||
import xyz.danielcortes.controllers.idioma.IdiomaUpdateController;
|
import xyz.danielcortes.controllers.idioma.IdiomaUpdateController;
|
||||||
@@ -35,8 +36,9 @@ import xyz.danielcortes.views.categoria.CategoriaSearchPanel;
|
|||||||
import xyz.danielcortes.views.categoria.CategoriaUpdatePanel;
|
import xyz.danielcortes.views.categoria.CategoriaUpdatePanel;
|
||||||
import xyz.danielcortes.views.categoria.CategoriaViewPanel;
|
import xyz.danielcortes.views.categoria.CategoriaViewPanel;
|
||||||
import xyz.danielcortes.views.editorial.EditorialCreatePanel;
|
import xyz.danielcortes.views.editorial.EditorialCreatePanel;
|
||||||
import xyz.danielcortes.views.editorial.EditorialListPanel;
|
import xyz.danielcortes.views.editorial.EditorialSearchPanel;
|
||||||
import xyz.danielcortes.views.editorial.EditorialUpdatePanel;
|
import xyz.danielcortes.views.editorial.EditorialUpdatePanel;
|
||||||
|
import xyz.danielcortes.views.editorial.EditorialViewPanel;
|
||||||
import xyz.danielcortes.views.idioma.IdiomaCreatePanel;
|
import xyz.danielcortes.views.idioma.IdiomaCreatePanel;
|
||||||
import xyz.danielcortes.views.idioma.IdiomaListPanel;
|
import xyz.danielcortes.views.idioma.IdiomaListPanel;
|
||||||
import xyz.danielcortes.views.idioma.IdiomaUpdatePanel;
|
import xyz.danielcortes.views.idioma.IdiomaUpdatePanel;
|
||||||
@@ -80,13 +82,14 @@ public class LaunchController {
|
|||||||
this.controllers.put(PanelName.CATEGORIA_UPDATE, new CategoriaUpdateController(new CategoriaUpdatePanel(), this));
|
this.controllers.put(PanelName.CATEGORIA_UPDATE, new CategoriaUpdateController(new CategoriaUpdatePanel(), this));
|
||||||
this.controllers.put(PanelName.CATEGORIA_VIEW, new CategoriaViewController(new CategoriaViewPanel(), this));
|
this.controllers.put(PanelName.CATEGORIA_VIEW, new CategoriaViewController(new CategoriaViewPanel(), this));
|
||||||
|
|
||||||
this.controllers.put(PanelName.EDITORIAL_SEARCH, new EditorialListController(new EditorialListPanel(), this));
|
this.controllers.put(PanelName.EDITORIAL_VIEW, new EditorialViewController(new EditorialViewPanel(), this));
|
||||||
|
this.controllers.put(PanelName.EDITORIAL_SEARCH, new EditorialSearchController(new EditorialSearchPanel(), this));
|
||||||
this.controllers.put(PanelName.EDITORIAL_CREATE, new EditorialCreateController(new EditorialCreatePanel(), this));
|
this.controllers.put(PanelName.EDITORIAL_CREATE, new EditorialCreateController(new EditorialCreatePanel(), this));
|
||||||
this.controllers.put(PanelName.EDITORIAL_UPDATE, new EditorialUpdateController(new EditorialUpdatePanel(), this));
|
this.controllers.put(PanelName.EDITORIAL_UPDATE, new EditorialUpdateController(new EditorialUpdatePanel(), this));
|
||||||
|
|
||||||
|
|
||||||
for (PanelName name : this.controllers.keySet()) {
|
for (PanelName name : this.controllers.keySet()) {
|
||||||
BaseController controller = this.controllers.get(name);
|
BaseController controller = this.controllers.get(name);
|
||||||
controller.show();
|
|
||||||
this.frame.addCard(controller.getView().getContentPane(), name);
|
this.frame.addCard(controller.getView().getContentPane(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
package xyz.danielcortes.controllers.editorial;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import xyz.danielcortes.controllers.BaseController;
|
|
||||||
import xyz.danielcortes.controllers.LaunchController;
|
|
||||||
import xyz.danielcortes.framework.BaseTableModel;
|
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.repository.EditorialRepository;
|
|
||||||
import xyz.danielcortes.views.BasePanel;
|
|
||||||
import xyz.danielcortes.views.editorial.EditorialListPanel;
|
|
||||||
|
|
||||||
public class EditorialListController extends BaseController {
|
|
||||||
private EditorialListPanel view;
|
|
||||||
private EditorialRepository editorialRepository;
|
|
||||||
|
|
||||||
public EditorialListController(EditorialListPanel view, LaunchController parent) {
|
|
||||||
super(parent);
|
|
||||||
this.view = view;
|
|
||||||
this.editorialRepository = new EditorialRepository();
|
|
||||||
this.loadEditorialTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void show() {
|
|
||||||
this.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reload() {
|
|
||||||
this.loadEditorialTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadEditorialTable(){
|
|
||||||
List<Editorial> editoriales = this.editorialRepository.getAll();
|
|
||||||
BaseTableModel<Editorial> model = this.view.getEditorialModel();
|
|
||||||
model.setRows(editoriales);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BasePanel getView() {
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package xyz.danielcortes.controllers.editorial;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import xyz.danielcortes.controllers.BaseController;
|
||||||
|
import xyz.danielcortes.controllers.LaunchController;
|
||||||
|
import xyz.danielcortes.framework.BaseTableModel;
|
||||||
|
import xyz.danielcortes.framework.PanelName;
|
||||||
|
import xyz.danielcortes.models.Editorial;
|
||||||
|
import xyz.danielcortes.repository.EditorialRepository;
|
||||||
|
import xyz.danielcortes.views.BasePanel;
|
||||||
|
import xyz.danielcortes.views.editorial.EditorialSearchPanel;
|
||||||
|
|
||||||
|
public class EditorialSearchController extends BaseController {
|
||||||
|
private EditorialSearchPanel view;
|
||||||
|
private EditorialRepository editorialRepository;
|
||||||
|
private EditorialValidator validator;
|
||||||
|
|
||||||
|
public EditorialSearchController(EditorialSearchPanel view, LaunchController parent) {
|
||||||
|
super(parent);
|
||||||
|
this.view = view;
|
||||||
|
this.editorialRepository = new EditorialRepository();
|
||||||
|
this.validator = new EditorialValidator(this.editorialRepository);
|
||||||
|
this.loadEditorialTable();
|
||||||
|
this.setupListeners();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reload() {
|
||||||
|
this.loadEditorialTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupListeners(){
|
||||||
|
this.view.getBuscarButton().addActionListener(e -> search());
|
||||||
|
this.view.getBuscarField().addActionListener(e -> search());
|
||||||
|
this.view.getEliminarButton().addActionListener(e -> delete());
|
||||||
|
this.view.getEditarButton().addActionListener(e -> edit());
|
||||||
|
this.view.getVerButton().addActionListener(e -> view());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void view() {
|
||||||
|
Editorial editorial = this.getSelectedEditorial();
|
||||||
|
if(editorial != null) {
|
||||||
|
EditorialViewController controller = (EditorialViewController) this.getParentController().getCard(PanelName.EDITORIAL_VIEW);
|
||||||
|
controller.setEditorial(editorial);
|
||||||
|
this.getParentController().showCard(PanelName.EDITORIAL_VIEW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void edit() {
|
||||||
|
Editorial editorial = this.getSelectedEditorial();
|
||||||
|
if(editorial != null) {
|
||||||
|
EditorialUpdateController controller = (EditorialUpdateController) this.getParentController().getCard(PanelName.EDITORIAL_UPDATE);
|
||||||
|
controller.setEditorial(editorial);
|
||||||
|
this.getParentController().showCard(PanelName.EDITORIAL_UPDATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void delete() {
|
||||||
|
Editorial editorial = this.getSelectedEditorial();
|
||||||
|
if (editorial == null)
|
||||||
|
return;
|
||||||
|
if(!this.validator.isDeleteable(editorial))
|
||||||
|
return;
|
||||||
|
|
||||||
|
int option = JOptionPane.showConfirmDialog(
|
||||||
|
null,
|
||||||
|
"¿Estas seguro de que deseas eliminar la editorial?",
|
||||||
|
"Confirmacion",
|
||||||
|
JOptionPane.YES_NO_OPTION,
|
||||||
|
JOptionPane.QUESTION_MESSAGE
|
||||||
|
);
|
||||||
|
if (option == JOptionPane.NO_OPTION)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.editorialRepository.delete(editorial);
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void search() {
|
||||||
|
String term = this.view.getBuscarField().getText();
|
||||||
|
List<Editorial> editoriales = this.editorialRepository.search(term);
|
||||||
|
this.loadEditorialTable(editoriales);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadEditorialTable(List<Editorial> editoriales){
|
||||||
|
BaseTableModel<Editorial> model = this.view.getEditorialModel();
|
||||||
|
model.setRows(editoriales);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadEditorialTable(){
|
||||||
|
List<Editorial> editoriales = this.editorialRepository.getAll();
|
||||||
|
loadEditorialTable(editoriales);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Editorial getSelectedEditorial() {
|
||||||
|
int selectedRow = this.view.getEditorialTable().getSelectedRow();
|
||||||
|
if (selectedRow == -1) {
|
||||||
|
JOptionPane.showMessageDialog(
|
||||||
|
null,
|
||||||
|
"No hay editorial seleccionada",
|
||||||
|
"Error",
|
||||||
|
JOptionPane.ERROR_MESSAGE
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.view.getEditorialModel().getRow(selectedRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BasePanel getView() {
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package xyz.danielcortes.controllers.editorial;
|
package xyz.danielcortes.controllers.editorial;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import xyz.danielcortes.controllers.BaseController;
|
import xyz.danielcortes.controllers.BaseController;
|
||||||
import xyz.danielcortes.controllers.LaunchController;
|
import xyz.danielcortes.controllers.LaunchController;
|
||||||
|
import xyz.danielcortes.framework.PanelName;
|
||||||
import xyz.danielcortes.models.Editorial;
|
import xyz.danielcortes.models.Editorial;
|
||||||
import xyz.danielcortes.repository.EditorialRepository;
|
import xyz.danielcortes.repository.EditorialRepository;
|
||||||
import xyz.danielcortes.views.BasePanel;
|
import xyz.danielcortes.views.BasePanel;
|
||||||
@@ -14,6 +13,7 @@ public class EditorialUpdateController extends BaseController {
|
|||||||
private EditorialUpdatePanel view;
|
private EditorialUpdatePanel view;
|
||||||
private EditorialRepository editorialRepository;
|
private EditorialRepository editorialRepository;
|
||||||
private EditorialValidator validator;
|
private EditorialValidator validator;
|
||||||
|
private Editorial editorial;
|
||||||
|
|
||||||
public EditorialUpdateController(EditorialUpdatePanel view, LaunchController parent) {
|
public EditorialUpdateController(EditorialUpdatePanel view, LaunchController parent) {
|
||||||
super(parent);
|
super(parent);
|
||||||
@@ -25,50 +25,35 @@ public class EditorialUpdateController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
this.reload();
|
if(this.editorial == null)
|
||||||
this.view.getEditorialCombo().requestFocus();
|
return;
|
||||||
|
|
||||||
|
this.view.getNombreField().setText(this.editorial.getNombre());
|
||||||
|
this.view.getNombreField().requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEditorial(Editorial editorial) {
|
||||||
|
this.editorial = editorial;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupListeners() {
|
private void setupListeners() {
|
||||||
this.view.getEditorialCombo().addActionListener(e -> {
|
|
||||||
Editorial selected = (Editorial) this.view.getEditorialCombo().getSelectedItem();
|
|
||||||
if (selected != null)
|
|
||||||
this.view.getNombreField().setText(selected.getNombre());
|
|
||||||
});
|
|
||||||
this.view.getNombreField().addActionListener(e -> this.update());
|
this.view.getNombreField().addActionListener(e -> this.update());
|
||||||
this.view.getActualizarButton().addActionListener(e -> this.update());
|
this.view.getActualizarButton().addActionListener(e -> this.update());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
Editorial original = (Editorial) this.view.getEditorialCombo().getSelectedItem();
|
if (!this.validator.validateOriginal(this.editorial))
|
||||||
if (!this.validator.validateOriginal(original))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String nombre = this.view.getNombreField().getText();
|
String nombre = this.view.getNombreField().getText();
|
||||||
if (!this.validator.validateNombre(nombre))
|
if (!this.validator.validateNombre(nombre))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
assert original != null;
|
assert this.editorial != null;
|
||||||
original.setNombre(nombre);
|
this.editorial.setNombre(nombre);
|
||||||
this.editorialRepository.update(original);
|
this.editorialRepository.update(this.editorial);
|
||||||
|
|
||||||
this.view.getNombreField().setText("");
|
this.getParentController().showCard(PanelName.EDITORIAL_SEARCH);
|
||||||
this.loadEditorialCombo();
|
|
||||||
this.view.getNombreField().requestFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void reload() {
|
|
||||||
this.loadEditorialCombo();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadEditorialCombo() {
|
|
||||||
List<Editorial> editoriales = this.editorialRepository.getAll();
|
|
||||||
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
|
||||||
combobox.removeAllItems();
|
|
||||||
for(Editorial editorial: editoriales) {
|
|
||||||
combobox.addItem(editorial);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasePanel getView() {
|
public BasePanel getView() {
|
||||||
|
|||||||
@@ -44,4 +44,17 @@ public class EditorialValidator {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDeleteable(Editorial editorial){
|
||||||
|
if(editorial.getLibros().size() > 0){
|
||||||
|
JOptionPane.showMessageDialog(
|
||||||
|
null,
|
||||||
|
"No se puede eliminar la editorial ya que tiene libros asociados",
|
||||||
|
"Error",
|
||||||
|
JOptionPane.ERROR_MESSAGE
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package xyz.danielcortes.controllers.editorial;
|
||||||
|
|
||||||
|
import xyz.danielcortes.controllers.BaseController;
|
||||||
|
import xyz.danielcortes.controllers.LaunchController;
|
||||||
|
import xyz.danielcortes.framework.PanelName;
|
||||||
|
import xyz.danielcortes.models.Editorial;
|
||||||
|
import xyz.danielcortes.views.BasePanel;
|
||||||
|
import xyz.danielcortes.views.editorial.EditorialViewPanel;
|
||||||
|
|
||||||
|
public class EditorialViewController extends BaseController {
|
||||||
|
private Editorial editorial;
|
||||||
|
private EditorialViewPanel view;
|
||||||
|
|
||||||
|
public EditorialViewController(EditorialViewPanel view, LaunchController parent) {
|
||||||
|
super(parent);
|
||||||
|
this.view = view;
|
||||||
|
this.setupListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
this.fillEditorial();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEditorial(Editorial editorial){
|
||||||
|
this.editorial = editorial;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupListeners(){
|
||||||
|
this.view.getVolverButton().addActionListener(e -> {
|
||||||
|
this.getParentController().showCard(PanelName.EDITORIAL_SEARCH);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillEditorial() {
|
||||||
|
if(editorial == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.view.getNombreField().setText(this.editorial.getNombre());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasePanel getView() {
|
||||||
|
return this.view;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,22 +6,20 @@ public enum PanelName {
|
|||||||
LIBRO_SEARCH,
|
LIBRO_SEARCH,
|
||||||
LIBRO_CREATE,
|
LIBRO_CREATE,
|
||||||
LIBRO_UPDATE,
|
LIBRO_UPDATE,
|
||||||
LIBRO_DELETE,
|
|
||||||
|
|
||||||
IDIOMA_SEARCH,
|
IDIOMA_SEARCH,
|
||||||
IDIOMA_CREATE,
|
IDIOMA_CREATE,
|
||||||
IDIOMA_UPDATE,
|
IDIOMA_UPDATE,
|
||||||
IDIOMA_DELETE,
|
|
||||||
|
|
||||||
CATEGORIA_VIEW,
|
CATEGORIA_VIEW,
|
||||||
CATEGORIA_SEARCH,
|
CATEGORIA_SEARCH,
|
||||||
CATEGORIA_CREATE,
|
CATEGORIA_CREATE,
|
||||||
CATEGORIA_UPDATE,
|
CATEGORIA_UPDATE,
|
||||||
|
|
||||||
|
EDITORIAL_VIEW,
|
||||||
EDITORIAL_SEARCH,
|
EDITORIAL_SEARCH,
|
||||||
EDITORIAL_CREATE,
|
EDITORIAL_CREATE,
|
||||||
EDITORIAL_UPDATE,
|
EDITORIAL_UPDATE,
|
||||||
EDITORIAL_DELETE,
|
|
||||||
|
|
||||||
AUTOR_VIEW,
|
AUTOR_VIEW,
|
||||||
AUTOR_SEARCH,
|
AUTOR_SEARCH,
|
||||||
|
|||||||
@@ -1,97 +0,0 @@
|
|||||||
package xyz.danielcortes.views.editorial;
|
|
||||||
|
|
||||||
import com.intellij.uiDesigner.core.GridConstraints;
|
|
||||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
|
||||||
import com.intellij.uiDesigner.core.Spacer;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Insets;
|
|
||||||
import javax.swing.DefaultComboBoxModel;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JComponent;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.views.BasePanel;
|
|
||||||
|
|
||||||
public class EditorialDeletePanel extends BasePanel {
|
|
||||||
|
|
||||||
private JPanel contentPane;
|
|
||||||
private JComboBox<Editorial> editorialCombo;
|
|
||||||
private DefaultComboBoxModel<Editorial> editorialModel;
|
|
||||||
private JButton eliminarButton;
|
|
||||||
|
|
||||||
public JPanel getContentPane() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JComboBox<Editorial> getEditorialCombo() {
|
|
||||||
return editorialCombo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DefaultComboBoxModel<Editorial> getEditorialModel() {
|
|
||||||
return editorialModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JButton getEliminarButton() {
|
|
||||||
return eliminarButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.editorialModel = new DefaultComboBoxModel<>();
|
|
||||||
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
|
||||||
* call it in your code!
|
|
||||||
*
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
private void $$$setupUI$$$() {
|
|
||||||
createUIComponents();
|
|
||||||
contentPane = new JPanel();
|
|
||||||
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1));
|
|
||||||
contentPane.add(editorialCombo, 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 label1 = new JLabel();
|
|
||||||
label1.setText("Editorial:");
|
|
||||||
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));
|
|
||||||
eliminarButton = new JButton();
|
|
||||||
eliminarButton.setText("Eliminar");
|
|
||||||
contentPane.add(eliminarButton,
|
|
||||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
|
||||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
|
||||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
|
||||||
final Spacer spacer1 = new Spacer();
|
|
||||||
contentPane.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
|
||||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
|
||||||
false));
|
|
||||||
final Spacer spacer2 = new Spacer();
|
|
||||||
contentPane.add(spacer2, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
|
||||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
|
||||||
0, false));
|
|
||||||
final Spacer spacer3 = new Spacer();
|
|
||||||
contentPane.add(spacer3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
|
||||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
|
||||||
0, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
public JComponent $$$getRootComponent$$$() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.editorial.EditorialListPanel">
|
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
|
||||||
<constraints>
|
|
||||||
<xy x="20" y="20" width="500" height="400"/>
|
|
||||||
</constraints>
|
|
||||||
<properties/>
|
|
||||||
<border type="none"/>
|
|
||||||
<children>
|
|
||||||
<scrollpane id="5e7a3">
|
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="0" 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"/>
|
|
||||||
</grid>
|
|
||||||
</constraints>
|
|
||||||
<properties/>
|
|
||||||
<border type="none"/>
|
|
||||||
<children>
|
|
||||||
<component id="285b9" class="javax.swing.JTable" binding="editorialTable" custom-create="true">
|
|
||||||
<constraints/>
|
|
||||||
<properties/>
|
|
||||||
</component>
|
|
||||||
</children>
|
|
||||||
</scrollpane>
|
|
||||||
</children>
|
|
||||||
</grid>
|
|
||||||
</form>
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package xyz.danielcortes.views.editorial;
|
|
||||||
|
|
||||||
import com.intellij.uiDesigner.core.GridConstraints;
|
|
||||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Insets;
|
|
||||||
import javax.swing.JComponent;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JTable;
|
|
||||||
import xyz.danielcortes.framework.BaseTableModel;
|
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.views.BasePanel;
|
|
||||||
|
|
||||||
public class EditorialListPanel extends BasePanel {
|
|
||||||
|
|
||||||
private JPanel contentPane;
|
|
||||||
private JTable editorialTable;
|
|
||||||
private BaseTableModel<Editorial> editorialModel;
|
|
||||||
|
|
||||||
public JPanel getContentPane() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JTable getEditorialTable() {
|
|
||||||
return editorialTable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaseTableModel<Editorial> getEditorialModel() {
|
|
||||||
return editorialModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createEditorialTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void createEditorialTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.editorialModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Nombre", "Nº Libros"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch(colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNombre();
|
|
||||||
case 1: return row.get(rowIndex).getLibros().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.editorialTable = new JTable(this.editorialModel);
|
|
||||||
// @formatter:on
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
|
||||||
* call it in your code!
|
|
||||||
*
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
private void $$$setupUI$$$() {
|
|
||||||
createUIComponents();
|
|
||||||
contentPane = new JPanel();
|
|
||||||
contentPane.setLayout(new GridLayoutManager(1, 1, new Insets(20, 20, 20, 20), -1, -1));
|
|
||||||
final JScrollPane scrollPane1 = new JScrollPane();
|
|
||||||
contentPane.add(scrollPane1,
|
|
||||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
|
||||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
|
||||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
|
||||||
new Dimension(400, -1), null, 0, false));
|
|
||||||
scrollPane1.setViewportView(editorialTable);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
public JComponent $$$getRootComponent$$$() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.editorial.EditorialSearchPanel">
|
||||||
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
|
<constraints>
|
||||||
|
<xy x="20" y="20" width="500" height="400"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<scrollpane id="5e7a3">
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" 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"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="285b9" class="javax.swing.JTable" binding="editorialTable" custom-create="true">
|
||||||
|
<constraints/>
|
||||||
|
<properties/>
|
||||||
|
</component>
|
||||||
|
</children>
|
||||||
|
</scrollpane>
|
||||||
|
<grid id="4c5af" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="321a9" class="javax.swing.JButton" binding="buscarButton" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Buscar"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="e3030" class="javax.swing.JTextField" binding="buscarField">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" 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="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
</component>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
|
<grid id="42238" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
|
<constraints>
|
||||||
|
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="1abb7" class="javax.swing.JButton" binding="verButton" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Ver"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="4dbb2" class="javax.swing.JButton" binding="editarButton" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Editar"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="279e1" class="javax.swing.JButton" binding="eliminarButton" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Eliminar"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
package xyz.danielcortes.views.editorial;
|
||||||
|
|
||||||
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import xyz.danielcortes.framework.BaseTableModel;
|
||||||
|
import xyz.danielcortes.models.Editorial;
|
||||||
|
import xyz.danielcortes.views.BasePanel;
|
||||||
|
|
||||||
|
public class EditorialSearchPanel extends BasePanel {
|
||||||
|
|
||||||
|
private JPanel contentPane;
|
||||||
|
private JTable editorialTable;
|
||||||
|
private JButton buscarButton;
|
||||||
|
private JTextField buscarField;
|
||||||
|
private JButton verButton;
|
||||||
|
private JButton editarButton;
|
||||||
|
private JButton eliminarButton;
|
||||||
|
private BaseTableModel<Editorial> editorialModel;
|
||||||
|
|
||||||
|
public JPanel getContentPane() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTable getEditorialTable() {
|
||||||
|
return editorialTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaseTableModel<Editorial> getEditorialModel() {
|
||||||
|
return editorialModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getBuscarButton() {
|
||||||
|
return buscarButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextField getBuscarField() {
|
||||||
|
return buscarField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getVerButton() {
|
||||||
|
return verButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getEditarButton() {
|
||||||
|
return editarButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getEliminarButton() {
|
||||||
|
return eliminarButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createEditorialTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createEditorialTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.editorialModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Nombre", "Nº Libros"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch(colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNombre();
|
||||||
|
case 1: return row.get(rowIndex).getLibros().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.editorialTable = new JTable(this.editorialModel);
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
|
*
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private void $$$setupUI$$$() {
|
||||||
|
createUIComponents();
|
||||||
|
contentPane = new JPanel();
|
||||||
|
contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(20, 20, 20, 20), -1, -1));
|
||||||
|
final JScrollPane scrollPane1 = new JScrollPane();
|
||||||
|
contentPane.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(400, -1), null, 0, false));
|
||||||
|
scrollPane1.setViewportView(editorialTable);
|
||||||
|
final JPanel panel1 = new JPanel();
|
||||||
|
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
buscarButton = new JButton();
|
||||||
|
buscarButton.setText("Buscar");
|
||||||
|
panel1.add(buscarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||||
|
null, 0, false));
|
||||||
|
buscarField = new JTextField();
|
||||||
|
panel1.add(buscarField,
|
||||||
|
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||||
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
|
final JPanel panel2 = new JPanel();
|
||||||
|
panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
verButton = new JButton();
|
||||||
|
verButton.setText("Ver");
|
||||||
|
panel2.add(verButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||||
|
null, 0, false));
|
||||||
|
editarButton = new JButton();
|
||||||
|
editarButton.setText("Editar");
|
||||||
|
panel2.add(editarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||||
|
null, 0, false));
|
||||||
|
eliminarButton = new JButton();
|
||||||
|
eliminarButton.setText("Eliminar");
|
||||||
|
panel2.add(eliminarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||||
|
null, 0, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,38 +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.editorial.EditorialUpdatePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.editorial.EditorialUpdatePanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" 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="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="484" height="214"/>
|
<xy x="20" y="20" width="484" height="154"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="faf3" class="javax.swing.JTextField" binding="nombreField">
|
<component id="faf3" class="javax.swing.JTextField" binding="nombreField">
|
||||||
<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="e88f4" 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="Nombre:"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="4c101" 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="Editorial:"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="fbcb4" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
|
|
||||||
<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"/>
|
||||||
@@ -40,24 +16,32 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
|
<component id="e88f4" 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>
|
||||||
<vspacer id="d3329">
|
<vspacer id="d3329">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" 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="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</vspacer>
|
</vspacer>
|
||||||
<hspacer id="76a13">
|
<hspacer id="76a13">
|
||||||
<constraints>
|
<constraints>
|
||||||
<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"/>
|
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</hspacer>
|
</hspacer>
|
||||||
<hspacer id="1d353">
|
<hspacer id="1d353">
|
||||||
<constraints>
|
<constraints>
|
||||||
<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"/>
|
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</hspacer>
|
</hspacer>
|
||||||
<component id="84fc7" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
|
<component id="84fc7" class="javax.swing.JButton" binding="actualizarButton" default-binding="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Actualizar"/>
|
<text value="Actualizar"/>
|
||||||
|
|||||||
@@ -5,22 +5,17 @@ import com.intellij.uiDesigner.core.GridLayoutManager;
|
|||||||
import com.intellij.uiDesigner.core.Spacer;
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import javax.swing.DefaultComboBoxModel;
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.views.BasePanel;
|
import xyz.danielcortes.views.BasePanel;
|
||||||
|
|
||||||
public class EditorialUpdatePanel extends BasePanel {
|
public class EditorialUpdatePanel extends BasePanel {
|
||||||
|
|
||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JComboBox<Editorial> editorialCombo;
|
|
||||||
private DefaultComboBoxModel<Editorial> editorialModel;
|
|
||||||
private JButton actualizarButton;
|
private JButton actualizarButton;
|
||||||
|
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
@@ -30,24 +25,10 @@ public class EditorialUpdatePanel extends BasePanel {
|
|||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return nombreField;
|
return nombreField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JComboBox<Editorial> getEditorialCombo() {
|
|
||||||
return editorialCombo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DefaultComboBoxModel<Editorial> getEditorialModel() {
|
|
||||||
return editorialModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JButton getActualizarButton() {
|
public JButton getActualizarButton() {
|
||||||
return actualizarButton;
|
return actualizarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.editorialModel = new DefaultComboBoxModel<>();
|
|
||||||
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
// >>> IMPORTANT!! <<<
|
// >>> IMPORTANT!! <<<
|
||||||
@@ -56,52 +37,37 @@ public class EditorialUpdatePanel extends BasePanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
* call it in your code!
|
|
||||||
*
|
*
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
private void $$$setupUI$$$() {
|
private void $$$setupUI$$$() {
|
||||||
createUIComponents();
|
|
||||||
contentPane = new JPanel();
|
contentPane = new JPanel();
|
||||||
contentPane.setLayout(new GridLayoutManager(6, 3, new Insets(20, 20, 20, 20), -1, -1));
|
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1));
|
||||||
nombreField = new JTextField();
|
nombreField = new JTextField();
|
||||||
contentPane.add(nombreField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
contentPane.add(nombreField,
|
||||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
||||||
final JLabel label1 = new JLabel();
|
final JLabel label1 = new JLabel();
|
||||||
label1.setText("Nombre:");
|
label1.setText("Nombre:");
|
||||||
contentPane.add(label1,
|
contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
|
||||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
|
||||||
false));
|
|
||||||
final JLabel label2 = new JLabel();
|
|
||||||
label2.setText("Editorial:");
|
|
||||||
contentPane.add(label2,
|
|
||||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
|
||||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
|
||||||
false));
|
|
||||||
contentPane.add(editorialCombo, 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 Spacer spacer1 = new Spacer();
|
final Spacer spacer1 = new Spacer();
|
||||||
contentPane.add(spacer1, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
contentPane.add(spacer1,
|
||||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||||
false));
|
null, null, 0, false));
|
||||||
final Spacer spacer2 = new Spacer();
|
final Spacer spacer2 = new Spacer();
|
||||||
contentPane.add(spacer2, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
contentPane.add(spacer2,
|
||||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
|
||||||
0, false));
|
null, null, 0, false));
|
||||||
final Spacer spacer3 = new Spacer();
|
final Spacer spacer3 = new Spacer();
|
||||||
contentPane.add(spacer3, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
contentPane.add(spacer3,
|
||||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
|
||||||
0, false));
|
null, null, 0, false));
|
||||||
actualizarButton = new JButton();
|
actualizarButton = new JButton();
|
||||||
actualizarButton.setText("Actualizar");
|
actualizarButton.setText("Actualizar");
|
||||||
contentPane.add(actualizarButton,
|
contentPane.add(actualizarButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
|
||||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,4 +76,5 @@ public class EditorialUpdatePanel extends BasePanel {
|
|||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?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.editorial.EditorialDeletePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.editorial.EditorialViewPanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
@@ -8,45 +8,49 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="cd284" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
|
<vspacer id="f48a">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
</vspacer>
|
||||||
|
<hspacer id="cd1c3">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
</hspacer>
|
||||||
|
<hspacer id="66a37">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
</hspacer>
|
||||||
|
<component id="b8e06" 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="1e63f" class="javax.swing.JTextField" binding="nombreField">
|
||||||
<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"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
|
||||||
</component>
|
|
||||||
<component id="36ce" 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>
|
<properties>
|
||||||
<text value="Editorial:"/>
|
<editable value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="9e3eb" class="javax.swing.JButton" binding="eliminarButton" default-binding="true">
|
<component id="f1834" class="javax.swing.JButton" binding="volverButton" default-binding="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Eliminar"/>
|
<text value="Volver"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<vspacer id="c8547">
|
|
||||||
<constraints>
|
|
||||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
</vspacer>
|
|
||||||
<hspacer id="f20bb">
|
|
||||||
<constraints>
|
|
||||||
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
</hspacer>
|
|
||||||
<hspacer id="fb8bc">
|
|
||||||
<constraints>
|
|
||||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
</hspacer>
|
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package xyz.danielcortes.views.editorial;
|
||||||
|
|
||||||
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import xyz.danielcortes.views.BasePanel;
|
||||||
|
|
||||||
|
public class EditorialViewPanel extends BasePanel {
|
||||||
|
|
||||||
|
private JPanel contentPane;
|
||||||
|
private JTextField nombreField;
|
||||||
|
private JButton volverButton;
|
||||||
|
|
||||||
|
public JPanel getContentPane() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JTextField getNombreField() {
|
||||||
|
return nombreField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JButton getVolverButton() {
|
||||||
|
return volverButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
|
*
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private void $$$setupUI$$$() {
|
||||||
|
contentPane = new JPanel();
|
||||||
|
contentPane.setLayout(new GridLayoutManager(4, 3, new Insets(20, 20, 20, 20), -1, -1));
|
||||||
|
final Spacer spacer1 = new Spacer();
|
||||||
|
contentPane.add(spacer1,
|
||||||
|
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||||
|
null, null, 0, false));
|
||||||
|
final Spacer spacer2 = new Spacer();
|
||||||
|
contentPane.add(spacer2,
|
||||||
|
new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
|
||||||
|
null, null, 0, false));
|
||||||
|
final Spacer spacer3 = new Spacer();
|
||||||
|
contentPane.add(spacer3,
|
||||||
|
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null,
|
||||||
|
null, null, 0, false));
|
||||||
|
final JLabel label1 = new JLabel();
|
||||||
|
label1.setText("Nombre:");
|
||||||
|
contentPane.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
|
||||||
|
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
nombreField = new JTextField();
|
||||||
|
nombreField.setEditable(false);
|
||||||
|
contentPane.add(nombreField,
|
||||||
|
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));
|
||||||
|
volverButton = new JButton();
|
||||||
|
volverButton.setText("Volver");
|
||||||
|
contentPane.add(volverButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
|
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1),
|
||||||
|
null, 0, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user