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.
137 lines
4.8 KiB
137 lines
4.8 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.ui.button.*;
|
|
|
|
/**
|
|
*
|
|
* @author fpalma
|
|
*/
|
|
public class EmpresaPanel extends JPanel
|
|
{
|
|
private JTextField designacaoSocialText;
|
|
private JTextField estabelecimentoText;
|
|
private JTextField localidadeText;
|
|
private RadioButtonGroup servicoSaudeTipoGroup;
|
|
private RadioButtonGroup servicoHigieneTipoGroup;
|
|
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 );
|
|
|
|
JPanel servicoHigienePanel = new JPanel();
|
|
JLabel servicoHigieneLabel = new JLabel( "Servi\u00e7o de Higiene e Seguran\u00e7a: Tipo" );
|
|
// JRadioButton higieneInterno = new JRadioButton( "Interno" );
|
|
// JRadioButton higieneInterempresas = new JRadioButton( "Interempresas" );
|
|
// JRadioButton higieneExterno = new JRadioButton( "Externo" );
|
|
// JRadioButton higieneOutro = new JRadioButton( "Outro" );
|
|
servicoHigieneTipoGroup =
|
|
new RadioButtonGroup( servicoHigienePanel,
|
|
new Vector( Arrays.asList( new Object[]{
|
|
"Interno", "Interempresas",
|
|
"Externo", "Outro" } ) ), 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;
|
|
gridbag.setConstraints( estabelecimentoText, constraints );
|
|
add( estabelecimentoText );
|
|
|
|
constraints.weightx = 0;
|
|
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( servicoSaudePanel, BorderLayout.CENTER );
|
|
gridbag.setConstraints( servicoSaudeOuterPanel, constraints );
|
|
add( servicoSaudeOuterPanel );
|
|
|
|
constraints.weightx = 1;
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
JPanel servicoHigieneOuterPanel = new JPanel();
|
|
servicoHigieneOuterPanel.setLayout( new BorderLayout( 0, 0 ) );
|
|
servicoHigieneOuterPanel.add( servicoHigieneLabel, BorderLayout.WEST );
|
|
servicoHigieneOuterPanel.add( servicoHigienePanel, BorderLayout.CENTER );
|
|
gridbag.setConstraints( servicoHigieneOuterPanel, constraints );
|
|
add( servicoHigieneOuterPanel );
|
|
|
|
constraints.gridwidth = 1;
|
|
constraints.weightx = 0;
|
|
gridbag.setConstraints( designacaoLabel, constraints );
|
|
add( designacaoLabel );
|
|
|
|
constraints.weightx = 1;
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
gridbag.setConstraints( designacaoText, constraints );
|
|
add( designacaoText );
|
|
}
|
|
}
|