|  |  | @ -40,8 +40,10 @@ public class RegistarPresencasWindow extends JFrame | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected JCalendarPanel dataPanel; |  |  |  | 	protected JCalendarPanel dataPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected JButton carregarButton; |  |  |  | 	protected JButton carregarButton; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected JScrollPane listScroll; |  |  |  | 	protected JScrollPane listECDsScroll; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 	protected MultipleActionListPanel listPanel; |  |  |  | 	protected JScrollPane listConsultasScroll; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected MultipleActionListPanel listECDsPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected MultipleActionListPanel listConsultasPanel; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected MedicinaDataProvider provider; |  |  |  | 	protected MedicinaDataProvider provider; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
	
		
		
			
				
					|  |  | @ -80,16 +82,28 @@ public class RegistarPresencasWindow extends JFrame | 
			
		
	
		
		
			
				
					
					|  |  |  | 		getContentPane().setLayout( new BorderLayout( 5, 5 ) ); |  |  |  | 		getContentPane().setLayout( new BorderLayout( 5, 5 ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		JPanel upperPanel = new JPanel(); |  |  |  | 		JPanel upperPanel = new JPanel(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		getContentPane().add( upperPanel, BorderLayout.NORTH ); |  |  |  | 		getContentPane().add( upperPanel, BorderLayout.NORTH ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		JTabbedPane tabbedPane = new JTabbedPane(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		getContentPane().add( tabbedPane, BorderLayout.CENTER ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		 |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		listPanel =  |  |  |  | 		listECDsPanel =  | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 				new MultipleActionListPanel(  |  |  |  | 				new MultipleActionListPanel(  | 
			
		
	
		
		
			
				
					
					|  |  |  | 					new PresencasActionFactory[]{ shstDesmarcouFactory, faltouFactory }, |  |  |  | 					new PresencasActionFactory[]{ shstDesmarcouFactory, faltouFactory }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 					new PresencasActionFactory[]{ realizouFactory, realizouParcialmenteFactory, |  |  |  | 					new PresencasActionFactory[]{ realizouFactory, realizouParcialmenteFactory, | 
			
		
	
		
		
			
				
					
					|  |  |  | 													trabalhadorDesmarcouFactory, shstDesmarcouFactory,  |  |  |  | 													trabalhadorDesmarcouFactory, shstDesmarcouFactory,  | 
			
		
	
		
		
			
				
					
					|  |  |  | 													faltouFactory } ); |  |  |  | 													faltouFactory } ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		listScroll = new JScrollPane( listPanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, |  |  |  | 		listECDsScroll = new JScrollPane( listECDsPanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 										JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); |  |  |  | 										JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		getContentPane().add( listScroll, BorderLayout.CENTER ); |  |  |  | 		 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		listConsultasPanel =  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				new MultipleActionListPanel(  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					new PresencasActionFactory[]{ shstDesmarcouFactory, faltouFactory }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					new PresencasActionFactory[]{ realizouFactory, trabalhadorDesmarcouFactory,  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 													shstDesmarcouFactory, faltouFactory } ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		listConsultasScroll = new JScrollPane( listConsultasPanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 										JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tabbedPane.add( "ECDs", listECDsScroll ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tabbedPane.add( "Consultas", listConsultasScroll ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		 |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		upperPanel.setLayout( new FlowLayout( FlowLayout.CENTER ) ); |  |  |  | 		upperPanel.setLayout( new FlowLayout( FlowLayout.CENTER ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		upperPanel.add( dataLabel ); |  |  |  | 		upperPanel.add( dataLabel ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -152,20 +166,35 @@ public class RegistarPresencasWindow extends JFrame | 
			
		
	
		
		
			
				
					
					|  |  |  | 		try |  |  |  | 		try | 
			
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Date data = dataPanel.getDate(); |  |  |  | 			Date data = dataPanel.getDate(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Object marcacoesArray[][] = provider.getListaMarcacoesByData( data ); |  |  |  | 			Object ecdsArray[][] = provider.getListaECDsByData( data ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			List<Presenca> marcacoes = new Vector<Presenca>(); |  |  |  | 			List<Presenca> ecds = new Vector<Presenca>(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			for( int n = 0; n < marcacoesArray.length; n++ ) |  |  |  | 			for( int n = 0; n < ecdsArray.length; n++ ) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			{ |  |  |  | 			{ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				Integer id = ( Integer ) marcacoesArray[ n ][ 0 ]; |  |  |  | 				Integer id = ( Integer ) ecdsArray[ n ][ 0 ]; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				String nome = ( String ) marcacoesArray[ n ][ 1 ]; |  |  |  | 				String nome = ( String ) ecdsArray[ n ][ 1 ]; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				String nomePlain = ( String ) marcacoesArray[ n ][ 2 ]; |  |  |  | 				String nomePlain = ( String ) ecdsArray[ n ][ 2 ]; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				String empresa = ( String ) marcacoesArray[ n ][ 3 ]; |  |  |  | 				String empresa = ( String ) ecdsArray[ n ][ 3 ]; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				int tipo = ( ( Integer )marcacoesArray[ n ][ 4 ] ).intValue(); |  |  |  | 				int tipo = ( ( Integer )ecdsArray[ n ][ 4 ] ).intValue(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 				marcacoes.add( new Presenca( id, nome, nomePlain, empresa, tipo ) ); |  |  |  | 				ecds.add( new Presenca( id, nome, nomePlain, empresa, tipo ) ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			} |  |  |  | 			} | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			Collections.sort( marcacoes ); |  |  |  | 			Collections.sort( ecds ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			listPanel.showList( marcacoes.toArray( new Presenca[ marcacoes.size() ] ) ); |  |  |  | 			listECDsPanel.showList( ecds.toArray( new Presenca[ ecds.size() ] ) ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			listScroll.setViewportView( listPanel ); |  |  |  | 			listECDsScroll.setViewportView( listECDsPanel ); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Object consultasArray[][] = provider.getListaConsultasByData( data ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			List<Presenca> consultas = new Vector<Presenca>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			for( int n = 0; n < consultasArray.length; n++ ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				Integer id = ( Integer ) consultasArray[ n ][ 0 ]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				String nome = ( String ) consultasArray[ n ][ 1 ]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				String nomePlain = ( String ) consultasArray[ n ][ 2 ]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				String empresa = ( String ) consultasArray[ n ][ 3 ]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				int tipo = ( ( Integer )consultasArray[ n ][ 4 ] ).intValue(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				consultas.add( new Presenca( id, nome, nomePlain, empresa, tipo ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Collections.sort( consultas ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			listConsultasPanel.showList( consultas.toArray( new Presenca[ ecds.size() ] ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			listConsultasScroll.setViewportView( listConsultasPanel ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //			setExtendedState( getExtendedState() | MAXIMIZED_BOTH );
 |  |  |  | //			setExtendedState( getExtendedState() | MAXIMIZED_BOTH );
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		catch( Exception ex ) |  |  |  | 		catch( Exception ex ) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |