forked from Coded/SIPRP
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							185 lines
						
					
					
						
							5.5 KiB
						
					
					
				
			
		
		
	
	
							185 lines
						
					
					
						
							5.5 KiB
						
					
					
				| /*
 | |
|  * TrabalhadorPanel.java
 | |
|  *
 | |
|  * Created on 29 de Março de 2004, 11:55
 | |
|  */
 | |
| 
 | |
| package siprp.ficha;
 | |
| 
 | |
| import java.awt.*;
 | |
| import javax.swing.*;
 | |
| import java.util.*;
 | |
| 
 | |
| import com.evolute.utils.ui.*;
 | |
| import com.evolute.utils.ui.button.*;
 | |
| 
 | |
| /**
 | |
|  *
 | |
|  * @author  fpalma
 | |
|  */
 | |
| public class TrabalhadorPanel extends JPanel
 | |
| {
 | |
| 	private JTextField nomeText;
 | |
| 	private RadioButtonGroup sexoGroup;
 | |
| 	private JCalendarPanel dataNascimentoPanel;
 | |
| 	private JTextField nacionalidadeText;
 | |
| 	private JTextField numeroMecanograficoText;
 | |
| 	private JCalendarPanel dataAdmissaoPanel;
 | |
| 	private JTextField categoriaText;
 | |
| 	private JTextField localText;
 | |
| 	private JTextField funcaoText;
 | |
| 	private JCalendarPanel dataAdmissaoFuncaoPanel;
 | |
| 	
 | |
| 	/** Creates a new instance of TrabalhadorPanel */
 | |
| 	
 | |
| 	public TrabalhadorPanel()
 | |
| 	{
 | |
| 		setupComponents();
 | |
| 	}
 | |
| 	
 | |
| 	private void setupComponents()
 | |
| 	{
 | |
| 		setBorder( BorderFactory.createTitledBorder(
 | |
| 					BorderFactory.createEtchedBorder(),
 | |
| 					"Trabalhador" ) );
 | |
| 		JLabel nomeLabel = new JLabel( "Nome" );
 | |
| 		nomeText = new JTextField();
 | |
| 		JLabel sexoLabel = new JLabel( "Sexo" );
 | |
| 		JPanel sexoPanel = new JPanel();
 | |
| 		sexoGroup = 
 | |
| 			new RadioButtonGroup( sexoPanel, 
 | |
| 					new Vector( Arrays.asList( new String[]{ "M", "F" } ) ),
 | |
| 					false );
 | |
| 		JLabel dataNascimentoLabel = new JLabel( "Data de Nascimento" );
 | |
| 		dataNascimentoPanel = new JCalendarPanel( null );
 | |
| 		JLabel nacionalidadeLabel = new JLabel( "Nacionalidade" );
 | |
| 		nacionalidadeText = new JTextField();
 | |
| 		JLabel numeroMecanograficoLabel = new JLabel( "N\u00famero Mecanogr\u00e1fico/outro" );
 | |
| 		numeroMecanograficoText = new JTextField();
 | |
| 		JLabel dataAdmissaoLabel = new JLabel( "Data de Admiss\u00e3o" );
 | |
| 		dataAdmissaoPanel = new JCalendarPanel( null );
 | |
| 		JLabel categoriaLabel = new JLabel( "Categoria Profissional" );
 | |
| 		categoriaText = new JTextField();
 | |
| 		JLabel localLabel = new JLabel( "Local de Trabalho" );
 | |
| 		localText = new JTextField();
 | |
| 		JLabel funcaoLabel = new JLabel( "Fun\u00e7\u00e3o proposta" );
 | |
| 		funcaoText = new JTextField();
 | |
| 		JLabel dataAdmissaoFuncaoLabel = new JLabel( "Data de Admiss\u00e3o na Fun\u00e7\u00e3o" );
 | |
| 		dataAdmissaoFuncaoPanel = new JCalendarPanel( null );
 | |
| 		
 | |
| 		GridBagLayout gridbag = new GridBagLayout();
 | |
| 		setLayout( gridbag );
 | |
| 		GridBagConstraints constraints = new GridBagConstraints();
 | |
| 		constraints.insets = new Insets( 0, 1, 0, 1 );
 | |
| 		constraints.fill = GridBagConstraints.HORIZONTAL;
 | |
| 		constraints.weighty = 0;
 | |
| 		constraints.gridheight = 1;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		constraints.weightx = 0;
 | |
| 		
 | |
| 		gridbag.setConstraints( nomeLabel, constraints );
 | |
| 		add( nomeLabel );
 | |
| 		
 | |
| 		constraints.weightx = 1;
 | |
| 		constraints.gridwidth = 3;
 | |
| 		gridbag.setConstraints( nomeText, constraints );
 | |
| 		add( nomeText );
 | |
| 		
 | |
| 		constraints.gridwidth = 1;
 | |
| 		constraints.weightx = 0;
 | |
| 		gridbag.setConstraints( sexoLabel, constraints );
 | |
| 		add( sexoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		//constraints.gridwidth = 1;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( sexoPanel, constraints );
 | |
| 		add( sexoPanel );
 | |
| 		
 | |
| //		constraints.weightx = 1;
 | |
| //		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| //		JPanel pad = new JPanel();
 | |
| //		gridbag.setConstraints( pad, constraints );
 | |
| //		add( pad );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 2;
 | |
| 		gridbag.setConstraints( nacionalidadeLabel, constraints );
 | |
| 		add( nacionalidadeLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( nacionalidadeText, constraints );
 | |
| 		add( nacionalidadeText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( dataNascimentoLabel, constraints );
 | |
| 		add( dataNascimentoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( dataNascimentoPanel, constraints );
 | |
| 		add( dataNascimentoPanel );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 2;
 | |
| 		gridbag.setConstraints( numeroMecanograficoLabel, constraints );
 | |
| 		add( numeroMecanograficoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( numeroMecanograficoText, constraints );
 | |
| 		add( numeroMecanograficoText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( dataAdmissaoLabel, constraints );
 | |
| 		add( dataAdmissaoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( dataAdmissaoPanel, constraints );
 | |
| 		add( dataAdmissaoPanel );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 2;
 | |
| 		gridbag.setConstraints( categoriaLabel, constraints );
 | |
| 		add( categoriaLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( categoriaText, constraints );
 | |
| 		add( categoriaText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		gridbag.setConstraints( localLabel, constraints );
 | |
| 		add( localLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( localText, constraints );
 | |
| 		add( localText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 2;
 | |
| 		gridbag.setConstraints( funcaoLabel, constraints );
 | |
| 		add( funcaoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( funcaoText, constraints );
 | |
| 		add( funcaoText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( dataAdmissaoFuncaoLabel, constraints );
 | |
| 		add( dataAdmissaoFuncaoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.5;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( dataAdmissaoFuncaoPanel, constraints );
 | |
| 		add( dataAdmissaoFuncaoPanel );
 | |
| 	}
 | |
| }
 |