| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -197,21 +197,21 @@ public class FichaWindow extends TabbedWindow
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											"Imprimir Fichas Anteriores", null,
 | 
					 | 
					 | 
					 | 
											"Imprimir Fichas Anteriores", null,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											0, false );
 | 
					 | 
					 | 
					 | 
											0, false );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							registerAction( new ActionHandler(){
 | 
					 | 
					 | 
					 | 
					//		registerAction( new ActionHandler(){
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												public void execute()
 | 
					 | 
					 | 
					 | 
					//							public void execute()
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												{
 | 
					 | 
					 | 
					 | 
					//							{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
													printOldFO();
 | 
					 | 
					 | 
					 | 
					//								printOldFO();
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												}
 | 
					 | 
					 | 
					 | 
					//							}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												
 | 
					 | 
					 | 
					 | 
					//							
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												public boolean activate( boolean newAction, boolean editAction, 
 | 
					 | 
					 | 
					 | 
					//							public boolean activate( boolean newAction, boolean editAction, 
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
																			boolean cancelAction, boolean saveAction,
 | 
					 | 
					 | 
					 | 
					//														boolean cancelAction, boolean saveAction,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
																			boolean deleteAction, boolean selectAction )
 | 
					 | 
					 | 
					 | 
					//														boolean deleteAction, boolean selectAction )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												{
 | 
					 | 
					 | 
					 | 
					//							{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
													return saveAction || editAction;
 | 
					 | 
					 | 
					 | 
					//								return saveAction || editAction;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												}
 | 
					 | 
					 | 
					 | 
					//							}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											}, "Imprimir Fichas Anteriores (novo)", 
 | 
					 | 
					 | 
					 | 
					//						}, "Imprimir Fichas Anteriores (novo)", 
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											"Imprimir Fichas Anteriores (novo)", null,
 | 
					 | 
					 | 
					 | 
					//						"Imprimir Fichas Anteriores (novo)", null,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											0, false );
 | 
					 | 
					 | 
					 | 
					//						0, false );
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											
 | 
					 | 
					 | 
					 | 
											
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							registerAction( new ActionHandler(){
 | 
					 | 
					 | 
					 | 
							registerAction( new ActionHandler(){
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												public void execute()
 | 
					 | 
					 | 
					 | 
												public void execute()
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -644,31 +644,31 @@ public class FichaWindow extends TabbedWindow
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											fileName = absolutePath + fileName + ".pdf";
 | 
					 | 
					 | 
					 | 
											fileName = absolutePath + fileName + ".pdf";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}
 | 
					 | 
					 | 
					 | 
										}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										
 | 
					 | 
					 | 
					 | 
										
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										if( fo != null )
 | 
					 | 
					 | 
					 | 
					//					if( fo != null )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										{
 | 
					 | 
					 | 
					 | 
					//					{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											Printer.printFoToFile( fo, fileName, true );
 | 
					 | 
					 | 
					 | 
					//						Printer.printFoToFile( fo, fileName, true );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}
 | 
					 | 
					 | 
					 | 
					//					}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										else
 | 
					 | 
					 | 
					 | 
					//					else
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										{
 | 
					 | 
					 | 
					 | 
					//					{
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											Printer.printPDFToFile( pdf, fileName, true );
 | 
					 | 
					 | 
					 | 
											Printer.printPDFToFile( pdf, fileName, true );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}
 | 
					 | 
					 | 
					 | 
					//					}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										JOptionPane.showMessageDialog( this, "Ficha exportada para: " + fileName );
 | 
					 | 
					 | 
					 | 
										JOptionPane.showMessageDialog( this, "Ficha exportada para: " + fileName );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
								}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							else
 | 
					 | 
					 | 
					 | 
							else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							{
 | 
					 | 
					 | 
					 | 
							{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								if( fo != null )
 | 
					 | 
					 | 
					 | 
					//			if( fo != null )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
					//			{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									FichaAptidaoCreator.getCreator().print( fo );
 | 
					 | 
					 | 
					 | 
					//				FichaAptidaoCreator.getCreator().print( fo );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
					//			}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								else
 | 
					 | 
					 | 
					 | 
					//			else
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
					//			{
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR );
 | 
					 | 
					 | 
					 | 
									TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) );
 | 
					 | 
					 | 
					 | 
									String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" );
 | 
					 | 
					 | 
					 | 
									nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									ePDF.print( pdf, nomeFicheiro );
 | 
					 | 
					 | 
					 | 
									ePDF.print( pdf, nomeFicheiro );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
					//			}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1182,28 +1182,28 @@ public class FichaWindow extends TabbedWindow
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						
 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						private void printOldFO()
 | 
					 | 
					 | 
					 | 
					//	private void printOldFO()
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						{
 | 
					 | 
					 | 
					 | 
					//	{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if( trabalhadorID != null )
 | 
					 | 
					 | 
					 | 
					//		if( trabalhadorID != null )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							{
 | 
					 | 
					 | 
					 | 
					//		{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								Vector linhas;
 | 
					 | 
					 | 
					 | 
					//			Vector linhas;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								try
 | 
					 | 
					 | 
					 | 
					//			try
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
					//			{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									IDObject fichas[] = fdpProvider.getAllFichasForTrabalhador( trabalhadorID );
 | 
					 | 
					 | 
					 | 
					//				IDObject fichas[] = fdpProvider.getAllFichasForTrabalhador( trabalhadorID );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									linhas = new Vector( Arrays.asList( fichas ) );
 | 
					 | 
					 | 
					 | 
					//				linhas = new Vector( Arrays.asList( fichas ) );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
					//			}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								catch( Exception ex )
 | 
					 | 
					 | 
					 | 
					//			catch( Exception ex )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
					//			{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									DialogException.showExceptionMessage( ex, "Erro a criar lista de Fichas anteriores", true );
 | 
					 | 
					 | 
					 | 
					//				DialogException.showExceptionMessage( ex, "Erro a criar lista de Fichas anteriores", true );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									return;
 | 
					 | 
					 | 
					 | 
					//				return;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
					//			}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								ListActionDialog dialog = new ListActionDialog( this, "Imprimir Fichas Anteriores", new String[]{ "Data" },
 | 
					 | 
					 | 
					 | 
					//			ListActionDialog dialog = new ListActionDialog( this, "Imprimir Fichas Anteriores", new String[]{ "Data" },
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
																		linhas, this );
 | 
					 | 
					 | 
					 | 
					//													linhas, this );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								dialog.setSize( 250, 200 );
 | 
					 | 
					 | 
					 | 
					//			dialog.setSize( 250, 200 );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								useFO = true;
 | 
					 | 
					 | 
					 | 
					//			useFO = true;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								dialog.setVisible( true );
 | 
					 | 
					 | 
					 | 
					//			dialog.setVisible( true );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
					//		}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
					//	}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						
 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						public boolean executeListAction( int line, Object value )
 | 
					 | 
					 | 
					 | 
						public boolean executeListAction( int line, Object value )
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						{
 | 
					 | 
					 | 
					 | 
						{
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1211,20 +1211,20 @@ public class FichaWindow extends TabbedWindow
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							{
 | 
					 | 
					 | 
					 | 
							{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								try
 | 
					 | 
					 | 
					 | 
								try
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
								{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									if( useFO )
 | 
					 | 
					 | 
					 | 
					//				if( useFO )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									{
 | 
					 | 
					 | 
					 | 
					//				{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										ExameData exame = (ExameData) JDO.load( ExameData.class, ( ( IDObject )value ).getID() );
 | 
					 | 
					 | 
					 | 
					//					ExameData exame = (ExameData) JDO.load( ExameData.class, ( ( IDObject )value ).getID() );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										if( exame == null )
 | 
					 | 
					 | 
					 | 
					//					if( exame == null )
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										{
 | 
					 | 
					 | 
					 | 
					//					{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											throw new Exception( "N\u00e3o existe exame" );
 | 
					 | 
					 | 
					 | 
					//						throw new Exception( "N\u00e3o existe exame" );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}
 | 
					 | 
					 | 
					 | 
					//					}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										byte fo[] = (byte[]) exame.get( ExameData.FO );
 | 
					 | 
					 | 
					 | 
					//					byte fo[] = (byte[]) exame.get( ExameData.FO );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										Printer.printFO( fo );
 | 
					 | 
					 | 
					 | 
					//					Printer.printFO( fo );
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
					//				}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									else
 | 
					 | 
					 | 
					 | 
					//				else
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									{
 | 
					 | 
					 | 
					 | 
					//				{
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										print( ( ( IDObject )value ).getID(), false );
 | 
					 | 
					 | 
					 | 
										print( ( ( IDObject )value ).getID(), false );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
					//				}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
								}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								catch( Exception ex )
 | 
					 | 
					 | 
					 | 
								catch( Exception ex )
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								{
 | 
					 | 
					 | 
					 | 
								{
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |