diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/Messages.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/Messages.java index bb69c23..0bb7585 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/Messages.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/Messages.java @@ -23,6 +23,7 @@ public class Messages extends NLS { public static String ResourceManager_0; public static String SCViewerPreferencesPage_0; public static String SCViewerPreferencesPage_1; + public static String SCViewerPreferencesPage_2; public static String StatusBarControl_1; public static String StatusBarControl_2; public static String StatusBarControl_3; diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties index 4cc0144..25acce6 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties @@ -17,6 +17,7 @@ RelationTypeToolControl_1=Select ResourceManager_0=Wrong decorate corner SCViewerPreferencesPage_0=Check for changed database SCViewerPreferencesPage_1=Show hover window in waveform +SCViewerPreferencesPage_2=Waveform track height StatusBarControl_1=Currently running: StatusBarControl_2=\nLast task: StatusBarControl_3=Currently running: diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformStyleProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformStyleProvider.java index 67064c5..b2f389f 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformStyleProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformStyleProvider.java @@ -29,7 +29,8 @@ public class WaveformStyleProvider implements IWaveformStyleProvider { // list of random colors private static Color[][] randomColors; - + private int trackHeigth=25; + public WaveformStyleProvider() { setupDefaults(); } @@ -91,7 +92,8 @@ public class WaveformStyleProvider implements IWaveformStyleProvider { RGB rgb = StringConverter.asRGB(prefValue); colorPref.put(c, rgb); } - } + trackHeigth = store.getInt(PreferenceConstants.TRACK_HEIGHT, defaultPrefs.getInt(PreferenceConstants.TRACK_HEIGHT, 25)); //$NON-NLS-1$ + } /** * needs redraw() afterwards * @param colourMap @@ -118,7 +120,7 @@ public class WaveformStyleProvider implements IWaveformStyleProvider { @Override public int getTrackHeight() { - return 25; + return trackHeigth; } @Override public Color getColor(WaveformColors type) { diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java index 71f299c..e7c1e64 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java @@ -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$ } diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java index 9a6d057..9146fe6 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java @@ -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$ diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java index 25005e9..fe80cef 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java @@ -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())); }