Rev 1565 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1574 | jmachado | 1 | package pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils; |
1563 | jmachado | 2 | |
3 | import java.io.Serializable; |
||
4 | import java.util.ArrayList; |
||
5 | |||
6 | /** |
||
7 | * Created by jorgemachado on 07/12/16. |
||
8 | */ |
||
9 | public class ChartTable implements 1.5.0/docs/api/java/io/Serializable.html">Serializable{ |
||
10 | |||
11 | public static int NUMBER_CHARTS_ROW = 3; |
||
12 | |||
13 | ArrayList<ChartsRow> chartsRow = new ArrayList<ChartsRow>(); |
||
14 | |||
1565 | jmachado | 15 | /*public List<PerguntaStats> generateCompleteListPerguntas() |
1563 | jmachado | 16 | { |
17 | List<PerguntaStats> perguntas = new ArrayList<PerguntaStats>(); |
||
18 | for(ChartsRow row: chartsRow) |
||
19 | { |
||
20 | for(PerguntaStats p : row.getPerguntaStats()) |
||
21 | perguntas.add(p); |
||
22 | } |
||
23 | return perguntas; |
||
1565 | jmachado | 24 | }*/ |
1563 | jmachado | 25 | |
26 | public void addChart(PerguntaStats chart) |
||
27 | { |
||
28 | if(chartsRow.size() == 0 || chartsRow.get(chartsRow.size() - 1).getPerguntaStats().size() >= NUMBER_CHARTS_ROW) |
||
29 | { |
||
30 | chartsRow.add(new ChartsRow()); |
||
31 | } |
||
32 | chartsRow.get(chartsRow.size() - 1).getPerguntaStats().add(chart); |
||
33 | } |
||
34 | |||
35 | public ArrayList<ChartsRow> getChartsRow() { |
||
36 | return chartsRow; |
||
37 | } |
||
38 | |||
39 | public void setChartsRow(ArrayList<ChartsRow> chartsRow) { |
||
40 | this.chartsRow = chartsRow; |
||
41 | } |
||
42 | |||
43 | public static class ChartsRow implements 1.5.0/docs/api/java/io/Serializable.html">Serializable |
||
44 | { |
||
45 | ArrayList<PerguntaStats> perguntaStats = new ArrayList<PerguntaStats>(); |
||
46 | |||
47 | public ArrayList<PerguntaStats> getPerguntaStats() { |
||
48 | return perguntaStats; |
||
49 | } |
||
50 | |||
51 | public void setPerguntaStats(ArrayList<PerguntaStats> perguntaStats) { |
||
52 | this.perguntaStats = perguntaStats; |
||
53 | } |
||
54 | } |
||
55 | } |
||
56 | |||
57 |