|
|
|
@ -30,8 +30,10 @@ public class ExamePanel extends JPanel
|
|
|
|
private JRadioButton outroRadio;
|
|
|
|
private JRadioButton outroRadio;
|
|
|
|
private RadioButtonFixedPanel ocasionalPanel;
|
|
|
|
private RadioButtonFixedPanel ocasionalPanel;
|
|
|
|
private JTextField especificarText;
|
|
|
|
private JTextField especificarText;
|
|
|
|
|
|
|
|
private JCalendarPanel proximoExamePanel;
|
|
|
|
private RadioButtonFixedPanel resultadoPanel;
|
|
|
|
private RadioButtonFixedPanel resultadoPanel;
|
|
|
|
private JTextField outrasFuncoesTexts[];
|
|
|
|
private JTextField outrasFuncoesTexts[];
|
|
|
|
|
|
|
|
private JTextArea recomendacoesText;
|
|
|
|
|
|
|
|
|
|
|
|
/** Creates a new instance of ExamePanel */
|
|
|
|
/** Creates a new instance of ExamePanel */
|
|
|
|
public ExamePanel()
|
|
|
|
public ExamePanel()
|
|
|
|
@ -47,8 +49,6 @@ public class ExamePanel extends JPanel
|
|
|
|
|
|
|
|
|
|
|
|
JPanel leftPanel = new JPanel();
|
|
|
|
JPanel leftPanel = new JPanel();
|
|
|
|
JPanel rightPanel = new JPanel();
|
|
|
|
JPanel rightPanel = new JPanel();
|
|
|
|
rightPanel.setBorder( BorderFactory.createTitledBorder(
|
|
|
|
|
|
|
|
BorderFactory.createEtchedBorder(), "Resultado" ) );
|
|
|
|
|
|
|
|
JPanel dataExameOuterPanel = new JPanel();
|
|
|
|
JPanel dataExameOuterPanel = new JPanel();
|
|
|
|
JLabel dataExameLabel = new JLabel( "Data do Exame" );
|
|
|
|
JLabel dataExameLabel = new JLabel( "Data do Exame" );
|
|
|
|
dataExamePanel = new JCalendarPanel( null );
|
|
|
|
dataExamePanel = new JCalendarPanel( null );
|
|
|
|
@ -77,6 +77,12 @@ public class ExamePanel extends JPanel
|
|
|
|
ocasionalPanel.setEnabled( false );
|
|
|
|
ocasionalPanel.setEnabled( false );
|
|
|
|
especificarText = new JTextField();
|
|
|
|
especificarText = new JTextField();
|
|
|
|
especificarText.setEnabled( false );
|
|
|
|
especificarText.setEnabled( false );
|
|
|
|
|
|
|
|
JPanel proximoExameOuterPanel = new JPanel();
|
|
|
|
|
|
|
|
JLabel proximoExameLabel = new JLabel( "Pr\u00f3ximo Exame" );
|
|
|
|
|
|
|
|
proximoExamePanel = new JCalendarPanel( null );
|
|
|
|
|
|
|
|
JPanel resultadoOuterPanel = new JPanel();
|
|
|
|
|
|
|
|
resultadoOuterPanel.setBorder( BorderFactory.createTitledBorder(
|
|
|
|
|
|
|
|
BorderFactory.createEtchedBorder(), "Resultado" ) );
|
|
|
|
resultadoPanel = new RadioButtonFixedPanel(
|
|
|
|
resultadoPanel = new RadioButtonFixedPanel(
|
|
|
|
new IDObject[]{ new MappableObject( new Integer( 1 ), "Apto" ),
|
|
|
|
new IDObject[]{ new MappableObject( new Integer( 1 ), "Apto" ),
|
|
|
|
new MappableObject( new Integer( 2 ), "Apto condicionalmente" ),
|
|
|
|
new MappableObject( new Integer( 2 ), "Apto condicionalmente" ),
|
|
|
|
@ -92,7 +98,16 @@ public class ExamePanel extends JPanel
|
|
|
|
outrasFuncoesLabels[ n ] = new JLabel( "" + ( n + 1 ) );
|
|
|
|
outrasFuncoesLabels[ n ] = new JLabel( "" + ( n + 1 ) );
|
|
|
|
outrasFuncoesTexts[ n ] = new JTextField();
|
|
|
|
outrasFuncoesTexts[ n ] = new JTextField();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
JScrollPane recomendacoesScp = new JScrollPane();
|
|
|
|
|
|
|
|
recomendacoesScp.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
|
|
|
|
|
|
|
|
recomendacoesScp.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
|
|
|
|
|
|
|
|
recomendacoesText = new JTextArea();
|
|
|
|
|
|
|
|
recomendacoesText.setLineWrap( true );
|
|
|
|
|
|
|
|
recomendacoesText.setWrapStyleWord( true );
|
|
|
|
|
|
|
|
recomendacoesScp.setViewportView( recomendacoesText );
|
|
|
|
|
|
|
|
recomendacoesScp.setBorder( BorderFactory.createTitledBorder(
|
|
|
|
|
|
|
|
BorderFactory.createEtchedBorder(),
|
|
|
|
|
|
|
|
"Outras recomenda\u00e7\u00f5es" ) );
|
|
|
|
|
|
|
|
|
|
|
|
setLayout( new GridLayout( 1, 2 ) );
|
|
|
|
setLayout( new GridLayout( 1, 2 ) );
|
|
|
|
add( leftPanel );
|
|
|
|
add( leftPanel );
|
|
|
|
@ -105,6 +120,10 @@ public class ExamePanel extends JPanel
|
|
|
|
dataExameOuterPanel.add( dataExamePanel, BorderLayout.CENTER );
|
|
|
|
dataExameOuterPanel.add( dataExamePanel, BorderLayout.CENTER );
|
|
|
|
leftPanel.add( dataExameOuterPanel, BorderLayout.NORTH );
|
|
|
|
leftPanel.add( dataExameOuterPanel, BorderLayout.NORTH );
|
|
|
|
leftPanel.add( tipoPanel, BorderLayout.CENTER );
|
|
|
|
leftPanel.add( tipoPanel, BorderLayout.CENTER );
|
|
|
|
|
|
|
|
proximoExameOuterPanel.setLayout( new BorderLayout() );
|
|
|
|
|
|
|
|
proximoExameOuterPanel.add( proximoExameLabel, BorderLayout.WEST );
|
|
|
|
|
|
|
|
proximoExameOuterPanel.add( proximoExamePanel, BorderLayout.CENTER );
|
|
|
|
|
|
|
|
leftPanel.add( proximoExameOuterPanel, BorderLayout.SOUTH );
|
|
|
|
|
|
|
|
|
|
|
|
GridBagLayout gridbag = new GridBagLayout();
|
|
|
|
GridBagLayout gridbag = new GridBagLayout();
|
|
|
|
tipoPanel.setLayout( gridbag );
|
|
|
|
tipoPanel.setLayout( gridbag );
|
|
|
|
@ -149,19 +168,40 @@ public class ExamePanel extends JPanel
|
|
|
|
|
|
|
|
|
|
|
|
gridbag = new GridBagLayout();
|
|
|
|
gridbag = new GridBagLayout();
|
|
|
|
rightPanel.setLayout( gridbag );
|
|
|
|
rightPanel.setLayout( gridbag );
|
|
|
|
|
|
|
|
constraints.fill = GridBagConstraints.BOTH;
|
|
|
|
|
|
|
|
constraints.weightx = 1;
|
|
|
|
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
|
|
|
|
constraints.gridheight = 1;
|
|
|
|
|
|
|
|
constraints.weighty = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridbag.setConstraints( resultadoOuterPanel, constraints );
|
|
|
|
|
|
|
|
rightPanel.add( resultadoOuterPanel );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constraints.weightx = 1;
|
|
|
|
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
|
|
|
|
//constraints.gridheight = GridBagConstraints.REMAINDER;
|
|
|
|
|
|
|
|
constraints.weighty = 1;
|
|
|
|
|
|
|
|
// JPanel recomendacoesOuterPanel = new JPanel();
|
|
|
|
|
|
|
|
// recomendacoesOuterPanel.setLayout( new GridLayout( 1, 1 ) );
|
|
|
|
|
|
|
|
// recomendacoesOuterPanel.add( recomendacoesScp );
|
|
|
|
|
|
|
|
gridbag.setConstraints( recomendacoesScp, constraints );
|
|
|
|
|
|
|
|
rightPanel.add( recomendacoesScp );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridbag = new GridBagLayout();
|
|
|
|
|
|
|
|
resultadoOuterPanel.setLayout( gridbag );
|
|
|
|
constraints.weightx = 1;
|
|
|
|
constraints.weightx = 1;
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
constraints.gridheight = 1;
|
|
|
|
constraints.gridheight = 1;
|
|
|
|
constraints.weighty = 0;
|
|
|
|
constraints.weighty = 0;
|
|
|
|
|
|
|
|
|
|
|
|
gridbag.setConstraints( resultadoPanel, constraints );
|
|
|
|
gridbag.setConstraints( resultadoPanel, constraints );
|
|
|
|
rightPanel.add( resultadoPanel );
|
|
|
|
resultadoOuterPanel.add( resultadoPanel );
|
|
|
|
|
|
|
|
|
|
|
|
gridbag.setConstraints( outrasFuncoesLabel, constraints );
|
|
|
|
gridbag.setConstraints( outrasFuncoesLabel, constraints );
|
|
|
|
rightPanel.add( outrasFuncoesLabel );
|
|
|
|
resultadoOuterPanel.add( outrasFuncoesLabel );
|
|
|
|
|
|
|
|
|
|
|
|
gridbag.setConstraints( outrasFuncoesPanel, constraints );
|
|
|
|
gridbag.setConstraints( outrasFuncoesPanel, constraints );
|
|
|
|
rightPanel.add( outrasFuncoesPanel );
|
|
|
|
resultadoOuterPanel.add( outrasFuncoesPanel );
|
|
|
|
|
|
|
|
|
|
|
|
for( int n = 0; n < outrasFuncoesTexts.length; n++ )
|
|
|
|
for( int n = 0; n < outrasFuncoesTexts.length; n++ )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -169,18 +209,17 @@ public class ExamePanel extends JPanel
|
|
|
|
constraints.gridwidth = 1;
|
|
|
|
constraints.gridwidth = 1;
|
|
|
|
pad = new JPanel();
|
|
|
|
pad = new JPanel();
|
|
|
|
gridbag.setConstraints( pad, constraints );
|
|
|
|
gridbag.setConstraints( pad, constraints );
|
|
|
|
rightPanel.add( pad );
|
|
|
|
resultadoOuterPanel.add( pad );
|
|
|
|
|
|
|
|
|
|
|
|
constraints.weightx = 0;
|
|
|
|
constraints.weightx = 0;
|
|
|
|
gridbag.setConstraints( outrasFuncoesLabels[ n ], constraints );
|
|
|
|
gridbag.setConstraints( outrasFuncoesLabels[ n ], constraints );
|
|
|
|
rightPanel.add( outrasFuncoesLabels[ n ] );
|
|
|
|
resultadoOuterPanel.add( outrasFuncoesLabels[ n ] );
|
|
|
|
|
|
|
|
|
|
|
|
constraints.weightx = 1;
|
|
|
|
constraints.weightx = 1;
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
constraints.gridwidth = GridBagConstraints.REMAINDER;
|
|
|
|
gridbag.setConstraints( outrasFuncoesTexts[ n ], constraints );
|
|
|
|
gridbag.setConstraints( outrasFuncoesTexts[ n ], constraints );
|
|
|
|
rightPanel.add( outrasFuncoesTexts[ n ] );
|
|
|
|
resultadoOuterPanel.add( outrasFuncoesTexts[ n ] );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void stateChanged( ChangeEvent e )
|
|
|
|
public void stateChanged( ChangeEvent e )
|
|
|
|
|