Révision 408
tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java (revision 408) | ||
---|---|---|
43 | 43 |
import org.txm.ca.core.statsengine.r.functions.ICA; |
44 | 44 |
import org.txm.chartsengine.core.results.IChartResult; |
45 | 45 |
import org.txm.core.preferences.TXMPreferences; |
46 |
import org.txm.functions.Function;
|
|
46 |
import org.txm.functions.TXMCommand;
|
|
47 | 47 |
import org.txm.lexicaltable.core.functions.LexicalTable; |
48 | 48 |
import org.txm.lexicaltable.core.functions.LexicalTableFactory; |
49 | 49 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
... | ... | |
61 | 61 |
* @author sloiseau |
62 | 62 |
* |
63 | 63 |
*/ |
64 |
public class CA extends Function implements IChartResult {
|
|
64 |
public class CA extends TXMCommand implements IChartResult {
|
|
65 | 65 |
|
66 | 66 |
/** The use Factomine R. */ |
67 | 67 |
boolean useFactoMineR = true; |
... | ... | |
975 | 975 |
|
976 | 976 |
@Override |
977 | 977 |
public String getSimpleName() { |
978 |
return analysisProperty.getName() + " (" + TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, this, CAPreferences.FIRST_DIMENSION) + "," + TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, this, CAPreferences.SECOND_DIMENSION) + ")";
|
|
978 |
return analysisProperty.getName() + " (" + this.getIntParameterValue(CAPreferences.FIRST_DIMENSION) + "," + this.getIntParameterValue(CAPreferences.SECOND_DIMENSION) + ")";
|
|
979 | 979 |
} |
980 | 980 |
|
981 | 981 |
@Override |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java (revision 408) | ||
---|---|---|
31 | 31 |
import org.txm.chartsengine.jfreechart.core.renderers.MultipleItemsSelector; |
32 | 32 |
import org.txm.chartsengine.jfreechart.core.themes.base.BlockRoundBorder; |
33 | 33 |
import org.txm.core.preferences.TXMPreferences; |
34 |
import org.txm.core.results.ITXMResult;
|
|
34 |
import org.txm.core.results.TXMResult; |
|
35 | 35 |
import org.txm.statsengine.core.StatException; |
36 | 36 |
import org.txm.utils.logger.Log; |
37 | 37 |
|
... | ... | |
49 | 49 |
|
50 | 50 |
|
51 | 51 |
@Override |
52 |
public JFreeChart createChart(ITXMResult result, String preferencesNode) {
|
|
52 |
public JFreeChart createChart(TXMResult result) {
|
|
53 | 53 |
|
54 | 54 |
|
55 | 55 |
CA ca = (CA) result; |
... | ... | |
75 | 75 |
// String yAxisLabel = CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX + " " + ca.getSecondDimension() + " (" + percent2 + "%)"; |
76 | 76 |
|
77 | 77 |
|
78 |
chart = ChartFactory.createScatterPlot(Utils.createCAFactorialMapChartTitle(ca), "", "", dataset, PlotOrientation.VERTICAL, TXMPreferences.getBoolean(CAPreferences.PREFERENCES_NODE, ChartsEnginePreferences.SHOW_LEGEND), false, false);
|
|
78 |
chart = ChartFactory.createScatterPlot(Utils.createCAFactorialMapChartTitle(ca), "", "", dataset, PlotOrientation.VERTICAL, TXMPreferences.getBoolean(ChartsEnginePreferences.SHOW_LEGEND, CAPreferences.PREFERENCES_NODE), false, false);
|
|
79 | 79 |
|
80 | 80 |
// Custom renderer |
81 | 81 |
chart.getXYPlot().setRenderer(new FCAItemSelectionRenderer(ca)); |
... | ... | |
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
@Override |
95 |
public void updateChart(Object chart, ITXMResult result, String preferencesNode) {
|
|
95 |
public void updateChart(Object chart, TXMResult result) {
|
|
96 | 96 |
|
97 |
|
|
98 | 97 |
FCAItemSelectionRenderer renderer = (FCAItemSelectionRenderer) ((JFreeChart)chart).getXYPlot().getRenderer(); |
99 | 98 |
XYPlot plot = ((JFreeChart)chart).getXYPlot(); |
100 | 99 |
|
101 | 100 |
|
102 |
renderer.setSeriesVisible(0, TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_VARIABLES));
|
|
103 |
renderer.setSeriesVisible(1, TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_INDIVIDUALS));
|
|
101 |
renderer.setSeriesVisible(0, result.getBooleanParameterValue(CAPreferences.SHOW_VARIABLES));
|
|
102 |
renderer.setSeriesVisible(1, result.getBooleanParameterValue(CAPreferences.SHOW_INDIVIDUALS));
|
|
104 | 103 |
|
105 | 104 |
// Create the limits border |
106 | 105 |
this.createCAFactorialMapChartLimitsBorder((JFreeChart) chart); |
107 | 106 |
|
108 | 107 |
this.updateChartCAFactorialMapSetDimensions(chart, (CA) result, |
109 |
TXMPreferences.getInt(preferencesNode, result, CAPreferences.FIRST_DIMENSION),
|
|
110 |
TXMPreferences.getInt(preferencesNode, result, CAPreferences.SECOND_DIMENSION));
|
|
108 |
result.getIntParameterValue(CAPreferences.FIRST_DIMENSION),
|
|
109 |
result.getIntParameterValue(CAPreferences.SECOND_DIMENSION));
|
|
111 | 110 |
|
112 | 111 |
|
113 |
super.updateChart(chart, result, preferencesNode);
|
|
112 |
super.updateChart(chart, result); |
|
114 | 113 |
|
115 | 114 |
|
116 | 115 |
((FCAItemSelectionRenderer)renderer).setBaseLinesVisible(false); |
... | ... | |
137 | 136 |
|
138 | 137 |
// Grid |
139 | 138 |
plot.setRangeGridlineStroke(plot.getDomainGridlineStroke()); |
140 |
plot.setDomainGridlinesVisible(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_GRID));
|
|
139 |
plot.setDomainGridlinesVisible(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID));
|
|
141 | 140 |
plot.setDomainZeroBaselineVisible(true); |
142 | 141 |
plot.setRangeZeroBaselineVisible(true); |
143 | 142 |
|
... | ... | |
148 | 147 |
|
149 | 148 |
|
150 | 149 |
|
151 |
renderer.setShapesVisible(TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_POINT_SHAPES));
|
|
150 |
renderer.setShapesVisible(result.getBooleanParameterValue(CAPreferences.SHOW_POINT_SHAPES));
|
|
152 | 151 |
renderer.setBaseLinesVisible(false); |
153 | 152 |
|
154 | 153 |
// Draw the point shapes and the item labels |
155 |
if(TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_POINT_SHAPES)) {
|
|
154 |
if(result.getBooleanParameterValue(CAPreferences.SHOW_POINT_SHAPES)) {
|
|
156 | 155 |
|
157 | 156 |
renderer.setSeriesItemLabelPaint(0, renderer.getBaseItemLabelPaint()); |
158 | 157 |
renderer.setSeriesItemLabelPaint(1, renderer.getBaseItemLabelPaint()); |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCSingularValueChartCreator.java (revision 408) | ||
---|---|---|
7 | 7 |
import org.txm.ca.core.chartsengine.jfreechart.themes.highcharts.renderers.CASingularValuesItemSelectionRenderer; |
8 | 8 |
import org.txm.ca.core.functions.CA; |
9 | 9 |
import org.txm.ca.core.messages.CACoreMessages; |
10 |
import org.txm.core.results.ITXMResult;
|
|
10 |
import org.txm.core.results.TXMResult; |
|
11 | 11 |
import org.txm.chartsengine.jfreechart.core.JFCChartCreator; |
12 | 12 |
import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis; |
13 | 13 |
import org.txm.statsengine.core.StatException; |
... | ... | |
29 | 29 |
|
30 | 30 |
|
31 | 31 |
@Override |
32 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
32 |
public Object createChart(TXMResult result) {
|
|
33 | 33 |
|
34 | 34 |
|
35 | 35 |
CA ca = (CA) result; |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java (revision 408) | ||
---|---|---|
11 | 11 |
import org.txm.ca.core.preferences.CAPreferences; |
12 | 12 |
import org.txm.ca.core.statsengine.r.functions.FactoMineRCA; |
13 | 13 |
import org.txm.core.preferences.TXMPreferences; |
14 |
import org.txm.core.results.ITXMResult;
|
|
14 |
import org.txm.core.results.TXMResult; |
|
15 | 15 |
import org.txm.chartsengine.r.core.RChartCreator; |
16 | 16 |
import org.txm.chartsengine.r.core.RChartsEngine; |
17 | 17 |
import org.txm.utils.logger.Log; |
... | ... | |
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
@Override |
126 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
126 |
public Object createChart(TXMResult result) {
|
|
127 | 127 |
// TODO Auto-generated method stub |
128 | 128 |
return null; |
129 | 129 |
} |
130 | 130 |
|
131 | 131 |
@Override |
132 |
public File createChartFile(ITXMResult result, File file, String preferencesNode) {
|
|
132 |
public File createChartFile(TXMResult result, File file) {
|
|
133 | 133 |
|
134 | 134 |
CA ca = (CA) result; |
135 | 135 |
|
136 | 136 |
// parameters |
137 |
boolean showIndividual = TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_INDIVIDUALS);
|
|
138 |
boolean showVariables = TXMPreferences.getBoolean(preferencesNode, result, CAPreferences.SHOW_VARIABLES);
|
|
137 |
boolean showIndividual = result.getBooleanParameterValue(CAPreferences.SHOW_INDIVIDUALS);
|
|
138 |
boolean showVariables = result.getBooleanParameterValue(CAPreferences.SHOW_VARIABLES);
|
|
139 | 139 |
|
140 | 140 |
|
141 | 141 |
// FactoMineR R package |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RSingularValuesChartCreator.java (revision 408) | ||
---|---|---|
5 | 5 |
import org.txm.ca.core.functions.CA; |
6 | 6 |
import org.txm.ca.core.messages.CACoreMessages; |
7 | 7 |
import org.txm.ca.core.statsengine.r.functions.FactoMineRCA; |
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 |
|
11 | 11 |
/** |
... | ... | |
28 | 28 |
|
29 | 29 |
|
30 | 30 |
@Override |
31 |
public Object createChart(ITXMResult result, String preferencesNode) {
|
|
31 |
public Object createChart(TXMResult result) {
|
|
32 | 32 |
// TODO Auto-generated method stub |
33 | 33 |
return null; |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
|
37 | 37 |
@Override |
38 |
public File createChartFile(ITXMResult result, File file, String preferencesNode) {
|
|
38 |
public File createChartFile(TXMResult result, File file) {
|
|
39 | 39 |
|
40 | 40 |
CA ca = (CA) result; |
41 | 41 |
|
Formats disponibles : Unified diff