Task #2140
Mis à jour par Sebastien Jacquot il y a plus de 8 ans
Location: /org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java
Names:
<pre>
public static final String PREFERENCES_PREFIX = "charts_engine_"; //$NON-NLS-1$
/**
* The name of the current charts engine.
*/
public final static String CURRENT_NAME = PREFERENCES_PREFIX + "current_name"; //$NON-NLS-1$
/**
* Constant for showing title or not in the charts.
*/
public final static String SHOW_TITLE = PREFERENCES_PREFIX + "show_title"; //$NON-NLS-1$
/**
* Constant for showing legend or not in the charts.
*/
public final static String SHOW_LEGEND = PREFERENCES_PREFIX + "show_legend"; //$NON-NLS-1$
/**
* Constant for showing grid/lines or not in the charts.
*/
public final static String SHOW_GRID = PREFERENCES_PREFIX + "show_grid"; //$NON-NLS-1$
/**
* Constant for the color mode (colors, grayscale, monochrome, B&W).
*/
public final static String RENDERING_COLORS_MODE = PREFERENCES_PREFIX + "colors_mode"; //$NON-NLS-1$
public final static String MONOCHROME_COLOR = PREFERENCES_PREFIX + "monochrome_color"; //$NON-NLS-1$
public final static String FONT = PREFERENCES_PREFIX + "font"; //$NON-NLS-1$
// local result preferences
public final static String CHART_TYPE = PREFERENCES_PREFIX + "chart_type"; //$NON-NLS-1$
public final static String RESULT_DATA_TYPE = PREFERENCES_PREFIX + "result_data_type"; //$NON-NLS-1$
</pre>
Values:
<pre>
preferences.putBoolean(ChartsEnginePreferences.SHOW_TITLE, true);
preferences.putBoolean(ChartsEnginePreferences.SHOW_LEGEND, true);
preferences.putBoolean(ChartsEnginePreferences.SHOW_GRID, true);
preferences.putInt(ChartsEnginePreferences.RENDERING_COLORS_MODE, ChartsEngine.RENDERING_COLORS_MODE);
preferences.put(ChartsEnginePreferences.MONOCHROME_COLOR, "0,220,20"); //$NON-NLS-1$
// FIXME: maybe need need to check here the target OS and set a default unicode installed font
preferences.put(FONT, "1|Lucida Sans Unicode|11.0|0|WINDOWS|1|-16|0|0|0|400|0|0|0|0|3|2|1|34|Lucida Sans Unicode;"); //$NON-NLS-1$
</pre>