Révision 3835

TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/preferences/JFCChartsEnginePreferences.java (revision 3835)
14 14
public class JFCChartsEnginePreferences extends TXMPreferences {
15 15
	
16 16
	
17
	public final static String PREFERENCES_PREFIX = JFCChartsEngine.NAME + "_";
17
	public final static String PREFERENCES_PREFIX = JFCChartsEngine.NAME + "_"; //$NON-NLS-1$
18 18
	
19 19
	public static final String OUTPUT_FORMAT = PREFERENCES_PREFIX + "output_format"; //$NON-NLS-1$
20 20
	
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/messages.properties (revision 3835)
1
JFCChartsEngine_0=JFreeChart
0 2

  
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/swing/CustomHTMLToolTip.java (revision 3835)
55 55
	public static String getDefaultHTMLBody(IRendererWithItemSelection renderer, String hexBorderColor) {
56 56
		
57 57
		// FIXME: tests
58
		return "<html><body>";
58
		return "<html><body>"; //$NON-NLS-1$
59 59
		
60 60
		// return "<head>"
61 61
		// + "<style>"
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryLineAndShapeRenderer.java (revision 3835)
83 83
				
84 84
				// Hexadecimal color
85 85
				Color color = (Color) getSeriesPaint(row);
86
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
86
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
87 87
				
88 88
				DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset;
89
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row)
90
						+ ChartsEngineCoreMessages.EMPTY + " </span><b>" + catDataset.getValue(row, column) + "</b></p></body><html>";
89
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
90
						+ ChartsEngineCoreMessages.EMPTY + " </span><b>" + catDataset.getValue(row, column) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
91 91
			}
92 92
		});
93 93
	}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryStepRenderer.java (revision 3835)
41 41
		this.mouseOverItemSelector = new MouseOverItemSelector(this);
42 42
		
43 43
		// Default Values format
44
		String pattern = new String("#0.####");
44
		String pattern = new String("#0.####"); //$NON-NLS-1$
45 45
		this.valuesNumberFormat = new DecimalFormat(pattern);
46 46
		
47 47
		// Labels
......
69 69
				
70 70
				// Hexadecimal color
71 71
				Color color = (Color) getSeriesPaint(row);
72
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
72
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
73 73
				
74 74
				DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset;
75 75
				Number value = catDataset.getValue(row, column);
76 76
				
77
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row)
77
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
78 78
						+ ChartsEngineCoreMessages.EMPTY
79
						+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p></body><html>";
79
						+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
80 80
			}
81 81
		});
82 82
	}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYCardinalSplineRenderer.java (revision 3835)
95 95
				
96 96
				// Hexadecimal color
97 97
				Color color = (Color) getSeriesPaint(series);
98
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
98
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
99 99
				
100 100
				XYSeriesCollection xyDataset = (XYSeriesCollection) dataset;
101
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>"
101
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
102 102
						+ RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item))
103
						+ ChartsEngineCoreMessages.EMPTY + " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>";
103
						+ ChartsEngineCoreMessages.EMPTY + " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
104 104
			}
105 105
		});
106 106
		
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYSplineRenderer.java (revision 3835)
113 113
				
114 114
				// Hexadecimal color
115 115
				Color color = (Color) getSeriesPaint(series);
116
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
116
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
117 117
				
118 118
				XYSeriesCollection xyDataset = (XYSeriesCollection) dataset;
119
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>" + xyDataset.getSeries(
119
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>" + xyDataset.getSeries( //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
120 120
						series).getY(item)
121
						+ ChartsEngineCoreMessages.EMPTY + " </b><b>" + xyDataset.getSeries(series).getX(item) + "</b></p></body><html>";
121
						+ ChartsEngineCoreMessages.EMPTY + " </b><b>" + xyDataset.getSeries(series).getX(item) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
122 122
			}
123 123
		});
124 124
		
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYLineAndShapeRenderer.java (revision 3835)
91 91
		this.chart = chart;
92 92
		
93 93
		// Default Values format
94
		String pattern = new String("#0.####");
94
		String pattern = new String("#0.####"); //$NON-NLS-1$
95 95
		this.valuesNumberFormat = new DecimalFormat(pattern);
96 96
		
97 97
		
......
129 129
				
130 130
				// Hexadecimal color
131 131
				Color color = (Color) getSeriesPaint(series);
132
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
132
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
133 133
				
134 134
				XYSeriesCollection xyDataset = (XYSeriesCollection) dataset;
135 135
				
......
145 145
				}
146 146
				
147 147
				
148
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + label + "</span></p><p>" + xyDataset.getSeriesKey(series)
149
						+ ChartsEngineCoreMessages.EMPTY + " <b>" + valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + "</b></p></body><html>";
148
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + label + "</span></p><p>" + xyDataset.getSeriesKey(series) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
149
						+ ChartsEngineCoreMessages.EMPTY + " <b>" + valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
150 150
			}
151 151
		});
152 152
	}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYStepRenderer.java (revision 3835)
108 108
				
109 109
				// Hexadecimal color
110 110
				Color color = (Color) getSeriesPaint(series);
111
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
111
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
112 112
				XYSeriesCollection xyDataset = (XYSeriesCollection) dataset;
113 113
				
114
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series)
115
						+ "</span></p><p><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + ChartsEngineCoreMessages.EMPTY
116
						+ " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>";
114
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) //$NON-NLS-1$ //$NON-NLS-2$
115
						+ "</span></p><p><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + ChartsEngineCoreMessages.EMPTY //$NON-NLS-1$
116
						+ " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
117 117
			}
118 118
		});
119 119
	}
......
507 507
			Font font = getDefaultItemLabelFont();
508 508
			
509 509
			// compute the multi line label bounds
510
			String[] lines = label.split("\n");
510
			String[] lines = label.split("\n"); //$NON-NLS-1$
511 511
			double width = 0;
512 512
			double height = 0;
513 513
			for (int i = 0; i < lines.length; i++) {
......
577 577
	 * @return
578 578
	 */
579 579
	public String getSelectedItemLabelFromDataset(XYDataset dataset, int series, int item) {
580
		return "test label";
580
		return "test label"; //$NON-NLS-1$
581 581
	}
582 582
	
583 583
	@Override
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryBarRenderer.java (revision 3835)
40 40
		this.mouseOverItemSelector = new MouseOverItemSelector(this);
41 41
		
42 42
		// Default Values format
43
		this.valuesNumberFormat = new DecimalFormat("#0.####");
43
		this.valuesNumberFormat = new DecimalFormat("#0.####"); //$NON-NLS-1$
44 44
		
45 45
		
46 46
		// Labels
......
144 144
				
145 145
				// Hexadecimal color
146 146
				Color color = (Color) getSeriesPaint(row);
147
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
147
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
148 148
				
149 149
				DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset;
150 150
				Number value = catDataset.getValue(row, column);
151 151
				
152
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row)
153
						+ "</span>"
154
						+ ChartsEngineCoreMessages.EMPTY + " <b>" + valuesNumberFormat.format(value) + "</b></p></body><html>";
152
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
153
						+ "</span>" //$NON-NLS-1$
154
						+ ChartsEngineCoreMessages.EMPTY + " <b>" + valuesNumberFormat.format(value) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
155 155
			}
156 156
		});
157 157
	}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYBarRenderer.java (revision 3835)
70 70
				// Hexadecimal color
71 71
				Color color = (Color) getSeriesPaint(series);
72 72
				if (color != null) {
73
					String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
73
					String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
74 74
					
75 75
					XYDataset xyDataset = (XYDataset) dataset;
76 76
					Number value = xyDataset.getY(series, item);
......
86 86
						label = String.valueOf(xyDataset.getXValue(series, item));
87 87
					}
88 88
					
89
					return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + label + "</p><p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span>"
90
							+ ChartsEngineCoreMessages.EMPTY + " <b>" + RendererUtils.valuesNumberFormat.format(value) + "</b></p></body><html>";
89
					return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + label + "</p><p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span>" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
90
							+ ChartsEngineCoreMessages.EMPTY + " <b>" + RendererUtils.valuesNumberFormat.format(value) + "</b></p></body><html>"; //$NON-NLS-1$ //$NON-NLS-2$
91 91
				}
92
				return "";
92
				return ""; //$NON-NLS-1$
93 93
			}
94 94
		});
95 95
	}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/HighchartsDefaultTheme.java (revision 3835)
67 67
	 * @param name
68 68
	 */
69 69
	public HighchartsDefaultTheme(JFCChartsEngine chartsEngine) {
70
		super(chartsEngine, "Highcharts - Default"); // $NON-NLS-1$
70
		super(chartsEngine, "Highcharts - Default"); // $NON-NLS-1$ //$NON-NLS-1$
71 71
		
72 72
		
73 73
		// Title
74
		this.setTitlePaint(Color.decode("#4B4B6D"));
75
		this.setSubtitlePaint(Color.decode("#4B4B6D"));
74
		this.setTitlePaint(Color.decode("#4B4B6D")); //$NON-NLS-1$
75
		this.setSubtitlePaint(Color.decode("#4B4B6D")); //$NON-NLS-1$
76 76
		
77 77
		// Axis
78
		this.setAxisLabelPaint(Color.decode("#4D759E"));
78
		this.setAxisLabelPaint(Color.decode("#4D759E")); //$NON-NLS-1$
79 79
		this.setAxisOffset(new RectangleInsets(0, 0, 0, 0));
80 80
		
81 81
		// Labels
82
		this.setItemLabelPaint(Color.decode("#333333"));
82
		this.setItemLabelPaint(Color.decode("#333333")); //$NON-NLS-1$
83 83
		
84 84
		// Grid
85 85
		this.setGridBandPaint(Color.white);
......
89 89
		this.setChartBackgroundPaint(Color.white);
90 90
		
91 91
		// Legends
92
		this.setLegendItemPaint(Color.decode("#274B6D"));
92
		this.setLegendItemPaint(Color.decode("#274B6D")); //$NON-NLS-1$
93 93
		
94 94
		
95 95
		this.setPlotBackgroundPaint(Color.white);
96
		this.setTickLabelPaint(Color.decode("#666666"));
96
		this.setTickLabelPaint(Color.decode("#666666")); //$NON-NLS-1$
97 97
		
98 98
		// TODO : useless for this theme ?
99 99
		// this.setBaselinePaint(Color.decode("#C0D0E0"));
......
103 103
		// Series paints (Highchart color codes)
104 104
		// FIXME: SJ: this should be moved to a preference as discussed
105 105
		this.seriesPaints = new ArrayList<Color>();
106
		this.seriesPaints.add(0, Color.decode("#2F7ED8")); // Blue
107
		this.seriesPaints.add(1, Color.decode("#0D233A")); // Dark blue
108
		this.seriesPaints.add(2, Color.decode("#8BBC21")); // Green
109
		this.seriesPaints.add(3, Color.decode("#910000")); // Red
106
		this.seriesPaints.add(0, Color.decode("#2F7ED8")); // Blue //$NON-NLS-1$
107
		this.seriesPaints.add(1, Color.decode("#0D233A")); // Dark blue //$NON-NLS-1$
108
		this.seriesPaints.add(2, Color.decode("#8BBC21")); // Green //$NON-NLS-1$
109
		this.seriesPaints.add(3, Color.decode("#910000")); // Red //$NON-NLS-1$
110 110
		
111 111
		
112 112
		
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/base/SymbolAxisBetweenTicks.java (revision 3835)
218 218
					tickLabel = valueToString(currentTickValue);
219 219
				}
220 220
				if (tickLabel == null) {
221
					tickLabel = "";
221
					tickLabel = ""; //$NON-NLS-1$
222 222
				}
223 223
				
224 224
				// avoid to draw overlapping tick labels
......
236 236
					}
237 237
				}
238 238
				if (tickLabelsOverlapping) {
239
					tickLabel = ""; // don't draw this tick label
239
					tickLabel = ""; // don't draw this tick label //$NON-NLS-1$
240 240
				}
241 241
				else {
242 242
					// remember these values for next comparison
......
267 267
						rotationAnchor = TextAnchor.TOP_CENTER;
268 268
					}
269 269
				}
270
				if (tickLabel != "") {
270
				if (tickLabel != "") { //$NON-NLS-1$
271 271
					float l;
272 272
					if (RectangleEdge.isLeftOrRight(edge)) {
273 273
						l = (float) dataArea.getWidth();
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/base/JFCTheme.java (revision 3835)
79 79
	/**
80 80
	 * Global Font name.
81 81
	 */
82
	protected String baseFontName = "Lucida Sans Unicode";
82
	protected String baseFontName = "Lucida Sans Unicode"; //$NON-NLS-1$
83 83
	
84 84
	/**
85 85
	 * Fonts points to add for other font than regular with regular as base font.
......
94 94
	/**
95 95
	 * Grid lines color.
96 96
	 */
97
	protected Color gridLinesColor = Color.decode("#C0C0C0");
97
	protected Color gridLinesColor = Color.decode("#C0C0C0"); //$NON-NLS-1$
98 98
	
99 99
	
100 100
	
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/Messages.java (revision 3835)
1
package org.txm.chartsengine.jfreechart.core;
2

  
3
import org.eclipse.osgi.util.NLS;
4

  
5
public class Messages extends NLS {
6
	private static final String BUNDLE_NAME = Messages.class.getPackageName() + ".messages"; //$NON-NLS-1$
7
	public static String JFCChartsEngine_0;
8
	static {
9
		// initialize resource bundle
10
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
11
	}
12

  
13
	private Messages() {
14
	}
15
}
0 16

  
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/renderers/MultipleItemsSelector.java (revision 3835)
354 354
		else if (this.renderer.getPlot() instanceof CategoryPlot) {
355 355
			
356 356
			// FIXME: not yet implemented
357
			System.err.println("MultipleItemsSelector.selectNextItem(): category plot selection is not yet implemented.");
357
			System.err.println("MultipleItemsSelector.selectNextItem(): category plot selection is not yet implemented."); //$NON-NLS-1$
358 358
			// CategoryPlot plot = (CategoryPlot) this.renderer.getPlot();
359 359
			// CategoryDataset dataset = plot.getDataset();
360 360
			//
......
443 443
			// Category plot
444 444
			else if (this.renderer.getPlot() instanceof CategoryPlot) {
445 445
				// FIXME: not yet implemented
446
				System.err.println("MultipleItemsSelector.selectPreviousItem(): category plot selection is not yet implemented.");
446
				System.err.println("MultipleItemsSelector.selectPreviousItem(): category plot selection is not yet implemented."); //$NON-NLS-1$
447 447
			}
448 448
			
449 449
			
......
463 463
			// Category plot
464 464
			else if (this.renderer.getPlot() instanceof CategoryPlot) {
465 465
				// FIXME: not yet implemented
466
				System.err.println("MultipleItemsSelector.selectPreviousItem(): category plot selection is not yet implemented.");
466
				System.err.println("MultipleItemsSelector.selectPreviousItem(): category plot selection is not yet implemented."); //$NON-NLS-1$
467 467
			}
468 468
			
469 469
		}
TXM/trunk/bundles/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartsEngine.java (revision 3835)
63 63
	/**
64 64
	 * The charts engine description.
65 65
	 */
66
	public final static String DESCRIPTION = "JFreeChart";
66
	public final static String DESCRIPTION = Messages.JFCChartsEngine_0;
67 67
	
68 68
	/**
69 69
	 * The rendering theme.
......
449 449
			return exportChartToFile(chart, file, outputFormat, imageWidth, imageHeight); // create & write a
450 450
		}
451 451
		else {
452
			Log.severe("Error: the chart is not a JFreeChart " + chart + " " + result);
452
			Log.severe("Error: the chart is not a JFreeChart " + chart + " " + result); //$NON-NLS-2$
453 453
			return null;
454 454
		}
455 455
	}
......
532 532
			
533 533
			// JFreeSVG generates rgba(x,x,x,x.x) CSS style which is part of SVG version 2. It's incompatible with the actual Batik version used by TXM to display SVG Files
534 534
			// To fix this, replace from rgba() to rgb(), e.g.: stroke: rgba(255,0,0,0.352941);stroke-opacity: 1.0
535
			svg = svg.replaceAll("rgba\\(([0-9]+),([0-9]+),([0-9]+),([0-9\\.]+)\\);(stroke|fill)-opacity: [0-9\\.]+", "rgb\\($1,$2,$3\\);$5-opacity: $4"); //$NON-NLS-1$
535
			svg = svg.replaceAll("rgba\\(([0-9]+),([0-9]+),([0-9]+),([0-9\\.]+)\\);(stroke|fill)-opacity: [0-9\\.]+", "rgb\\($1,$2,$3\\);$5-opacity: $4"); //$NON-NLS-1$ //$NON-NLS-2$
536 536
			// second pass
537
			svg = svg.replaceAll("rgba\\(([0-9]+),([0-9]+),([0-9]+),[0-9\\.]+\\)", "rgb\\($1,$2,$3\\)"); //$NON-NLS-1$
537
			svg = svg.replaceAll("rgba\\(([0-9]+),([0-9]+),([0-9]+),[0-9\\.]+\\)", "rgb\\($1,$2,$3\\)"); //$NON-NLS-1$ //$NON-NLS-2$
538 538
			
539 539
			// fix angular line join bug in step charts #1056
540
			svg = svg.replaceAll("<svg ", "<svg style=\"stroke-linecap:square;\" "); //$NON-NLS-1$
540
			svg = svg.replaceAll("<svg ", "<svg style=\"stroke-linecap:square;\" "); //$NON-NLS-1$ //$NON-NLS-2$
541 541
			
542 542
			// fix double ;; character bug #1554
543
			svg = svg.replaceAll("(;)(; )(stroke|fill)", "$2$3"); //$NON-NLS-1$
543
			svg = svg.replaceAll("(;)(; )(stroke|fill)", "$2$3"); //$NON-NLS-1$ //$NON-NLS-2$
544 544
			
545 545
			
546 546
			
......
782 782
			// mapper.insertDirectory("C:/Tools/Coding/Java/jdk1.7.0_45/jre/lib/fonts/");
783 783
			
784 784
			// Windows
785
			mapper.insertDirectory(System.getenv().get("SystemRoot") + "/Fonts/");
785
			mapper.insertDirectory(System.getenv().get("SystemRoot") + "/Fonts/"); //$NON-NLS-1$ //$NON-NLS-2$
786 786
			
787 787
			// Linux
788
			mapper.insertDirectory("/usr/share/fonts/");
789
			mapper.insertDirectory("/usr/local/share/fonts/");
790
			mapper.insertDirectory(System.getProperty("user.home") + "/.fonts");
788
			mapper.insertDirectory("/usr/share/fonts/"); //$NON-NLS-1$
789
			mapper.insertDirectory("/usr/local/share/fonts/"); //$NON-NLS-1$
790
			mapper.insertDirectory(System.getProperty("user.home") + "/.fonts"); //$NON-NLS-1$ //$NON-NLS-2$
791 791
			
792 792
			// Mac
793
			mapper.insertDirectory(System.getProperty("user.home") + "/Library/Fonts");
794
			mapper.insertDirectory("/System/Library/Fonts");
795
			mapper.insertDirectory("/Library/Fonts");
793
			mapper.insertDirectory(System.getProperty("user.home") + "/Library/Fonts"); //$NON-NLS-1$ //$NON-NLS-2$
794
			mapper.insertDirectory("/System/Library/Fonts"); //$NON-NLS-1$
795
			mapper.insertDirectory("/Library/Fonts"); //$NON-NLS-1$
796 796
			
797 797
			
798 798
			

Formats disponibles : Unified diff