|  |  | @ -9,7 +9,13 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | package siprp.medicina.prestadores; |  |  |  | package siprp.medicina.prestadores; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.Singleton; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.data.IDObject; |  |  |  | import com.evolute.utils.data.IDObject; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.dataui.ComponentController; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.dataui.ComponentsHashtable; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.dataui.JDOControllable; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.dataui.JTextComponentPlainFillerSaver; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.jdo.JDOProvider; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.ui.DialogException; |  |  |  | import com.evolute.utils.ui.DialogException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.ui.panel.CheckBoxPanel; |  |  |  | import com.evolute.utils.ui.panel.CheckBoxPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.ui.search.SearchDialog; |  |  |  | import com.evolute.utils.ui.search.SearchDialog; | 
			
		
	
	
		
		
			
				
					|  |  | @ -28,6 +34,8 @@ import javax.swing.JTextArea; | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.swing.JTextField; |  |  |  | import javax.swing.JTextField; | 
			
		
	
		
		
			
				
					
					|  |  |  | import siprp.clientes.ClientesDataProvider; |  |  |  | import siprp.clientes.ClientesDataProvider; | 
			
		
	
		
		
			
				
					
					|  |  |  | import siprp.clientes.ContactoPanel; |  |  |  | import siprp.clientes.ContactoPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import siprp.data.ContactoData; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import siprp.medicina.prestadores.data.PrestadoresData; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
	
		
		
			
				
					|  |  | @ -51,6 +59,8 @@ public class PrestadoresWindow extends EditorWindow | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected PrestadoresDataProvider provider; |  |  |  | 	protected PrestadoresDataProvider provider; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected ClientesDataProvider clientesProvider; |  |  |  | 	protected ClientesDataProvider clientesProvider; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected ComponentsHashtable components; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	/** Creates a new instance of PrestadoresWindow */ |  |  |  | 	/** Creates a new instance of PrestadoresWindow */ | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public PrestadoresWindow() |  |  |  | 	public PrestadoresWindow() | 
			
		
	
		
		
			
				
					
					|  |  |  | 		throws Exception |  |  |  | 		throws Exception | 
			
		
	
	
		
		
			
				
					|  |  | @ -60,6 +70,7 @@ public class PrestadoresWindow extends EditorWindow | 
			
		
	
		
		
			
				
					
					|  |  |  | 		provider = PrestadoresDataProvider.getProvider(); |  |  |  | 		provider = PrestadoresDataProvider.getProvider(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		clientesProvider = ( ClientesDataProvider ) ClientesDataProvider.getProvider(); |  |  |  | 		clientesProvider = ( ClientesDataProvider ) ClientesDataProvider.getProvider(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		setupComponents(); |  |  |  | 		setupComponents(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		setupComponentsHashtable(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private void setupComponents() |  |  |  | 	private void setupComponents() | 
			
		
	
	
		
		
			
				
					|  |  | @ -131,6 +142,25 @@ public class PrestadoresWindow extends EditorWindow | 
			
		
	
		
		
			
				
					
					|  |  |  | 		pack(); |  |  |  | 		pack(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	private void setupComponentsHashtable() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components = new ComponentsHashtable(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.NOME, nomeText ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.NOME, new JTextComponentPlainFillerSaver( nomeText ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.MORADA, moradaText ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.CODIGO_POSTAL, codigoPostalText ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.LOCALIDADE_CP, localidadeCodigoPostalText ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.LOCALIDADE, localidadeText ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.ACTIVO, activoCheck ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.FAZ_CONSULTAS, consultasCheck ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.FAZ_ECDS, ecdsCheck ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		components.putComponent( PrestadoresData.CONTACTO_ID,  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				new JDOControllable( ( JDOProvider )Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 										ContactoData.class, new String[]{ ContactoData.ID }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 										contactoPanel ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public boolean searchByName() |  |  |  | 	public boolean searchByName() | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		SearchDialog search = new SearchDialog( provider ); |  |  |  | 		SearchDialog search = new SearchDialog( provider ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -154,6 +184,9 @@ public class PrestadoresWindow extends EditorWindow | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public void enableComponents( int index, boolean enable ) |  |  |  | 	public void enableComponents( int index, boolean enable ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		String names[] = (String[])components.keySet().toArray( new String[0] ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		ComponentController.setEnabled( names, enable, components ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		ecdsPanel.setEnabled( enable ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public void reload( int index ) |  |  |  | 	public void reload( int index ) | 
			
		
	
	
		
		
			
				
					|  |  | @ -171,6 +204,9 @@ public class PrestadoresWindow extends EditorWindow | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public void clear( int index ) |  |  |  | 	public void clear( int index ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		String names[] = (String[])components.keySet().toArray( new String[0] ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		ComponentController.clear( names, components ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		ecdsPanel.clear(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public boolean newItem( int index ) |  |  |  | 	public boolean newItem( int index ) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |