Añado los fuentes de java
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
package com.tarisan.chipcard.tpvvs.webservicetrayicon;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import com.tarisan.chipcard.gui.ImageComboBox;
|
||||
|
||||
import com.tarisan.chipcard.tpvvs.webservicetrayicon.accesodatos.UsuarioTVS;
|
||||
import com.tarisan.chipcard.tpvvs.webservicetrayicon.accesodatos.UsuarioTVSBean;
|
||||
|
||||
public class AnulacionesPanel extends JPanel {
|
||||
|
||||
private ImageComboBox cmbImageComboUsuarios = new ImageComboBox();
|
||||
private JComboBox cmbURLService = new JComboBox();
|
||||
|
||||
private JTextField jtxtTimestamp = new JTextField();
|
||||
|
||||
public AnulacionesPanel() {
|
||||
super();
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
//setLayout(new BorderLayout());
|
||||
initPane();
|
||||
//JPanel pn=new JPanel();
|
||||
/**
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
pn.add(jpPrincipal, gridBagConstraints);
|
||||
gridBagConstraints.gridx = 1;
|
||||
add(pn, java.awt.BorderLayout.CENTER);
|
||||
**/
|
||||
}
|
||||
|
||||
private void initPane() {
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
setBorder(new javax.swing.border.TitledBorder("Datos de la Solicitud de anulación al TVS"));
|
||||
java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
|
||||
gridBagConstraints.gridwidth = 1;
|
||||
|
||||
gridBagConstraints.gridy++;
|
||||
gridBagConstraints.gridx = 0;
|
||||
JLabel label = new javax.swing.JLabel("URL Servicio Web:");
|
||||
add(label, gridBagConstraints);
|
||||
gridBagConstraints.gridx++;
|
||||
cmbURLService.setEditable(true);
|
||||
WebServiceTrayIcon.fillURLServices(cmbURLService);
|
||||
add(cmbURLService, gridBagConstraints);
|
||||
|
||||
gridBagConstraints.gridy++;
|
||||
gridBagConstraints.gridx = 0;
|
||||
label = new javax.swing.JLabel("Usuario:");
|
||||
add(label, gridBagConstraints);
|
||||
gridBagConstraints.gridx++;
|
||||
add(cmbImageComboUsuarios, gridBagConstraints);
|
||||
|
||||
gridBagConstraints.gridy++;
|
||||
gridBagConstraints.gridx = 0;
|
||||
label = new javax.swing.JLabel("Timestamp:");
|
||||
add(label, gridBagConstraints);
|
||||
gridBagConstraints.gridx++;
|
||||
//JScrollPane listScrollPane3 = new JScrollPane(txtDatosCliente);
|
||||
//listScrollPane3.setPreferredSize(maxSize);
|
||||
add(jtxtTimestamp, gridBagConstraints);
|
||||
|
||||
}
|
||||
|
||||
public void updateData() {
|
||||
getCmbImageComboUsuarios().removeAllItems();
|
||||
UsuarioTVSBean bean = new UsuarioTVSBean();
|
||||
Vector vUsuarios = bean.getUsuariosTVS();
|
||||
for (int i = 0; i < vUsuarios.size(); i++) {
|
||||
UsuarioTVS obj = (UsuarioTVS) vUsuarios.elementAt(i);
|
||||
getCmbImageComboUsuarios().addItem(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public ImageComboBox getCmbImageComboUsuarios() {
|
||||
return cmbImageComboUsuarios;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public JComboBox getCmbURLService() {
|
||||
return cmbURLService;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean blnEnabled) {
|
||||
super.setEnabled(blnEnabled);
|
||||
java.awt.Component arrComp[] = this.getComponents();
|
||||
for (int i = 0; i < this.getComponentCount(); i++) {
|
||||
arrComp[i].setEnabled(blnEnabled);
|
||||
}
|
||||
validate();
|
||||
repaint();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public JTextField getJtxtTimestamp() {
|
||||
return jtxtTimestamp;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user