|
|
|
|
@ -64,7 +64,7 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
|
|
|
|
|
private final JPanel cardPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private final JPanel controlPanel = new JPanel();
|
|
|
|
|
// private final JPanel controlPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private final CardLayout cardLayout = new CardLayout();
|
|
|
|
|
|
|
|
|
|
@ -92,7 +92,9 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
CREATE_CONSULTA, CREATE_CONSULTA_MARCACAO
|
|
|
|
|
}, onChange = "")
|
|
|
|
|
public final LeafButton buttonNovoProcessoConsulta = new LeafButton( "Nova Consulta" );
|
|
|
|
|
@ActionActivation(onSelect = { CREATE_EXAME,CREATE_EXAME_MARCACAO }, onChange = "")
|
|
|
|
|
@ActionActivation(onSelect = {
|
|
|
|
|
CREATE_EXAME, CREATE_EXAME_MARCACAO
|
|
|
|
|
}, onChange = "")
|
|
|
|
|
public final LeafButton buttonNovoProcessoExame = new LeafButton( "Novo Exame" );
|
|
|
|
|
|
|
|
|
|
// consulta
|
|
|
|
|
@ -134,8 +136,6 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
|
|
|
|
|
// control
|
|
|
|
|
|
|
|
|
|
public final LeafButton buttonControlClose = new LeafButton( "Fechar" );
|
|
|
|
|
|
|
|
|
|
public ProcessoAccoesPanel(SIPRPWindow parentWindow)
|
|
|
|
|
{
|
|
|
|
|
this.parentWindow = parentWindow;
|
|
|
|
|
@ -149,20 +149,10 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
TableLayout layout = new TableLayout( new double[] {
|
|
|
|
|
TableLayout.FILL
|
|
|
|
|
}, new double[] {
|
|
|
|
|
TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM
|
|
|
|
|
TableLayout.FILL
|
|
|
|
|
} );
|
|
|
|
|
this.setLayout( layout );
|
|
|
|
|
|
|
|
|
|
cardPanel.setLayout( cardLayout );
|
|
|
|
|
|
|
|
|
|
layout = new TableLayout( new double[] {
|
|
|
|
|
TableLayout.FILL, TableLayout.FILL
|
|
|
|
|
}, new double[] {
|
|
|
|
|
TableLayout.MINIMUM, TableLayout.MINIMUM
|
|
|
|
|
} );
|
|
|
|
|
layout.setVGap( 5 );
|
|
|
|
|
layout.setHGap( 5 );
|
|
|
|
|
controlPanel.setLayout( layout );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setupComponents()
|
|
|
|
|
@ -186,16 +176,7 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
cardPanel.add( panelConsultaMarcacao, PANEL_CONSULTA_MARCACAO_NAME );
|
|
|
|
|
cardPanel.add( panelExame, PANEL_EXAME_NAME );
|
|
|
|
|
cardPanel.add( panelExameMarcacao, PANEL_EXAME_MARCACAO_NAME );
|
|
|
|
|
|
|
|
|
|
// controlPanel.add( buttonControlSave, new TableLayoutConstraints(0,0)
|
|
|
|
|
// );
|
|
|
|
|
// controlPanel.add( buttonControlRevert, new
|
|
|
|
|
// TableLayoutConstraints(1,0) );
|
|
|
|
|
controlPanel.add( buttonControlClose, new TableLayoutConstraints( 0, 1, 1, 1 ) );
|
|
|
|
|
|
|
|
|
|
this.add( cardPanel, new TableLayoutConstraints( 0, 0 ) );
|
|
|
|
|
this.add( new JPanel(), new TableLayoutConstraints( 0, 1 ) );
|
|
|
|
|
this.add( controlPanel, new TableLayoutConstraints( 0, 2 ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@LeafUIActionBinding(action = {
|
|
|
|
|
@ -262,7 +243,7 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
buttonNovoConsultaMarcacao.setEnabled( !marcacaoAberta && !new Integer(MedicinaConstants.ESTADO_REALIZADO).equals( consulta.getEstado() ));
|
|
|
|
|
buttonNovoConsultaMarcacao.setEnabled( !marcacaoAberta && !new Integer( MedicinaConstants.ESTADO_REALIZADO ).equals( consulta.getEstado() ) );
|
|
|
|
|
cardLayout.show( cardPanel, PANEL_CONSULTA_NAME );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
@ -278,7 +259,7 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
{
|
|
|
|
|
boolean porRealizar = new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ).equals( marcacao.getEstado() );
|
|
|
|
|
List list = marcacao.getTrabalhadoresConsultasDatasObservacoesArray();
|
|
|
|
|
boolean noObservacoes = (list == null || list.size() == 0) ? true : false;
|
|
|
|
|
boolean noObservacoes = (list == null || list.size() == 0) ? true : false;
|
|
|
|
|
buttonConsultaMarcacaoDesmarcar.setEnabled( porRealizar );
|
|
|
|
|
buttonConsultaMarcacaoFaltou.setEnabled( porRealizar );
|
|
|
|
|
buttonConsultaMarcacaoRealizar.setEnabled( porRealizar );
|
|
|
|
|
@ -335,7 +316,7 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
{
|
|
|
|
|
if( marcacao != null )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cardLayout.show( cardPanel, PANEL_EXAME_MARCACAO_NAME );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
@ -372,8 +353,6 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
|
|
|
|
|
private void setupStartPanel()
|
|
|
|
|
{
|
|
|
|
|
// panelStart.setBorder( BorderFactory.createTitledBorder(
|
|
|
|
|
// BorderFactory.createEtchedBorder(), "none" ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setupTrabalhadorPanel()
|
|
|
|
|
@ -393,7 +372,15 @@ public class ProcessoAccoesPanel extends JPanel
|
|
|
|
|
|
|
|
|
|
private void setupConsultaMarcacaoPanel()
|
|
|
|
|
{
|
|
|
|
|
setupSimpleActionsPanel( panelConsultaMarcacao, buttonNovoConsultaMarcacaoEmail, buttonNovoConsultaMarcacaoObservacoes, buttonConsultaMarcacaoRealizar, buttonConsultaMarcacaoDesmarcar, buttonConsultaMarcacaoFaltou, new JPanel() );
|
|
|
|
|
JPanel consultaMarcacaoUpperPanel = new JPanel();
|
|
|
|
|
JPanel consultaMarcacaoLowerPanel = new JPanel();
|
|
|
|
|
setupSimpleActionsPanel( consultaMarcacaoUpperPanel, buttonNovoConsultaMarcacaoEmail, buttonNovoConsultaMarcacaoObservacoes );
|
|
|
|
|
setupSimpleActionsPanel( consultaMarcacaoLowerPanel, buttonConsultaMarcacaoRealizar, buttonConsultaMarcacaoDesmarcar, buttonConsultaMarcacaoFaltou);
|
|
|
|
|
TableLayout consultaMarcacaoLayout = new TableLayout(new double[]{TableLayout.FILL}, new double[]{TableLayout.MINIMUM, TableLayout.FILL,TableLayout.MINIMUM});
|
|
|
|
|
panelConsultaMarcacao.setLayout( consultaMarcacaoLayout );
|
|
|
|
|
panelConsultaMarcacao.add( consultaMarcacaoUpperPanel, new TableLayoutConstraints(0,0) );
|
|
|
|
|
panelConsultaMarcacao.add( new JPanel(), new TableLayoutConstraints(0,1) );
|
|
|
|
|
panelConsultaMarcacao.add( consultaMarcacaoLowerPanel, new TableLayoutConstraints(0,2) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setupExamePanel()
|
|
|
|
|
|