Date from = null; Date to = null; JFritz.setProperty("filter.callin", "true"); callinFilterButton.setSelected(false); JFritz.setProperty("filter.callout", "true"); calloutFilterButton.setSelected(false); JFritz.setProperty("filter.calloutmissed", "false"); callinfailedFilterButton.setSelected(true); JFritz.setProperty("filter.comment", "true"); JFritz.setProperty("filter.comment.text", ""); commentFilterButton.setSelected(false); switch (filterType) { case MISSED_FILTER_WITHOUT_COMMENTS : break; case MISSED_FILTER_WITHOUT_COMMENTS_LAST_WEEK : { Calendar cal = Calendar.getInstance(); to = cal.getTime(); cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) - 7); from = cal.getTime(); String fromstr = new SimpleDateFormat("dd.MM.yy").format(from); String tostr = new SimpleDateFormat("dd.MM.yy").format(to); JFritz.setProperty("filter.date_from", fromstr); JFritz.setProperty("filter.date_to", tostr); JFritz.setProperty("filter.date", "true"); setDateFilterText(); break; } } jfritz.getCallerlist().updateFilter(); }
Date from = null; Date to = null; JFritz.setProperty("filter.callin", "true"); callinFilterButton.setSelected(false); JFritz.setProperty("filter.callout", "true"); calloutFilterButton.setSelected(false); JFritz.setProperty("filter.calloutmissed", "false"); callinfailedFilterButton.setSelected(true); JFritz.setProperty("filter.comment", "true"); JFritz.setProperty("filter.comment.text", ""); commentFilterButton.setSelected(false); switch (filterType) { case MISSED_FILTER_WITHOUT_COMMENTS: break; case MISSED_FILTER_WITHOUT_COMMENTS_LAST_WEEK: { Calendar cal = Calendar.getInstance(); to = cal.getTime(); cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) - 7); from = cal.getTime(); String fromstr = new SimpleDateFormat("dd.MM.yy").format(from); String tostr = new SimpleDateFormat("dd.MM.yy").format(to); JFritz.setProperty("filter.date_from", fromstr); JFritz.setProperty("filter.date_to", tostr); JFritz.setProperty("filter.date", "true"); jfritz.getCallerlist().getDateFilter().updateDateFilter(); setDateFilterText(); break; } } jfritz.getCallerlist().updateFilter(); }
	private void setMissedFilter(int filterType) {		Date from = null;		Date to = null;		JFritz.setProperty("filter.callin", "true"); //$NON-NLS-1$,  //$NON-NLS-2$		callinFilterButton.setSelected(false);		JFritz.setProperty("filter.callout", "true"); //$NON-NLS-1$,  //$NON-NLS-2$		calloutFilterButton.setSelected(false);		JFritz.setProperty("filter.calloutmissed", "false"); //$NON-NLS-1$,  //$NON-NLS-2$		callinfailedFilterButton.setSelected(true);		JFritz.setProperty("filter.comment", "true"); //$NON-NLS-1$,  //$NON-NLS-2$		JFritz.setProperty("filter.comment.text", ""); //$NON-NLS-1$,  //$NON-NLS-2$		commentFilterButton.setSelected(false);		switch (filterType) {			case MISSED_FILTER_WITHOUT_COMMENTS :				break;			case MISSED_FILTER_WITHOUT_COMMENTS_LAST_WEEK : {				Calendar cal = Calendar.getInstance();				to = cal.getTime();				cal.set(Calendar.DAY_OF_MONTH,						cal.get(Calendar.DAY_OF_MONTH) - 7);				from = cal.getTime();				String fromstr = new SimpleDateFormat("dd.MM.yy").format(from); //$NON-NLS-1$				String tostr = new SimpleDateFormat("dd.MM.yy").format(to); //$NON-NLS-1$				JFritz.setProperty("filter.date_from", fromstr); //$NON-NLS-1$				JFritz.setProperty("filter.date_to", tostr); //$NON-NLS-1$				JFritz.setProperty("filter.date", "true"); //$NON-NLS-1$,  //$NON-NLS-2$				setDateFilterText();				break;			}		}		jfritz.getCallerlist().updateFilter();	}