Files
2025-06-09 13:37:06 +02:00

321 lines
8.8 KiB
Java

/*
* Created on 28-sep-2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.tarisan.chipcard.gui;
import java.awt.*;
import javax.swing.*;
/**
* This type was created in VisualAge.
*/
public class Detalles extends javax.swing.JInternalFrame implements java.awt.event.ActionListener {
private javax.swing.JButton ivjAceptar = null;
private javax.swing.JButton ivjDescripcion = null;
private javax.swing.JLabel ivjEtiqueta = null;
private javax.swing.JPanel ivjJInternalFrameContentPane = null;
private javax.swing.JPanel ivjPanel = null;
private Editor edit = new Editor();
String mensaje = new String();
String error = new String();
Toolkit t = Toolkit.getDefaultToolkit();
Icon icono = (Icon) UIManager.get("OptionPane.errorIcon");
/**
* Constructor
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
public Detalles(String strTitle, String error, String mensaje) {
super("Error");
this.mensaje = mensaje;
this.error = error;
initialize();
}
/**
* Detalles constructor comment.
* @param title java.lang.String
*/
/**
* Detalles constructor comment.
* @param title java.lang.String
* @param resizable boolean
*/
public Detalles(String title, boolean resizable) {
super(title, resizable);
}
/**
* Detalles constructor comment.
* @param title java.lang.String
* @param resizable boolean
* @param closable boolean
*/
public Detalles(String title, boolean resizable, boolean closable) {
super(title, resizable, closable);
}
/**
* Detalles constructor comment.
* @param title java.lang.String
* @param resizable boolean
* @param closable boolean
* @param maximizable boolean
*/
public Detalles(String title, boolean resizable, boolean closable, boolean maximizable) {
super(title, resizable, closable, maximizable);
}
/**
* Detalles constructor comment.
* @param title java.lang.String
* @param resizable boolean
* @param closable boolean
* @param maximizable boolean
* @param iconifiable boolean
*/
public Detalles(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) {
super(title, resizable, closable, maximizable, iconifiable);
}
/**
* Comment
*/
public void aceptar_ActionPerformed(java.awt.event.ActionEvent actionEvent) {
try
{
this.setClosed(true);
}
catch (java.beans.PropertyVetoException w)
{
//System.out.println("hola");
}
return;
}
public void actionPerformed(java.awt.event.ActionEvent e) {
// user code begin {1}
// user code end
if ((e.getSource() == getAceptar()) ) {
connEtoC2(e);
}
if ((e.getSource() == getDescripcion()) ) {
connEtoC3(e);
}
// user code begin {2}
// user code end
}
/**
* connEtoC2: (Aceptar.action.actionPerformed(java.awt.event.ActionEvent) --> Detalles.aceptar_ActionPerformed(Ljava.awt.event.ActionEvent;)V)
* @param arg1 java.awt.event.ActionEvent
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void connEtoC2(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.aceptar_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
/**
* connEtoC3: (Descripcion.action.actionPerformed(java.awt.event.ActionEvent) --> Detalles.descripcion_ActionPerformed(Ljava.awt.event.ActionEvent;)V)
* @param arg1 java.awt.event.ActionEvent
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void connEtoC3(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.descripcion_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
/**
* Comment
*/
public void descripcion_ActionPerformed(java.awt.event.ActionEvent actionEvent) {
if(this.getSize().height == 110)
{
ivjDescripcion.setText("\u00AB Descripción");
this.setSize(this.getSize().width,193);
edit.append(mensaje, new Color(0xFF0000));
}
else
{
ivjDescripcion.setText("Descripción \u00BB");
this.setSize(this.getSize().width,110);
edit.remove();
}
return;
}
/**
* Return the Aceptar property value.
* @return javax.swing.JButton
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JButton getAceptar() {
if (ivjAceptar == null) {
try {
ivjAceptar = new javax.swing.JButton();
ivjAceptar.setName("Aceptar");
ivjAceptar.setText("Aceptar");
ivjAceptar.setBounds(33, 56, 85, 17);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
};
return ivjAceptar;
}
private javax.swing.JButton getDescripcion() {
if (ivjDescripcion == null) {
try {
ivjDescripcion = new javax.swing.JButton();
ivjDescripcion.setName("Descripcion");
ivjDescripcion.setText("Descripción \u00BB");
ivjDescripcion.setBounds(170, 56, 115, 17);
ivjDescripcion.setActionCommand("Descripcion");
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
};
return ivjDescripcion;
}
/**
* Return the Etiqueta property value.
* @return javax.swing.JLabel
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JLabel getEtiqueta() {
if (ivjEtiqueta == null) {
try {
ivjEtiqueta = new javax.swing.JLabel();
ivjEtiqueta.setName("Etiqueta");
ivjEtiqueta.setIcon(icono);
ivjEtiqueta.setText(error);
ivjEtiqueta.setBounds(15, 14, 258, 28);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
};
return ivjEtiqueta;
}
/**
* Return the JInternalFrameContentPane property value.
* @return javax.swing.JPanel
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JPanel getJInternalFrameContentPane() {
if (ivjJInternalFrameContentPane == null) {
try {
ivjJInternalFrameContentPane = new javax.swing.JPanel();
ivjJInternalFrameContentPane.setName("JInternalFrameContentPane");
ivjJInternalFrameContentPane.setLayout(null);
getJInternalFrameContentPane().add(getAceptar(), getAceptar().getName());
getJInternalFrameContentPane().add(getEtiqueta(), getEtiqueta().getName());
getJInternalFrameContentPane().add(getPanel(), getPanel().getName());
getJInternalFrameContentPane().add(getDescripcion(), getDescripcion().getName());
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
};
return ivjJInternalFrameContentPane;
}
/**
* Return the Panel property value.
* @return javax.swing.JPanel
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JPanel getPanel() {
if (ivjPanel == null) {
try {
ivjPanel = new javax.swing.JPanel();
ivjPanel.setName("Panel");
ivjPanel.setLayout(new BorderLayout());
ivjPanel.setBounds(12, 91, 282, 50);
ivjPanel.add("Center",edit);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
};
return ivjPanel;
}
/**
* Called whenever the part throws an exception.
* @param exception java.lang.Throwable
*/
private void handleException(Throwable exception) {
/* Uncomment the following lines to print uncaught exceptions to stdout */
// System.out.println("--------- UNCAUGHT EXCEPTION ---------");
// exception.printStackTrace(System.out);
}
/**
* Initializes connections
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void initConnections() {
// user code begin {1}
// user code end
getAceptar().addActionListener(this);
getDescripcion().addActionListener(this);
}
/**
* Initialize the class.
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void initialize() {
// user code begin {1}
// user code end
setName("Detalles");
setBounds((t.getScreenSize().width-317)/2,(t.getScreenSize().height-110)/2, 317, 110);
setContentPane(getJInternalFrameContentPane());
initConnections();
// user code begin {2}
// user code end
}
/**
* main entrypoint - starts the part when it is run as an application
* @param args java.lang.String[]
*/
}