Task #2122

Updated by Sebastien Jacquot about 3 years ago

Done.

Location: /org.txm.ca.core/src/org/txm/ca/core/preferences/CAPreferences.java

Names:

<pre>
public static final String PREFERENCES_PREFIX = "ca_"; //$NON-NLS-1$

/** Lexical table FMIN. */
public static final String F_MIN = PREFERENCES_PREFIX + "lt_fmin"; //$NON-NLS-1$
/** Lexical table VMAX. */
public static final String V_MAX = PREFERENCES_PREFIX + "lt_vmax"; //$NON-NLS-1$

public static final String SHOW_INDIVIDUALS = PREFERENCES_PREFIX + "chart_show_individuals"; //$NON-NLS-1$
public static final String SHOW_VARIABLES = PREFERENCES_PREFIX + "chart_show_variables"; //$NON-NLS-1$
public static final String SHOW_POINT_SHAPES = PREFERENCES_PREFIX + "chart_show_point_shapes"; //$NON-NLS-1$

public static final String QUALITY_DISPLAY_FORMAT = PREFERENCES_PREFIX + "quality_display_format"; //$NON-NLS-1$
public static final String CONTRIB_DISPLAY_FORMAT = PREFERENCES_PREFIX + "contrib_display_format"; //$NON-NLS-1$
public static final String MASS_DISPLAY_FORMAT = PREFERENCES_PREFIX + "mass_display_format"; //$NON-NLS-1$
public static final String CHI_DISPLAY_FORMAT = PREFERENCES_PREFIX + "chi_display_format"; //$NON-NLS-1$
public static final String DIST_DISPLAY_FORMAT = PREFERENCES_PREFIX + "dist_display_format"; //$NON-NLS-1$
public static final String COS2_DISPLAY_FORMAT = PREFERENCES_PREFIX + "cos2_display_format"; //$NON-NLS-1$
public static final String COORD_DISPLAY_FORMAT = PREFERENCES_PREFIX + "coord_display_format"; //$NON-NLS-1$

public static final String FIRST_DIMENSION = PREFERENCES_PREFIX + "first_dimension"; //$NON-NLS-1$
public static final String SECOND_DIMENSION = PREFERENCES_PREFIX + "second_dimension"; //$NON-NLS-1$
</pre>

Values:

<pre>
preferences.putInt(F_MIN, 10);
preferences.putInt(V_MAX, 200);

String defaultFormat = "0.00"; //$NON-NLS-1$
preferences.put(QUALITY_DISPLAY_FORMAT, defaultFormat);
preferences.put(CONTRIB_DISPLAY_FORMAT, defaultFormat);
preferences.put(MASS_DISPLAY_FORMAT, defaultFormat);
preferences.put(CHI_DISPLAY_FORMAT, defaultFormat);
preferences.put(DIST_DISPLAY_FORMAT, defaultFormat);
preferences.put(COS2_DISPLAY_FORMAT, defaultFormat);
preferences.put(COORD_DISPLAY_FORMAT, defaultFormat);

preferences.putBoolean(SHOW_INDIVIDUALS, true);
preferences.putBoolean(SHOW_VARIABLES, true);
preferences.putBoolean(SHOW_POINT_SHAPES, false);

preferences.putInt(FIRST_DIMENSION, 1);
preferences.putInt(SECOND_DIMENSION, 2);
</pre>

Back