Révision 1477
| tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/JFCSWTChartsComponentsProvider.java (revision 1477) | ||
|---|---|---|
| 59 | 59 |
|
| 60 | 60 |
chartEditorInput.setChartContainer(chartPanel); |
| 61 | 61 |
|
| 62 |
|
|
| 63 | 62 |
// Store the chart panel in the renderer (eg. can be needed to get the Graphics2D object to use in getItemShape() to compute the label text bounds and draw a background rectangle.) |
| 64 | 63 |
if(chart.getPlot() instanceof XYPlot && chart.getXYPlot().getRenderer() instanceof IRendererWithItemSelection) {
|
| 65 | 64 |
((IRendererWithItemSelection) chart.getXYPlot().getRenderer()).getItemsSelector().setChartPanel(chartPanel); |
| ... | ... | |
| 68 | 67 |
((IRendererWithItemSelection) chart.getCategoryPlot().getRenderer()).getItemsSelector().setChartPanel(chartPanel); |
| 69 | 68 |
} |
| 70 | 69 |
|
| 71 |
|
|
| 72 |
// update for shared preferences, show title, show legend, colors rendering mode, etc. |
|
| 73 |
// FIXME: became uselss? |
|
| 74 |
// chartsEngine.updateChart(chart, chartEditorInput.getResult()); |
|
| 75 |
|
|
| 76 | 70 |
// sets and updates the local preferences node qualifier from the result data |
| 77 | 71 |
chartEditorInput.syncLocalPreferencesNode(); |
| 78 | 72 |
|
| tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java (revision 1477) | ||
|---|---|---|
| 35 | 35 |
import org.eclipse.swt.widgets.Display; |
| 36 | 36 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
| 37 | 37 |
import org.txm.partition.core.functions.PartitionDimensions; |
| 38 |
import org.txm.rcp.Application; |
|
| 38 | 39 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
| 39 | 40 |
import org.txm.searchengine.cqp.corpus.Partition; |
| 40 | 41 |
import org.txm.utils.logger.Log; |
| ... | ... | |
| 81 | 82 |
ChartEditor.openEditor(partitionDimensions); |
| 82 | 83 |
|
| 83 | 84 |
// Load Java embedded fonts from JRE to SWT |
| 84 |
// Display.getDefault().syncExec(new Runnable() {
|
|
| 85 |
// public void run() {
|
|
| 86 |
// |
|
| 87 |
// File javaFontsPath = new File(System.getProperty("java.home")
|
|
| 88 |
// + System.getProperty("file.separator") + "lib"
|
|
| 89 |
// + System.getProperty("file.separator") + "fonts"
|
|
| 90 |
// + System.getProperty("file.separator"));
|
|
| 91 |
// |
|
| 92 |
// String[] fontFiles = javaFontsPath.list(); |
|
| 93 |
// |
|
| 94 |
// for (int i = 0; i < fontFiles.length; i++) {
|
|
| 95 |
// |
|
| 96 |
// if(fontFiles[i].endsWith(".ttf")) { //$NON-NLS-1$
|
|
| 97 |
// |
|
| 98 |
// File fontFile = new File(javaFontsPath, fontFiles[i]); |
|
| 99 |
// |
|
| 100 |
// Log.finest("Loading Java font to SWT Device from file " + fontFile + "...");
|
|
| 101 |
// |
|
| 102 |
// // Load the font in SWT |
|
| 103 |
// Display.getDefault().loadFont(fontFile.getAbsolutePath()); |
|
| 104 |
// } |
|
| 105 |
// |
|
| 106 |
// } |
|
| 107 |
// } |
|
| 108 |
// }); |
|
| 85 |
Display.getDefault().syncExec(new Runnable() {
|
|
| 86 |
public void run() {
|
|
| 87 |
|
|
| 88 |
File javaFontsPath = new File(System.getProperty("java.home")
|
|
| 89 |
+ System.getProperty("file.separator") + "lib"
|
|
| 90 |
+ System.getProperty("file.separator") + "fonts"
|
|
| 91 |
+ System.getProperty("file.separator"));
|
|
| 92 |
|
|
| 93 |
String[] fontFiles = javaFontsPath.list(); |
|
| 94 |
|
|
| 95 |
for (int i = 0; i < fontFiles.length; i++) {
|
|
| 96 |
|
|
| 97 |
if(fontFiles[i].endsWith(".ttf")) { //$NON-NLS-1$
|
|
| 98 |
|
|
| 99 |
File fontFile = new File(javaFontsPath, fontFiles[i]); |
|
| 100 |
|
|
| 101 |
Log.finest("Loading Java font to SWT Device from file " + fontFile + "...");
|
|
| 102 |
|
|
| 103 |
// Load the font in SWT |
|
| 104 |
|
|
| 105 |
Display.getCurrent().loadFont(fontFile.getAbsolutePath()); |
|
| 106 |
} |
|
| 107 |
|
|
| 108 |
} |
|
| 109 |
} |
|
| 110 |
}); |
|
| 109 | 111 |
|
| 110 | 112 |
return null; |
| 111 | 113 |
} |
Formats disponibles : Unified diff