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.
		
		
		
		
		
			
		
			
				
					
					
						
							177 lines
						
					
					
						
							6.2 KiB
						
					
					
				
			
		
		
	
	
							177 lines
						
					
					
						
							6.2 KiB
						
					
					
				| /*
 | |
|  * EmpresaPanel.java
 | |
|  *
 | |
|  * Created on 29 de Março de 2004, 11:53
 | |
|  */
 | |
| 
 | |
| package siprp.ficha;
 | |
| 
 | |
| import java.awt.*;
 | |
| import javax.swing.*;
 | |
| import java.util.*;
 | |
| 
 | |
| import com.evolute.utils.data.*;
 | |
| import com.evolute.utils.dataui.*;
 | |
| import com.evolute.utils.ui.button.*;
 | |
| import com.evolute.utils.ui.panel.*;
 | |
| 
 | |
| /**
 | |
|  *
 | |
|  * @author  fpalma
 | |
|  */
 | |
| public class EmpresaPanel extends JPanel
 | |
| 	implements FillerSaverWrapper
 | |
| {
 | |
| 	private JTextField designacaoSocialText;
 | |
| 	private JTextField estabelecimentoText;
 | |
| 	private JTextField localidadeText;
 | |
| //	private RadioButtonGroup servicoSaudeTipoGroup;
 | |
| //	private RadioButtonGroup servicoHigieneTipoGroup;
 | |
| 	private RadioButtonFixedPanel servicoSaudeTipoPanel;
 | |
| 	private RadioButtonFixedPanel servicoHigieneTipoPanel;
 | |
| 	private JTextField designacaoText;
 | |
| 	
 | |
| 	/** Creates a new instance of EmpresaPanel */
 | |
| 	public EmpresaPanel()
 | |
| 	{
 | |
| 		setupComponents();
 | |
| 	}
 | |
| 	
 | |
| 	private void setupComponents()
 | |
| 	{
 | |
| 		setBorder( BorderFactory.createTitledBorder(
 | |
| 					BorderFactory.createEtchedBorder(),
 | |
| 					"Empresa/Entidade" ) );
 | |
| 		
 | |
| 		JLabel designacaoSocialLabel = new JLabel( "Designa\u00e7\u00e3o Social" );
 | |
| 		designacaoSocialText = new JTextField();
 | |
| //		JPanel servicoSaudePanel = new JPanel();
 | |
| 		JLabel estabelecimentoLabel = new JLabel( "Estabelecimento" );
 | |
| 		estabelecimentoText = new JTextField();
 | |
| 		JLabel localidadeLabel = new JLabel( "Localidade" );
 | |
| 		localidadeText = new JTextField();
 | |
| 		JLabel servicoSaudeLabel = new JLabel( "Servi\u00e7o de Sa\u00fade: Tipo" );
 | |
| //		JRadioButton saudeInterno = new JRadioButton( "Interno" );
 | |
| //		JRadioButton saudeInterempresas = new JRadioButton( "Interempresas" );
 | |
| //		JRadioButton saudeExterno = new JRadioButton( "Externo" );
 | |
| //		JRadioButton saudeSNS = new JRadioButton( "Servi\u00e7o Nacional de Sa\u00fade" );
 | |
| //		servicoSaudeTipoGroup = 
 | |
| //			new RadioButtonGroup( servicoSaudePanel,
 | |
| //									new Vector( Arrays.asList( new Object[]{
 | |
| //												"Interno", "Interempresas",
 | |
| //												"Externo", "Servi\u00e7o Nacional de Sa\u00fade" } ) ), false );
 | |
| 		servicoSaudeTipoPanel = 
 | |
| 			new RadioButtonFixedPanel( new IDObject[]{ new MappableObject( new Integer(1), "Interno" ), 
 | |
| 													new MappableObject( new Integer(2), "Interempresas" ),
 | |
| 													new MappableObject( new Integer(3), "Externo" ), 
 | |
| 													new MappableObject( new Integer(4), "Servi\u00e7o Nacional de Sa\u00fade" ) }, 
 | |
| 									1, 4, RadioButtonPanel.ORIENTATION_HORIZONTAL, false );
 | |
| 		
 | |
| 		JLabel servicoHigieneLabel = new JLabel( "Servi\u00e7o de Higiene e Seguran\u00e7a: Tipo" );
 | |
| 		servicoHigieneTipoPanel = 
 | |
| 			new RadioButtonFixedPanel( new IDObject[]{ new MappableObject( new Integer(1), "Interno" ), 
 | |
| 													new MappableObject( new Integer(2), "Interempresas" ),
 | |
| 													new MappableObject( new Integer(3), "Externo" ), 
 | |
| 													new MappableObject( new Integer(4), "Outro" ) }, 
 | |
| 									1, 4, RadioButtonPanel.ORIENTATION_HORIZONTAL, false );
 | |
| 		JLabel designacaoLabel = new JLabel( "Designa\u00e7\u00e3o" );
 | |
| 		designacaoText = new JTextField();
 | |
| 		
 | |
| 		GridBagLayout gridbag = new GridBagLayout();
 | |
| 		setLayout( gridbag );
 | |
| 		GridBagConstraints constraints = new GridBagConstraints();
 | |
| 		constraints.insets = new Insets( 0, 1, 0, 1 );
 | |
| 		constraints.fill = GridBagConstraints.HORIZONTAL;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridheight = 1;
 | |
| 		constraints.weighty = 0;
 | |
| 		
 | |
| 		gridbag.setConstraints( designacaoSocialLabel, constraints );
 | |
| 		add( designacaoSocialLabel );
 | |
| 		
 | |
| 		constraints.weightx = 1;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( designacaoSocialText, constraints );
 | |
| 		add( designacaoSocialText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( estabelecimentoLabel, constraints );
 | |
| 		add( estabelecimentoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.6;
 | |
| 		constraints.gridwidth = 3;
 | |
| 		gridbag.setConstraints( estabelecimentoText, constraints );
 | |
| 		add( estabelecimentoText );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 1;
 | |
| 		gridbag.setConstraints( localidadeLabel, constraints );
 | |
| 		add( localidadeLabel );
 | |
| 		
 | |
| 		constraints.weightx = 0.4;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( localidadeText, constraints );
 | |
| 		add( localidadeText );
 | |
| 		
 | |
| //		constraints.weightx = 1;
 | |
| //		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| //		JPanel servicoSaudeOuterPanel = new JPanel();
 | |
| //		servicoSaudeOuterPanel.setLayout( new BorderLayout( 0, 0 ) );
 | |
| //		servicoSaudeOuterPanel.add( servicoSaudeLabel, BorderLayout.WEST );
 | |
| //		servicoSaudeOuterPanel.add( servicoSaudeTipoPanel, BorderLayout.CENTER );
 | |
| //		gridbag.setConstraints( servicoSaudeOuterPanel, constraints );
 | |
| //		add( servicoSaudeOuterPanel );
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 2;
 | |
| 		gridbag.setConstraints( servicoSaudeLabel, constraints );
 | |
| 		add( servicoSaudeLabel );
 | |
| 		
 | |
| 		constraints.weightx = 1;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( servicoSaudeTipoPanel, constraints );
 | |
| 		add( servicoSaudeTipoPanel );
 | |
| 		
 | |
| //		constraints.weightx = 1;
 | |
| //		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| //		JPanel servicoHigieneOuterPanel = new JPanel();
 | |
| //		servicoHigieneOuterPanel.setLayout( new BorderLayout( 0, 0 ) );
 | |
| //		servicoHigieneOuterPanel.add( servicoHigieneLabel, BorderLayout.WEST );
 | |
| //		servicoHigieneOuterPanel.add( servicoHigieneTipoPanel, BorderLayout.CENTER );
 | |
| //		gridbag.setConstraints( servicoHigieneOuterPanel, constraints );
 | |
| //		add( servicoHigieneOuterPanel );
 | |
| 		
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.gridwidth = 3;
 | |
| 		gridbag.setConstraints( servicoHigieneLabel, constraints );
 | |
| 		add( servicoHigieneLabel );
 | |
| 		
 | |
| 		constraints.weightx = 1;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( servicoHigieneTipoPanel, constraints );
 | |
| 		add( servicoHigieneTipoPanel );
 | |
| 		
 | |
| 		constraints.gridwidth = 1;
 | |
| 		constraints.weightx = 0;
 | |
| 		constraints.weighty = 1;
 | |
| 		constraints.gridheight = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( designacaoLabel, constraints );
 | |
| 		add( designacaoLabel );
 | |
| 		
 | |
| 		constraints.weightx = 1;
 | |
| 		constraints.gridwidth = GridBagConstraints.REMAINDER;
 | |
| 		gridbag.setConstraints( designacaoText, constraints );
 | |
| 		add( designacaoText );
 | |
| 	}
 | |
| 	
 | |
| 	public void fill(Object value)
 | |
| 	{
 | |
| 	}
 | |
| 	
 | |
| 	public Object save()
 | |
| 	{
 | |
| 		return null;
 | |
| 	}
 | |
| }
 |