((DeviationManager) overviewManager).lazyLoad(deviation,
new LazyLoadDeviationEnum[] {
LazyLoadDeviationEnum.COMMENTS,
LazyLoadDeviationEnum.ORDER_COSTS });
}
JXTable excelTable = new JXTable(new DeviationTableModel(objectList,
false, DeviationColumnExcelEnum.getColumnNames(), false, true));
// egne satt, ferdige ikke satt
if (checkBoxFilterOwn.isSelected() && !checkBoxFilterDone.isSelected()) {
MultiColPatternFilter ownFilters = new MultiColPatternFilter(2, 7);
ownFilters.setFilterStr(userFullName,
SuperPatternFilter.MODE.REGEX_FIND);
Filter[] filtersOwnDone = new Filter[] {
new PatternFilter("[^1]", Pattern.CASE_INSENSITIVE, 21),
ownFilters };
FilterPipeline filterPipelineOwnDoneExcel = new FilterPipeline(
filtersOwnDone);
excelTable.setFilters(filterPipelineOwnDoneExcel);
}
// egne satt,ferdige satt
else if (checkBoxFilterOwn.isSelected()
&& checkBoxFilterDone.isSelected()) {
MultiColPatternFilter ownFilters = new MultiColPatternFilter(2, 7);
ownFilters.setFilterStr(userFullName,
SuperPatternFilter.MODE.REGEX_FIND);
Filter[] filtersOwn = new Filter[] { ownFilters };
FilterPipeline filterPipelineOwnExcel = new FilterPipeline(
filtersOwn);
excelTable.setFilters(filterPipelineOwnExcel);
}
// egne ikke satt,ferdige ikke satt -> ingen filtre
else if (!checkBoxFilterOwn.isSelected()
&& !checkBoxFilterDone.isSelected()) {
Filter[] filtersDone = new Filter[] { new PatternFilter("[^1]",
Pattern.CASE_INSENSITIVE, 21) };
FilterPipeline filterPipelineDoneExcel = new FilterPipeline(
filtersDone);
excelTable.setFilters(filterPipelineDoneExcel);
}
// egne ikke satt,ferdige satt
else if (!checkBoxFilterOwn.isSelected()
&& checkBoxFilterDone.isSelected()) {
excelTable.setFilters(null);
}
Util.copySortOrder(table, excelTable);
return excelTable;