Rev 1563 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1563 | Rev 1565 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.services.questionarios.utils; |
1 | package pt.estgp.estgweb.services.questionarios.utils; |
2 | 2 | ||
3 | import java.io.Serializable; |
3 | import java.io.Serializable; |
4 | import java.util.ArrayList; |
4 | import java.util.ArrayList; |
5 | import java.util.List; |
- | |
6 | 5 | ||
7 | /** |
6 | /** |
8 | * Created by jorgemachado on 07/12/16. |
7 | * Created by jorgemachado on 07/12/16. |
9 | */ |
8 | */ |
10 | public class ChartTable implements 1.5.0/docs/api/java/io/Serializable.html">Serializable{ |
9 | public class ChartTable implements 1.5.0/docs/api/java/io/Serializable.html">Serializable{ |
11 | 10 | ||
12 | public static int NUMBER_CHARTS_ROW = 3; |
11 | public static int NUMBER_CHARTS_ROW = 3; |
13 | 12 | ||
14 | ArrayList<ChartsRow> chartsRow = new ArrayList<ChartsRow>(); |
13 | ArrayList<ChartsRow> chartsRow = new ArrayList<ChartsRow>(); |
15 | 14 | ||
16 | public List<PerguntaStats> generateCompleteListPerguntas() |
15 | /*public List<PerguntaStats> generateCompleteListPerguntas() |
17 | { |
16 | { |
18 | List<PerguntaStats> perguntas = new ArrayList<PerguntaStats>(); |
17 | List<PerguntaStats> perguntas = new ArrayList<PerguntaStats>(); |
19 | for(ChartsRow row: chartsRow) |
18 | for(ChartsRow row: chartsRow) |
20 | { |
19 | { |
21 | for(PerguntaStats p : row.getPerguntaStats()) |
20 | for(PerguntaStats p : row.getPerguntaStats()) |
22 | perguntas.add(p); |
21 | perguntas.add(p); |
23 | } |
22 | } |
24 | return perguntas; |
23 | return perguntas; |
25 | } |
24 | }*/ |
26 | 25 | ||
27 | public void addChart(PerguntaStats chart) |
26 | public void addChart(PerguntaStats chart) |
28 | { |
27 | { |
29 | if(chartsRow.size() == 0 || chartsRow.get(chartsRow.size() - 1).getPerguntaStats().size() >= NUMBER_CHARTS_ROW) |
28 | if(chartsRow.size() == 0 || chartsRow.get(chartsRow.size() - 1).getPerguntaStats().size() >= NUMBER_CHARTS_ROW) |
30 | { |
29 | { |