Task #2140

Task #690: Reorganize TXM source code to better match the RCP development plug-ins system.

Task #2139: Reorganize charts engine into plug-in projects

Charts engine, default preferences

Added by Sebastien Jacquot about 2 years ago. Updated 12 months ago.

Status:Closed Start date:04/10/2017
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Development Spent time: -
Target version:TXM 0.8.0a (split/restructuration)

Description

Location: /org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java

Names:

    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$

Values:

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$

Validation tests

  • check the preferences are well filled in the charts engine preferences page

History

#1 Updated by Sebastien Jacquot about 2 years ago

  • Description updated (diff)
  • Status changed from New to In Progress

#2 Updated by Sebastien Jacquot over 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 50 to 80

#3 Updated by Sebastien Jacquot over 1 year ago

  • Description updated (diff)

#4 Updated by Sebastien Jacquot 12 months ago

  • Status changed from Feedback to Closed
  • % Done changed from 80 to 100

Also available in: Atom PDF