Révision 412
tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java (revision 412) | ||
---|---|---|
9 | 9 |
import java.util.List; |
10 | 10 |
|
11 | 11 |
import org.txm.chartsengine.core.results.ChartResult; |
12 |
import org.txm.core.results.TXMParameters; |
|
13 |
import org.txm.functions.ProgressWatcher; |
|
12 | 14 |
import org.txm.partition.core.messages.PartitionCoreMessages; |
13 | 15 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
14 | 16 |
import org.txm.searchengine.cqp.corpus.Corpus; |
... | ... | |
124 | 126 |
// TODO Auto-generated method stub |
125 | 127 |
|
126 | 128 |
} |
127 |
|
|
129 |
|
|
130 |
|
|
128 | 131 |
} |
tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java (revision 412) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences; |
7 | 7 |
import org.txm.core.preferences.TXMPreferences; |
8 |
import org.txm.core.results.ITXMResult;
|
|
8 |
import org.txm.core.results.TXMResult; |
|
9 | 9 |
import org.txm.chartsengine.r.core.RChartCreator; |
10 | 10 |
import org.txm.chartsengine.r.core.RChartsEngine; |
11 | 11 |
import org.txm.partition.core.chartsengine.base.Utils; |
... | ... | |
26 | 26 |
} |
27 | 27 |
|
28 | 28 |
@Override |
29 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
29 |
public Object createChart(TXMResult result) {
|
|
30 | 30 |
return null; |
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
|
34 | 34 |
@Override |
35 |
public File createChartFile(ITXMResult result, File file, String preferencesNode) {
|
|
35 |
public File createChartFile(TXMResult result, File file) {
|
|
36 | 36 |
|
37 | 37 |
try { |
38 | 38 |
|
39 | 39 |
PartitionDimensions partitionDimensions = (PartitionDimensions) result; |
40 | 40 |
|
41 | 41 |
// parameters |
42 |
boolean sortPartsBySize = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
43 |
boolean displayPartsCountInTitle = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
42 |
boolean sortPartsBySize = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
43 |
boolean displayPartsCountInTitle = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
44 | 44 |
|
45 | 45 |
List<Part> parts = partitionDimensions.getParts(sortPartsBySize); |
46 | 46 |
|
... | ... | |
68 | 68 |
|
69 | 69 |
// Create chart title |
70 | 70 |
String title = ""; |
71 |
if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_TITLE)) {
|
|
71 |
if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE)) {
|
|
72 | 72 |
title = Utils.createPartitionDimensionsChartTitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle); |
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
// colors |
76 |
this.getChartsEngine().setColors(TXMPreferences.getInt(preferencesNode, result, ChartsEnginePreferences.RENDERING_COLORS_MODE), 1);
|
|
76 |
this.getChartsEngine().setColors(result.getIntParameterValue(ChartsEnginePreferences.RENDERING_COLORS_MODE), 1);
|
|
77 | 77 |
// FIXME: one color by part |
78 | 78 |
//this.getChartsEngine().setColors(TXMPreferences.getInt(preferencesNode, resultData, ChartsEnginePreferences.RENDERING_COLORS_MODE), parts.size()); |
79 | 79 |
|
... | ... | |
92 | 92 |
cmd += "barplot(" + ssizes + ", col=colors, names.arg=" + snames + //$NON-NLS-1$ //$NON-NLS-2$ |
93 | 93 |
", main=\"" + title + "\", horiz=F, las=2, ylab=\"" + ylab + "\");\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
94 | 94 |
|
95 |
if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_GRID)) {
|
|
95 |
if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID)) {
|
|
96 | 96 |
cmd += this.getChartsEngine().getGridPlotCmd(); |
97 | 97 |
} |
98 | 98 |
|
tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java (revision 412) | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences; |
7 | 7 |
import org.txm.core.preferences.TXMPreferences; |
8 |
import org.txm.core.results.ITXMResult;
|
|
8 |
import org.txm.core.results.TXMResult; |
|
9 | 9 |
import org.txm.chartsengine.r.core.RChartCreator; |
10 | 10 |
import org.txm.chartsengine.r.core.RChartsEngine; |
11 | 11 |
import org.txm.partition.core.chartsengine.base.Utils; |
... | ... | |
26 | 26 |
} |
27 | 27 |
|
28 | 28 |
@Override |
29 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
29 |
public Object createChart(TXMResult result) {
|
|
30 | 30 |
return null; |
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
|
34 | 34 |
@Override |
35 |
public File createChartFile(ITXMResult result, File file, String preferencesNode) {
|
|
35 |
public File createChartFile(TXMResult result, File file) {
|
|
36 | 36 |
|
37 | 37 |
try { |
38 | 38 |
|
39 | 39 |
PartitionDimensions partitionDimensions = (PartitionDimensions) result; |
40 | 40 |
|
41 | 41 |
// parameters |
42 |
boolean sortPartsBySize = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
43 |
boolean displayPartsCountInTitle = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
42 |
boolean sortPartsBySize = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
43 |
boolean displayPartsCountInTitle = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
44 | 44 |
|
45 | 45 |
List<Part> parts = partitionDimensions.getParts(sortPartsBySize); |
46 | 46 |
|
... | ... | |
67 | 67 |
ssizes += ")"; //$NON-NLS-1$ |
68 | 68 |
|
69 | 69 |
String title = ""; |
70 |
if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_TITLE)) {
|
|
70 |
if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE)) {
|
|
71 | 71 |
title = Utils.createPartitionDimensionsChartTitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle); |
72 | 72 |
} |
73 | 73 |
|
tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java (revision 412) | ||
---|---|---|
4 | 4 |
import org.jfree.chart.JFreeChart; |
5 | 5 |
import org.jfree.data.general.DefaultPieDataset; |
6 | 6 |
import org.txm.core.preferences.TXMPreferences; |
7 |
import org.txm.core.results.ITXMResult;
|
|
7 |
import org.txm.core.results.TXMResult; |
|
8 | 8 |
import org.txm.chartsengine.jfreechart.core.JFCChartCreator; |
9 | 9 |
import org.txm.partition.core.chartsengine.base.Utils; |
10 | 10 |
import org.txm.partition.core.functions.PartitionDimensions; |
... | ... | |
24 | 24 |
} |
25 | 25 |
|
26 | 26 |
@Override |
27 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
27 |
public Object createChart(TXMResult result) {
|
|
28 | 28 |
|
29 | 29 |
PartitionDimensions partitionDimensions = (PartitionDimensions) result; |
30 | 30 |
|
31 | 31 |
// parameters |
32 |
boolean sortPartsBySize = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
33 |
boolean displayPartsCountInTitle = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
32 |
boolean sortPartsBySize = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
33 |
boolean displayPartsCountInTitle = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
34 | 34 |
|
35 | 35 |
|
36 | 36 |
JFreeChart chart = null; |
tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java (revision 412) | ||
---|---|---|
12 | 12 |
import org.jfree.data.xy.XYSeriesCollection; |
13 | 13 |
import org.txm.chartsengine.core.ChartsEngine; |
14 | 14 |
import org.txm.core.preferences.TXMPreferences; |
15 |
import org.txm.core.results.ITXMResult;
|
|
15 |
import org.txm.core.results.TXMResult; |
|
16 | 16 |
import org.txm.chartsengine.jfreechart.core.JFCChartCreator; |
17 | 17 |
import org.txm.chartsengine.jfreechart.core.renderers.interfaces.IRendererWithItemSelection; |
18 | 18 |
import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis; |
... | ... | |
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
@Override |
38 |
public JFreeChart createChart(ITXMResult result, String preferencesNode) {
|
|
38 |
public JFreeChart createChart(TXMResult result) {
|
|
39 | 39 |
|
40 | 40 |
JFreeChart chart = null; |
41 | 41 |
|
... | ... | |
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
@Override |
57 |
public void updateChart(Object chart, ITXMResult result, String preferencesNode) {
|
|
57 |
public void updateChart(Object chart, TXMResult result) {
|
|
58 | 58 |
|
59 | 59 |
PartitionDimensions partitionDimensions = (PartitionDimensions) result; |
60 | 60 |
JFreeChart jfcChart = (JFreeChart) chart; |
... | ... | |
64 | 64 |
|
65 | 65 |
|
66 | 66 |
// parameters |
67 |
boolean sortPartsBySize = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
68 |
boolean displayPartsCountInTitle = TXMPreferences.getBoolean(preferencesNode, result, PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
67 |
boolean sortPartsBySize = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE);
|
|
68 |
boolean displayPartsCountInTitle = result.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE);
|
|
69 | 69 |
|
70 | 70 |
// Fill the data set |
71 | 71 |
XYSeriesCollection dataset = (XYSeriesCollection) jfcChart.getXYPlot().getDataset(); |
... | ... | |
98 | 98 |
|
99 | 99 |
|
100 | 100 |
|
101 |
super.updateChart(chart, result, preferencesNode);
|
|
101 |
super.updateChart(chart, result); |
|
102 | 102 |
|
103 | 103 |
|
104 | 104 |
// Subtitle |
Formats disponibles : Unified diff