add track height preferences

This commit is contained in:
2020-11-28 20:44:33 +01:00
parent 754a61e989
commit 179d40ac8d
6 changed files with 14 additions and 3 deletions

View File

@ -68,6 +68,7 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
store.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
store.putBoolean(PreferenceConstants.SHOW_HOVER, true);
store.putInt(PreferenceConstants.TRACK_HEIGHT, 30);
for (WaveformColors c : WaveformColors.values()) {
store.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
}

View File

@ -24,6 +24,9 @@ public class PreferenceConstants {
/** The Constant DATABASE_RELOAD. */
public static final String SHOW_HOVER="showWaveformHover"; //$NON-NLS-1$
/** The Constant TRACK_HEIGHT. */
public static final String TRACK_HEIGHT="trackHeigth"; //$NON-NLS-1$
/** The Constant LINE_COLOR. */
public static final String LINE_COLOR="LINE_COLOR"; //$NON-NLS-1$

View File

@ -12,6 +12,7 @@ package com.minres.scviewer.e4.application.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import com.minres.scviewer.e4.application.Messages;
@ -38,6 +39,8 @@ public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_HOVER, Messages.SCViewerPreferencesPage_1,
getFieldEditorParent()));
addField(new IntegerFieldEditor(PreferenceConstants.TRACK_HEIGHT, Messages.SCViewerPreferencesPage_2,
getFieldEditorParent()));
}