src/main/java/ubu/digit/ui/views/ActiveProjectsView.java
private void applyFilter(String column, String valueChange) {
		dataFilteredGrid = new ArrayList<ActiveProject>();
		Iterator<ActiveProject> iterator = dataActiveProjectsGrid.iterator();
		if(!valueChange.equals(" ")) {
			while (iterator.hasNext()) {
				ActiveProject activeproject = iterator.next();
				
				switch(column) {
					case "title":
						if(activeproject.getTitle().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "description":
						if(activeproject.getDescription().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "tutor":
						if(activeproject.getTutors().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "student":
						if(activeproject.getStudents().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "course":
						if(activeproject.getCourseAssignment().contains(valueChange)) {
						dataFilteredGrid.add(activeproject);
						}
						break;
				}
			}
			//Se establece los nuevos valores del grid
			table.setItems(dataFilteredGrid);
		}
	}
/**
	 * Crea una nueva lista con los valores filtrados
	 * 
	 * @param column
	 * @param valueChange
	 */
Crea una nueva lista con los valores filtrados

@param column
@param valueChange
Crea una nueva lista con los valores filtrados @param column @param valueChange
private void applyFilter(String column, String valueChange) {
		dataFilteredGrid = new ArrayList<ActiveProject>();
		Iterator<ActiveProject> iterator = dataActiveProjectsGrid.iterator();
		if(!valueChange.equals(" ")) {
			while (iterator.hasNext()) {
				ActiveProject activeproject = iterator.next();
				switch(column) {
					case "title":
						if(activeproject.getTitle().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "description":
						if(activeproject.getDescription().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "tutor":
						if(activeproject.getTutors().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "student":
						if(activeproject.getStudents().contains(valueChange)) {
							dataFilteredGrid.add(activeproject);
						}
						break;
					case "course":
						if(activeproject.getCourseAssignment().contains(valueChange)) {
						dataFilteredGrid.add(activeproject);
						}
						break;
				}
			}
			table.setItems(dataFilteredGrid);
		}
	}
private void applyFilter ( String column , String valueChange ) { dataFilteredGrid = new ArrayList < ActiveProject > ( ) ; Iterator < ActiveProject > iterator = dataActiveProjectsGrid . iterator ( ) ; if ( ! valueChange . equals ( " " ) ) { while ( iterator . hasNext ( ) ) { ActiveProject activeproject = iterator . next ( ) ; switch ( column ) { case "title" : if ( activeproject . getTitle ( ) . contains ( valueChange ) ) { dataFilteredGrid . add ( activeproject ) ; } break ; case "description" : if ( activeproject . getDescription ( ) . contains ( valueChange ) ) { dataFilteredGrid . add ( activeproject ) ; } break ; case "tutor" : if ( activeproject . getTutors ( ) . contains ( valueChange ) ) { dataFilteredGrid . add ( activeproject ) ; } break ; case "student" : if ( activeproject . getStudents ( ) . contains ( valueChange ) ) { dataFilteredGrid . add ( activeproject ) ; } break ; case "course" : if ( activeproject . getCourseAssignment ( ) . contains ( valueChange ) ) { dataFilteredGrid . add ( activeproject ) ; } break ; } } table . setItems ( dataFilteredGrid ) ; } }
Crea una nueva lista con los valores filtrados
Crea una nueva lista con los valores filtrados
//Se establece los nuevos valores del grid