Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
fixing indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pawc committed Nov 10, 2015
1 parent e6d7802 commit dd0b679
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,31 +168,31 @@ private void exportByRegion() {

Vector<String> uniqueRegions = new Vector<String>();
for(Case c : filteredCases){
if(!(uniqueRegions.contains(c.getIncident().getRegion())))
uniqueRegions.add(c.getIncident().getRegion()) ;
if(!(uniqueRegions.contains(c.getIncident().getRegion())))
uniqueRegions.add(c.getIncident().getRegion()) ;
}

List<String[]> cells = new ArrayList<String[]>();
for(String region : uniqueRegions){
for(Case c : filteredCases){
if(!(c.getIncident().getRegion().equals(region))) continue;
String[] row = new String[6];
row[0] = c.getNumber();
row[1] = c.getDescription();
row[2] = c.getInvestigatingOfficer().getName().toString();
row[3] = c.getIncident().getDate().toString();
row[4] = c.getType();
row[5] = c.getIncident().getRegion();
cells.add(row);
}
}
for(String region : uniqueRegions){
for(Case c : filteredCases){
if(!(c.getIncident().getRegion().equals(region))) continue;
String[] row = new String[6];
row[0] = c.getNumber();
row[1] = c.getDescription();
row[2] = c.getInvestigatingOfficer().getName().toString();
row[3] = c.getIncident().getDate().toString();
row[4] = c.getType();
row[5] = c.getIncident().getRegion();
cells.add(row);
}
}

FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Save cases");
File file = fileChooser.showSaveDialog(stage);
if(file==null){
logger.info("cancelling PDF export");
return;
logger.info("cancelling PDF export");
return;
}

exportService.exportToPDF(headers, cells, file);
Expand Down

0 comments on commit dd0b679

Please sign in to comment.