|
|
|
|
@ -27,11 +27,15 @@ public class MarcacaoExamePanel
|
|
|
|
|
|
|
|
|
|
private final JLabel dataLabel = new JLabel( "Data dos Exames", JLabel.RIGHT );
|
|
|
|
|
private final JCalendarPanel dataPanel = new JCalendarPanel( null );
|
|
|
|
|
private final JButton emailButton = new JButton( "Enviar Email" );
|
|
|
|
|
private final JButton novaDataButton = new JButton( "Nova data" );
|
|
|
|
|
private final JLabel estadoLabel = new JLabel( "Estado", JLabel.RIGHT );
|
|
|
|
|
private final JComboBox estadoList = new JComboBox();
|
|
|
|
|
private final JPanelControllable detalhesPanel = new JPanelControllable();
|
|
|
|
|
private RadioButtonFixedPanel estadoList;
|
|
|
|
|
private final JButton emailButton = new JButton( "Enviar Email" );
|
|
|
|
|
private final JPanelControllable historicoPanel = new JPanelControllable();
|
|
|
|
|
private final JScrollPane observacoesTextScroll = new JScrollPane();
|
|
|
|
|
private final StateTextArea observacoesText = new StateTextArea();
|
|
|
|
|
private final JButton historicoButton = new JButton( "Ver Hist\u00f3rico desta Marca\u00e7\u00e3o" );
|
|
|
|
|
|
|
|
|
|
public MarcacaoExamePanel()
|
|
|
|
|
throws Exception
|
|
|
|
|
@ -54,26 +58,29 @@ public class MarcacaoExamePanel
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
JComponent MarcacaoExamePanel = this;
|
|
|
|
|
emailButton.setMinimumSize( new Dimension( 300, 20 ) );
|
|
|
|
|
emailButton.setPreferredSize( new Dimension( 200, 20 ) );
|
|
|
|
|
novaDataButton.setMinimumSize( new Dimension( 300, 20 ) );
|
|
|
|
|
novaDataButton.setPreferredSize( new Dimension( 200, 20 ) );
|
|
|
|
|
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 0 ), "Por realizar" ) );
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 1 ), "Parcialmente realizados" ) );
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 2 ), "Realizados" ) );
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 3 ), "Desmarcados pelo trabalhador" ) );
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 4 ), "Desmarcados pela SIPRP" ) );
|
|
|
|
|
estadoList.addItem( new MappableObject( new Integer( 5 ), "Faltou" ) );
|
|
|
|
|
estadoList.setSelectedIndex( 0 );
|
|
|
|
|
|
|
|
|
|
detalhesPanel.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Detalhes" ) );
|
|
|
|
|
|
|
|
|
|
IDObject estadoListOptions[] = new IDObject[]{
|
|
|
|
|
new MappableObject( new Integer( 0 ), "Por realizar" ),
|
|
|
|
|
new MappableObject( new Integer( 1 ), "Parcialmente realizados" ),
|
|
|
|
|
new MappableObject( new Integer( 2 ), "Realizados" ),
|
|
|
|
|
new MappableObject( new Integer( 3 ), "Desmarcados pelo trabalhador" ),
|
|
|
|
|
new MappableObject( new Integer( 4 ), "Desmarcados pela SIPRP" ),
|
|
|
|
|
new MappableObject( new Integer( 5 ), "Faltou" ),
|
|
|
|
|
};
|
|
|
|
|
estadoList = new RadioButtonFixedPanel( estadoListOptions, 6, 1, RadioButtonFixedPanel.ORIENTATION_VERTICAL, false, null );
|
|
|
|
|
estadoList.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Estado" ) );
|
|
|
|
|
emailButton.setMinimumSize( new Dimension( 300, 20 ) );
|
|
|
|
|
emailButton.setPreferredSize( new Dimension( 300, 20 ) );
|
|
|
|
|
|
|
|
|
|
observacoesTextScroll.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Observa\u00e7\u00f5es" ) );
|
|
|
|
|
observacoesText.setLineWrap( true );
|
|
|
|
|
observacoesText.setWrapStyleWord( true );
|
|
|
|
|
observacoesText.setRows( 5 );
|
|
|
|
|
observacoesText.setRows( 3 );
|
|
|
|
|
|
|
|
|
|
historicoButton.setMinimumSize( new Dimension( 300, 20 ) );
|
|
|
|
|
historicoButton.setPreferredSize( new Dimension( 400, 20 ) );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -84,6 +91,10 @@ public class MarcacaoExamePanel
|
|
|
|
|
detalhesPanelGBC.insets = new Insets( 1, 1, 1, 1 );
|
|
|
|
|
GridBagLayout detalhesPanelLayout = new GridBagLayout();
|
|
|
|
|
detalhesPanel.setLayout( detalhesPanelLayout );
|
|
|
|
|
GridBagConstraints historicoPanelGBC = new GridBagConstraints();
|
|
|
|
|
historicoPanelGBC.insets = new Insets( 1, 1, 1, 1 );
|
|
|
|
|
GridBagLayout historicoPanelLayout = new GridBagLayout();
|
|
|
|
|
historicoPanel.setLayout( historicoPanelLayout );
|
|
|
|
|
GridBagConstraints MarcacaoExamePanelGBC = new GridBagConstraints();
|
|
|
|
|
MarcacaoExamePanelGBC.insets = new Insets( 1, 1, 1, 1 );
|
|
|
|
|
GridBagLayout MarcacaoExamePanelLayout = new GridBagLayout();
|
|
|
|
|
@ -115,35 +126,65 @@ public class MarcacaoExamePanel
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.NONE;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( emailButton, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( emailButton );
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( novaDataButton, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( novaDataButton );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 0;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.BOTH;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( detalhesPanel, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( detalhesPanel );
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.HORIZONTAL;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( estadoLabel, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( estadoLabel );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.BOTH;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.HORIZONTAL;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( estadoList, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( estadoList );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 3;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.8;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.BOTH;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( detalhesPanel, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( detalhesPanel );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 0;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.NONE;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( emailButton, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( emailButton );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 0;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 3;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 2;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 0.5;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.8;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.BOTH;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( historicoPanel, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( historicoPanel );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 0;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 4;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 3;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 1.0;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 1.0;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.2;
|
|
|
|
|
observacoesTextScroll.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
|
|
|
|
|
observacoesTextScroll.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED );
|
|
|
|
|
observacoesTextScroll.setViewportView( observacoesText );
|
|
|
|
|
@ -151,6 +192,16 @@ public class MarcacaoExamePanel
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( observacoesTextScroll, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( observacoesTextScroll );
|
|
|
|
|
|
|
|
|
|
MarcacaoExamePanelGBC.gridx = 0;
|
|
|
|
|
MarcacaoExamePanelGBC.gridy = 5;
|
|
|
|
|
MarcacaoExamePanelGBC.gridwidth = 3;
|
|
|
|
|
MarcacaoExamePanelGBC.gridheight = 1;
|
|
|
|
|
MarcacaoExamePanelGBC.weightx = 1.0;
|
|
|
|
|
MarcacaoExamePanelGBC.weighty = 0.0;
|
|
|
|
|
MarcacaoExamePanelGBC.fill = GridBagConstraints.NONE;
|
|
|
|
|
MarcacaoExamePanelLayout.setConstraints( historicoButton, MarcacaoExamePanelGBC );
|
|
|
|
|
MarcacaoExamePanel.add( historicoButton );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setupComponentsHashtable()
|
|
|
|
|
@ -249,11 +300,31 @@ public class MarcacaoExamePanel
|
|
|
|
|
return emailButton;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public RadioButtonFixedPanel getEstadoList()
|
|
|
|
|
public JLabel getEstadoLabel()
|
|
|
|
|
{
|
|
|
|
|
return estadoLabel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JComboBox getEstadoList()
|
|
|
|
|
{
|
|
|
|
|
return estadoList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JButton getHistoricoButton()
|
|
|
|
|
{
|
|
|
|
|
return historicoButton;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JPanelControllable getHistoricoPanel()
|
|
|
|
|
{
|
|
|
|
|
return historicoPanel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JButton getNovaDataButton()
|
|
|
|
|
{
|
|
|
|
|
return novaDataButton;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StateTextArea getObservacoesText()
|
|
|
|
|
{
|
|
|
|
|
return observacoesText;
|
|
|
|
|
|