forked from Coded/SIPRP
no message
git-svn-id: https://svn.coded.pt/svn/SIPRP@6 bb69d46d-e84e-40c8-a05a-06db0d6337410'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
parent
04ea56be84
commit
6dc5a128fb
@ -0,0 +1,13 @@
|
|||||||
|
package siprp;
|
||||||
|
|
||||||
|
import siprp.ficha.*;
|
||||||
|
|
||||||
|
public class Main
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void main( String args[] )
|
||||||
|
{
|
||||||
|
FichaWindow window = new FichaWindow();
|
||||||
|
window.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* 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( 1, 1, 1, 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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
/*
|
||||||
|
* ExamePanel.java
|
||||||
|
*
|
||||||
|
* Created on 29 de Março de 2004, 11:57
|
||||||
|
*/
|
||||||
|
|
||||||
|
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 ExamePanel extends JPanel
|
||||||
|
{
|
||||||
|
private JCalendarPanel dataExamePanel;
|
||||||
|
private BetterButtonGroup tipoGroup;
|
||||||
|
private RadioButtonGroup ocasionalGroup;
|
||||||
|
private JTextField especificarText;
|
||||||
|
private RadioButtonGroup resultadoGroup;
|
||||||
|
private JTextField outrasFuncoesTexts[];
|
||||||
|
|
||||||
|
/** Creates a new instance of ExamePanel */
|
||||||
|
public ExamePanel()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
setBorder( BorderFactory.createTitledBorder(
|
||||||
|
BorderFactory.createEtchedBorder(),
|
||||||
|
"Exame M\u00e9dico" ) );
|
||||||
|
|
||||||
|
JPanel leftPanel = new JPanel();
|
||||||
|
JPanel rightPanel = new JPanel();
|
||||||
|
rightPanel.setBorder( BorderFactory.createTitledBorder(
|
||||||
|
BorderFactory.createEtchedBorder(), "Resultado" ) );
|
||||||
|
JPanel dataExameOuterPanel = new JPanel();
|
||||||
|
JLabel dataExameLabel = new JLabel( "Data do Exame" );
|
||||||
|
dataExamePanel = new JCalendarPanel( null );
|
||||||
|
JPanel tipoPanel = new JPanel();
|
||||||
|
tipoPanel.setBorder( BorderFactory.createTitledBorder(
|
||||||
|
BorderFactory.createEtchedBorder(), "Tipo" ) );
|
||||||
|
tipoGroup = new BetterButtonGroup( false );
|
||||||
|
JRadioButton admissaoRadio = new JRadioButton( "Admiss\u00e3o" );
|
||||||
|
tipoGroup.add( admissaoRadio );
|
||||||
|
JRadioButton periodicoRadio = new JRadioButton( "Peri\u00f3dico" );
|
||||||
|
tipoGroup.add( periodicoRadio );
|
||||||
|
JRadioButton ocasionalRadio = new JRadioButton( "Ocasional" );
|
||||||
|
tipoGroup.add( ocasionalRadio );
|
||||||
|
JRadioButton outroRadio = new JRadioButton( "Outro" );
|
||||||
|
tipoGroup.add( outroRadio );
|
||||||
|
JPanel ocasionalPanel = new JPanel();
|
||||||
|
ocasionalPanel.setBorder( BorderFactory.createEtchedBorder() );
|
||||||
|
ocasionalGroup =
|
||||||
|
new RadioButtonGroup( ocasionalPanel,
|
||||||
|
new Vector( Arrays.asList(
|
||||||
|
new String[]{ "Ap\u00f3s doen\u00e7a", "Ap\u00f3s acidente",
|
||||||
|
"A pedido do trabalhador", "A pedido do servi\u00e7o",
|
||||||
|
"Por mudan\u00e7a de fun\u00e7\u00e3o",
|
||||||
|
"Por altera\u00e7\u00e3o das condi\u00e7\u00f5es de trabalho" } ) ),
|
||||||
|
false, true );
|
||||||
|
especificarText = new JTextField();
|
||||||
|
JPanel resultadoPanel = new JPanel();
|
||||||
|
resultadoGroup =
|
||||||
|
new RadioButtonGroup( resultadoPanel,
|
||||||
|
new Vector( Arrays.asList(
|
||||||
|
new String[]{ "Apto", "Apto condicionalmente",
|
||||||
|
"Inapto temporariamente", "Inapto definitivamente" } ) ),
|
||||||
|
false, true );
|
||||||
|
JLabel outrasFuncoesLabel = new JLabel( "Outras fun\u00e7\u00f5es que pode desempenhar", JLabel.CENTER );
|
||||||
|
JPanel outrasFuncoesPanel = new JPanel();
|
||||||
|
JLabel outrasFuncoesLabels[] = new JLabel[ 4 ];
|
||||||
|
outrasFuncoesTexts = new JTextField[ 4 ];
|
||||||
|
for( int n = 0; n < 4; n++ )
|
||||||
|
{
|
||||||
|
outrasFuncoesLabels[ n ] = new JLabel( "" + ( n + 1 ) );
|
||||||
|
outrasFuncoesTexts[ n ] = new JTextField();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setLayout( new GridLayout( 1, 2 ) );
|
||||||
|
add( leftPanel );
|
||||||
|
add( rightPanel );
|
||||||
|
|
||||||
|
leftPanel.setLayout( new BorderLayout() );
|
||||||
|
|
||||||
|
dataExameOuterPanel.setLayout( new BorderLayout() );
|
||||||
|
dataExameOuterPanel.add( dataExameLabel, BorderLayout.WEST );
|
||||||
|
dataExameOuterPanel.add( dataExamePanel, BorderLayout.CENTER );
|
||||||
|
leftPanel.add( dataExameOuterPanel, BorderLayout.NORTH );
|
||||||
|
leftPanel.add( tipoPanel, BorderLayout.CENTER );
|
||||||
|
|
||||||
|
GridBagLayout gridbag = new GridBagLayout();
|
||||||
|
tipoPanel.setLayout( gridbag );
|
||||||
|
GridBagConstraints constraints = new GridBagConstraints();
|
||||||
|
constraints.insets = new Insets( 1, 1, 1, 1 );
|
||||||
|
constraints.fill = GridBagConstraints.HORIZONTAL;
|
||||||
|
constraints.weighty = 0;
|
||||||
|
constraints.gridheight = 1;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
|
||||||
|
gridbag.setConstraints( admissaoRadio, constraints );
|
||||||
|
tipoPanel.add( admissaoRadio );
|
||||||
|
|
||||||
|
gridbag.setConstraints( periodicoRadio, constraints );
|
||||||
|
tipoPanel.add( periodicoRadio );
|
||||||
|
|
||||||
|
gridbag.setConstraints( ocasionalRadio, constraints );
|
||||||
|
tipoPanel.add( ocasionalRadio );
|
||||||
|
|
||||||
|
constraints.weightx = 0.1;
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
JPanel pad = new JPanel();
|
||||||
|
gridbag.setConstraints( pad, constraints );
|
||||||
|
tipoPanel.add( pad );
|
||||||
|
|
||||||
|
constraints.weightx = 0.9;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
gridbag.setConstraints( ocasionalPanel, constraints );
|
||||||
|
tipoPanel.add( ocasionalPanel );
|
||||||
|
|
||||||
|
constraints.weightx = 0;
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
gridbag.setConstraints( outroRadio, constraints );
|
||||||
|
tipoPanel.add( outroRadio );
|
||||||
|
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
gridbag.setConstraints( especificarText, constraints );
|
||||||
|
tipoPanel.add( especificarText );
|
||||||
|
|
||||||
|
|
||||||
|
gridbag = new GridBagLayout();
|
||||||
|
rightPanel.setLayout( gridbag );
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.gridheight = 1;
|
||||||
|
constraints.weighty = 0;
|
||||||
|
|
||||||
|
gridbag.setConstraints( resultadoPanel, constraints );
|
||||||
|
rightPanel.add( resultadoPanel );
|
||||||
|
|
||||||
|
gridbag.setConstraints( outrasFuncoesLabel, constraints );
|
||||||
|
rightPanel.add( outrasFuncoesLabel );
|
||||||
|
|
||||||
|
gridbag.setConstraints( outrasFuncoesPanel, constraints );
|
||||||
|
rightPanel.add( outrasFuncoesPanel );
|
||||||
|
|
||||||
|
for( int n = 0; n < outrasFuncoesTexts.length; n++ )
|
||||||
|
{
|
||||||
|
constraints.weightx = 0.1;
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
pad = new JPanel();
|
||||||
|
gridbag.setConstraints( pad, constraints );
|
||||||
|
rightPanel.add( pad );
|
||||||
|
|
||||||
|
constraints.weightx = 0;
|
||||||
|
gridbag.setConstraints( outrasFuncoesLabels[ n ], constraints );
|
||||||
|
rightPanel.add( outrasFuncoesLabels[ n ] );
|
||||||
|
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
gridbag.setConstraints( outrasFuncoesTexts[ n ], constraints );
|
||||||
|
rightPanel.add( outrasFuncoesTexts[ n ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* FichaWindow.java
|
||||||
|
*
|
||||||
|
* Created on 29 de Março de 2004, 11:50
|
||||||
|
*/
|
||||||
|
|
||||||
|
package siprp.ficha;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fpalma
|
||||||
|
*/
|
||||||
|
public class FichaWindow extends JFrame
|
||||||
|
{
|
||||||
|
private UpperPanel upperPanel;
|
||||||
|
private EmpresaPanel empresaPanel;
|
||||||
|
private TrabalhadorPanel trabalhadorPanel;
|
||||||
|
private ObservacoesPanel observacoesPanel;
|
||||||
|
private ExamePanel examePanel;
|
||||||
|
private RecomendacoesPanel recomendacoesPanel;
|
||||||
|
|
||||||
|
/** Creates a new instance of FichaWindow */
|
||||||
|
public FichaWindow()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
setSize( 700, 550 );
|
||||||
|
setResizable( false );
|
||||||
|
setTitle( "Ficha de Aptid\u00e3o" );
|
||||||
|
|
||||||
|
upperPanel = new UpperPanel();
|
||||||
|
JTabbedPane tabbed = new JTabbedPane();
|
||||||
|
getContentPane().setLayout( new BorderLayout() );
|
||||||
|
getContentPane().add( upperPanel, BorderLayout.NORTH );
|
||||||
|
getContentPane().add( tabbed, BorderLayout.CENTER );
|
||||||
|
|
||||||
|
JPanel empresaTrabalhadorPanel = new JPanel();
|
||||||
|
JPanel exameRecomendacoesPanel = new JPanel();
|
||||||
|
|
||||||
|
tabbed.add( "Empresa/Trabalhador", empresaTrabalhadorPanel );
|
||||||
|
tabbed.add( "Exame", exameRecomendacoesPanel );
|
||||||
|
|
||||||
|
GridBagLayout gridbag = new GridBagLayout();
|
||||||
|
empresaTrabalhadorPanel.setLayout( gridbag );
|
||||||
|
GridBagConstraints constraints = new GridBagConstraints();
|
||||||
|
constraints.insets = new Insets( 1, 1, 1, 1 );
|
||||||
|
constraints.fill = GridBagConstraints.BOTH;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.gridheight = 1;
|
||||||
|
constraints.weighty = 0;
|
||||||
|
|
||||||
|
empresaPanel = new EmpresaPanel();
|
||||||
|
gridbag.setConstraints( empresaPanel, constraints );
|
||||||
|
empresaTrabalhadorPanel.add( empresaPanel );
|
||||||
|
|
||||||
|
constraints.weighty = 0;
|
||||||
|
trabalhadorPanel = new TrabalhadorPanel();
|
||||||
|
gridbag.setConstraints( trabalhadorPanel, constraints );
|
||||||
|
empresaTrabalhadorPanel.add( trabalhadorPanel );
|
||||||
|
|
||||||
|
constraints.weighty = 1;
|
||||||
|
observacoesPanel = new ObservacoesPanel();
|
||||||
|
gridbag.setConstraints( observacoesPanel, constraints );
|
||||||
|
empresaTrabalhadorPanel.add( observacoesPanel );
|
||||||
|
|
||||||
|
|
||||||
|
gridbag = new GridBagLayout();
|
||||||
|
exameRecomendacoesPanel.setLayout( gridbag );
|
||||||
|
constraints = new GridBagConstraints();
|
||||||
|
constraints.insets = new Insets( 1, 1, 1, 1 );
|
||||||
|
constraints.fill = GridBagConstraints.BOTH;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.gridheight = 1;
|
||||||
|
constraints.weighty = 0;
|
||||||
|
|
||||||
|
constraints.weighty = 0;
|
||||||
|
examePanel = new ExamePanel();
|
||||||
|
gridbag.setConstraints( examePanel, constraints );
|
||||||
|
exameRecomendacoesPanel.add( examePanel );
|
||||||
|
|
||||||
|
constraints.weighty = 1;
|
||||||
|
recomendacoesPanel = new RecomendacoesPanel();
|
||||||
|
gridbag.setConstraints( recomendacoesPanel, constraints );
|
||||||
|
exameRecomendacoesPanel.add( recomendacoesPanel );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* ObservacoesPanel.java
|
||||||
|
*
|
||||||
|
* Created on 29 de Março de 2004, 11:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
package siprp.ficha;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fpalma
|
||||||
|
*/
|
||||||
|
public class ObservacoesPanel extends JPanel
|
||||||
|
{
|
||||||
|
private JTextArea observacoesText;
|
||||||
|
|
||||||
|
/** Creates a new instance of ObservacoesPanel */
|
||||||
|
public ObservacoesPanel()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
setBorder( BorderFactory.createTitledBorder(
|
||||||
|
BorderFactory.createEtchedBorder(),
|
||||||
|
"Observa\u00e7\u00f5es" ) );
|
||||||
|
|
||||||
|
JScrollPane scp = new JScrollPane();
|
||||||
|
scp.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
|
||||||
|
scp.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
|
||||||
|
observacoesText = new JTextArea();
|
||||||
|
observacoesText.setLineWrap( true );
|
||||||
|
observacoesText.setWrapStyleWord( true );
|
||||||
|
scp.setViewportView( observacoesText );
|
||||||
|
|
||||||
|
setLayout( new GridLayout( 1, 1 ) );
|
||||||
|
add( scp );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* RecomendacoesPanel.java
|
||||||
|
*
|
||||||
|
* Created on 29 de Março de 2004, 11:58
|
||||||
|
*/
|
||||||
|
|
||||||
|
package siprp.ficha;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
|
import com.evolute.utils.ui.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fpalma
|
||||||
|
*/
|
||||||
|
public class RecomendacoesPanel extends JPanel
|
||||||
|
{
|
||||||
|
private JTextArea recomendacoesText;
|
||||||
|
private JCalendarPanel proximoExamePanel;
|
||||||
|
/** Creates a new instance of RecomendacoesPanel */
|
||||||
|
public RecomendacoesPanel()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
setBorder( BorderFactory.createTitledBorder(
|
||||||
|
BorderFactory.createEtchedBorder(),
|
||||||
|
"Outras Recomenda\u00e7\u00f5es" ) );
|
||||||
|
|
||||||
|
JScrollPane scp = new JScrollPane();
|
||||||
|
scp.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
|
||||||
|
scp.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
|
||||||
|
recomendacoesText = new JTextArea();
|
||||||
|
recomendacoesText.setLineWrap( true );
|
||||||
|
recomendacoesText.setWrapStyleWord( true );
|
||||||
|
scp.setViewportView( recomendacoesText );
|
||||||
|
JPanel rightPanel = new JPanel();
|
||||||
|
JLabel proximoExameLabel = new JLabel( "Pr\u00f3ximo Exame" );
|
||||||
|
proximoExamePanel = new JCalendarPanel( null );
|
||||||
|
|
||||||
|
setLayout( new GridLayout( 1, 2 ) );
|
||||||
|
add( scp );
|
||||||
|
add( rightPanel );
|
||||||
|
|
||||||
|
rightPanel.setLayout( new BorderLayout() );
|
||||||
|
rightPanel.add( proximoExameLabel, BorderLayout.WEST );
|
||||||
|
rightPanel.add( proximoExamePanel, BorderLayout.CENTER );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,184 @@
|
|||||||
|
/*
|
||||||
|
* 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( 1, 1, 1, 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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* UpperPanel.java
|
||||||
|
*
|
||||||
|
* Created on 29 de Março de 2004, 17:44
|
||||||
|
*/
|
||||||
|
|
||||||
|
package siprp.ficha;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fpalma
|
||||||
|
*/
|
||||||
|
public class UpperPanel extends JPanel
|
||||||
|
{
|
||||||
|
private JTextField empresaText;
|
||||||
|
private JTextField nomeText;
|
||||||
|
private JTextField medicoText;
|
||||||
|
private JTextField cpText;
|
||||||
|
|
||||||
|
/** Creates a new instance of UpperPanel */
|
||||||
|
public UpperPanel()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
JLabel empresaLabel = new JLabel( "Empresa/Entidade" );
|
||||||
|
empresaText = new JTextField();
|
||||||
|
empresaText.setEditable( false );
|
||||||
|
JLabel nomeLabel = new JLabel( "Nome" );
|
||||||
|
nomeText = new JTextField();
|
||||||
|
nomeText.setEditable( false );
|
||||||
|
JLabel medicoLabel = new JLabel( "M\u00e9dico" );
|
||||||
|
medicoText = new JTextField();
|
||||||
|
JLabel cpLabel = new JLabel( "c.p." );
|
||||||
|
cpText = new JTextField();
|
||||||
|
|
||||||
|
GridBagLayout gridbag = new GridBagLayout();
|
||||||
|
setLayout( gridbag );
|
||||||
|
GridBagConstraints constraints = new GridBagConstraints();
|
||||||
|
constraints.insets = new Insets( 1, 1, 1, 1 );
|
||||||
|
constraints.fill = GridBagConstraints.HORIZONTAL;
|
||||||
|
constraints.gridheight = 1;
|
||||||
|
constraints.weighty = 0;
|
||||||
|
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
constraints.weightx = 0;
|
||||||
|
gridbag.setConstraints( empresaLabel, constraints );
|
||||||
|
add( empresaLabel );
|
||||||
|
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
gridbag.setConstraints( empresaText, constraints );
|
||||||
|
add( empresaText );
|
||||||
|
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
constraints.weightx = 0;
|
||||||
|
gridbag.setConstraints( nomeLabel, constraints );
|
||||||
|
add( nomeLabel );
|
||||||
|
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
gridbag.setConstraints( nomeText, constraints );
|
||||||
|
add( nomeText );
|
||||||
|
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
constraints.weightx = 0;
|
||||||
|
gridbag.setConstraints( medicoLabel, constraints );
|
||||||
|
add( medicoLabel );
|
||||||
|
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
constraints.weightx = 0.8;
|
||||||
|
gridbag.setConstraints( medicoText, constraints );
|
||||||
|
add( medicoText );
|
||||||
|
|
||||||
|
constraints.gridwidth = 1;
|
||||||
|
constraints.weightx = 0;
|
||||||
|
gridbag.setConstraints( cpLabel, constraints );
|
||||||
|
add( cpLabel );
|
||||||
|
|
||||||
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
constraints.weightx = 0.2;
|
||||||
|
gridbag.setConstraints( cpText, constraints );
|
||||||
|
add( cpText );
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue