- added preference dialog

- added preference handling
- added file monitor to automatically reload changed database
This commit is contained in:
2015-11-12 23:35:13 +01:00
parent c1d84ceb01
commit 5680af1b45
34 changed files with 796 additions and 167 deletions

View File

@ -0,0 +1,19 @@
/*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.ui;
public interface ICursor {
public long getTime();
public void setTime(long time);
}

View File

@ -11,11 +11,13 @@
package com.minres.scviewer.database.ui;
import java.beans.PropertyChangeListener;
import java.util.HashMap;
import java.util.List;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Control;
import com.minres.scviewer.database.IWaveform;
@ -25,62 +27,65 @@ public interface IWaveformViewer extends PropertyChangeListener, ISelectionProvi
String CURSOR_PROPERTY = "cursor_time";
String MARKER_PROPERTY = "marker_time";
void addSelectionChangedListener(ISelectionChangedListener listener);
public void addSelectionChangedListener(ISelectionChangedListener listener);
void removeSelectionChangedListener(ISelectionChangedListener listener);
public void removeSelectionChangedListener(ISelectionChangedListener listener);
Control getControl();
public Control getControl();
Control getNameControl();
public Control getNameControl();
Control getValueControl();
public Control getValueControl();
Control getWaveformControl();
public Control getWaveformControl();
ISelection getSelection();
public ISelection getSelection();
void setSelection(ISelection selection);
public void setSelection(ISelection selection);
void setSelection(ISelection selection, boolean addIfNeeded);
public void setSelection(ISelection selection, boolean addIfNeeded);
void moveSelection(GotoDirection direction);
public void moveSelection(GotoDirection direction);
void moveCursor(GotoDirection direction);
public void moveCursor(GotoDirection direction);
List<TrackEntry> getStreamList();
public List<TrackEntry> getStreamList();
public TrackEntry getEntryForStream(IWaveform<?> source);
void moveSelected(int i);
public void moveSelected(int i);
long getMaxTime();
public long getMaxTime();
void setMaxTime(long maxTime);
public void setMaxTime(long maxTime);
void setZoomLevel(int scale);
public void setZoomLevel(int scale);
int getZoomLevel();
public int getZoomLevel();
void setCursorTime(long time);
public void setCursorTime(long time);
void setMarkerTime(long time, int index);
public void setMarkerTime(long time, int index);
long getCursorTime();
public long getCursorTime();
long getActMarkerTime();
public long getSelectedMarkerTime();
long getMarkerTime(int index);
public long getMarkerTime(int index);
void addPropertyChangeListener(PropertyChangeListener listener);
public void addPropertyChangeListener(PropertyChangeListener listener);
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
void removePropertyChangeListener(PropertyChangeListener listener);
public void removePropertyChangeListener(PropertyChangeListener listener);
void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
String getScaledTime(long time);
public String getScaledTime(long time);
String[] getZoomLevels();
public String[] getZoomLevels();
public List<ICursor> getCursorList();
public void setColors(HashMap<WaveformColors, RGB> colourMap);
}

View File

@ -0,0 +1,20 @@
/*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.ui;
public enum WaveformColors {
LINE, LINE_HIGHLITE,
TRACK_BG_EVEN, TRACK_BG_ODD, TRACK_BG_HIGHLITE,
TX_BG, TX_BG_HIGHLITE, TX_BORDER,
SIGNAL0, SIGNAL1, SIGNALZ, SIGNALX, SIGNAL_TEXT,
CURSOR, CURSOR_DRAG, CURSOR_TEXT,
MARKER, MARKER_TEXT
}