|  |  | @ -7,23 +7,30 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | package siprp.ficha; |  |  |  | package siprp.ficha; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.awt.*; |  |  |  | import java.awt.*; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.awt.event.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.swing.*; |  |  |  | import javax.swing.*; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import javax.swing.event.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.*; |  |  |  | import java.util.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.data.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.ui.*; |  |  |  | import com.evolute.utils.ui.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.ui.button.*; |  |  |  | import com.evolute.utils.ui.button.*; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.ui.panel.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @author  fpalma |  |  |  |  * @author  fpalma | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | public class ExamePanel extends JPanel |  |  |  | public class ExamePanel extends JPanel | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	implements ChangeListener | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private JCalendarPanel dataExamePanel; |  |  |  | 	private JCalendarPanel dataExamePanel; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private BetterButtonGroup tipoGroup; |  |  |  | 	private BetterButtonGroup tipoGroup; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private RadioButtonGroup ocasionalGroup; |  |  |  | 	private JRadioButton ocasionalRadio; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	private JRadioButton outroRadio; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	private RadioButtonPanel ocasionalPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private JTextField especificarText; |  |  |  | 	private JTextField especificarText; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private RadioButtonGroup resultadoGroup; |  |  |  | 	private RadioButtonPanel resultadoPanel; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 	private JTextField outrasFuncoesTexts[]; |  |  |  | 	private JTextField outrasFuncoesTexts[]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	/** Creates a new instance of ExamePanel */ |  |  |  | 	/** Creates a new instance of ExamePanel */ | 
			
		
	
	
		
		
			
				
					|  |  | @ -53,28 +60,29 @@ public class ExamePanel extends JPanel | 
			
		
	
		
		
			
				
					
					|  |  |  | 		tipoGroup.add( admissaoRadio ); |  |  |  | 		tipoGroup.add( admissaoRadio ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JRadioButton periodicoRadio = new JRadioButton( "Peri\u00f3dico" ); |  |  |  | 		JRadioButton periodicoRadio = new JRadioButton( "Peri\u00f3dico" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		tipoGroup.add( periodicoRadio ); |  |  |  | 		tipoGroup.add( periodicoRadio ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JRadioButton ocasionalRadio = new JRadioButton( "Ocasional" ); |  |  |  | 		ocasionalRadio = new JRadioButton( "Ocasional" ); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		tipoGroup.add( ocasionalRadio ); |  |  |  | 		tipoGroup.add( ocasionalRadio ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JRadioButton outroRadio = new JRadioButton( "Outro" ); |  |  |  | 		ocasionalRadio.addChangeListener( this ); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		outroRadio = new JRadioButton( "Outro" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		tipoGroup.add( outroRadio ); |  |  |  | 		tipoGroup.add( outroRadio ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JPanel ocasionalPanel = new JPanel(); |  |  |  | 		outroRadio.addChangeListener( this ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		ocasionalPanel.setBorder( BorderFactory.createEtchedBorder() ); |  |  |  | 		ocasionalPanel = new RadioButtonPanel(   | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		ocasionalGroup =  |  |  |  | 			new IDObject[]{ new MappableObject( new Integer( 1 ), "Ap\u00f3s doen\u00e7a" ),  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			new RadioButtonGroup( ocasionalPanel,  |  |  |  | 							new MappableObject( new Integer( 2 ), "Ap\u00f3s acidente" ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 								new Vector( Arrays.asList(  |  |  |  | 							new MappableObject( new Integer( 3 ), "A pedido do trabalhador" ),  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									new String[]{ "Ap\u00f3s doen\u00e7a", "Ap\u00f3s acidente", |  |  |  | 							new MappableObject( new Integer( 4 ), "A pedido do servi\u00e7o" ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 													"A pedido do trabalhador", "A pedido do servi\u00e7o", |  |  |  | 							new MappableObject( new Integer( 5 ), "Por mudan\u00e7a de fun\u00e7\u00e3o" ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 													"Por mudan\u00e7a de fun\u00e7\u00e3o", |  |  |  | 							new MappableObject( new Integer( 6 ), "Por altera\u00e7\u00e3o das condi\u00e7\u00f5es de trabalho" ) }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 													"Por altera\u00e7\u00e3o das condi\u00e7\u00f5es de trabalho" } ) ), |  |  |  | 			false ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									false, true ); |  |  |  | 		ocasionalPanel.setEnabled( false ); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		especificarText = new JTextField(); |  |  |  | 		especificarText = new JTextField(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JPanel resultadoPanel = new JPanel(); |  |  |  | 		especificarText.setEnabled( false ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		resultadoGroup =  |  |  |  | 		resultadoPanel = new RadioButtonPanel(   | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			new RadioButtonGroup( resultadoPanel,  |  |  |  | 			new IDObject[]{ new MappableObject( new Integer( 1 ), "Apto" ),  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 								new Vector( Arrays.asList(  |  |  |  | 							new MappableObject( new Integer( 2 ), "Apto condicionalmente" ), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									new String[]{ "Apto", "Apto condicionalmente", |  |  |  | 							new MappableObject( new Integer( 3 ), "Inapto temporariamente" ),  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 													"Inapto temporariamente", "Inapto definitivamente" } ) ), |  |  |  | 							new MappableObject( new Integer( 4 ), "Inapto definitivamente" ) }, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									false, true ); |  |  |  | 			false ); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		JLabel outrasFuncoesLabel = new JLabel( "Outras fun\u00e7\u00f5es que pode desempenhar", JLabel.CENTER ); |  |  |  | 		JLabel outrasFuncoesLabel = new JLabel( "Outras fun\u00e7\u00f5es que pode desempenhar", JLabel.CENTER ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JPanel outrasFuncoesPanel = new JPanel(); |  |  |  | 		JPanel outrasFuncoesPanel = new JPanel(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JLabel outrasFuncoesLabels[] = new JLabel[ 4 ]; |  |  |  | 		JLabel outrasFuncoesLabels[] = new JLabel[ 4 ]; | 
			
		
	
	
		
		
			
				
					|  |  | @ -174,4 +182,16 @@ public class ExamePanel extends JPanel | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		 |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	public void stateChanged( ChangeEvent e )  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		if( e.getSource().equals( ocasionalRadio ) ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			ocasionalPanel.setEnabled( ocasionalRadio.isSelected() ) ; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		else if( e.getSource().equals( outroRadio ) ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			especificarText.setEnabled( outroRadio.isSelected() ) ; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |