Skip to content

Commit 255b4df

Browse files
committed
Added mouse zoom. Added drag-to-scroll. Version 1.1.
1 parent 0b52b2d commit 255b4df

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

OpenGammaTool/src/com/gammascout/AboutDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public AboutDialog()
5050
dtrpnOpenGammaTool.setBackground(UIManager
5151
.getColor("Button.background"));
5252
dtrpnOpenGammaTool
53-
.setText("<html><body>\nOpen Gamma Tool<br/>\nVersion 1.0<br/>\n&#169; 2014, 2015 Erik Berglund<br/>\n<br/>\nSpecial thanks to <a href=\"http://johannes-bauer.com/linux/gammascout/\">Johannes Bauer</a><br/>\nfor reverse engineering and documenting <br/>\nthe GammaScout&#8482; protocol<br/>\n</body></html>");
53+
.setText("<html><body>\nOpen Gamma Tool<br/>\nVersion 1.1<br/>\n&#169; 2014-2017 Erik Berglund<br/>\n<br/>\nSpecial thanks to <a href=\"http://johannes-bauer.com/linux/gammascout/\">Johannes Bauer</a><br/>\nfor reverse engineering and documenting <br/>\nthe GammaScout&#8482; protocol<br/>\n</body></html>");
5454
GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
5555
gl_contentPanel.setHorizontalGroup(gl_contentPanel.createParallelGroup(
5656
Alignment.TRAILING).addGroup(

OpenGammaTool/src/com/gammascout/MainWindow.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.jfree.chart.axis.DateAxis;
3939
import org.jfree.chart.axis.LogAxis;
4040
import org.jfree.chart.axis.NumberAxis;
41+
import org.jfree.chart.axis.ValueAxis;
4142
import org.jfree.chart.labels.StandardXYToolTipGenerator;
4243
import org.jfree.chart.plot.XYPlot;
4344
import org.jfree.chart.renderer.xy.XYItemRenderer;
@@ -120,7 +121,7 @@ private void initialize()
120121
URL url = cldr.getResource("res/icon.png");
121122

122123
if (url == null)
123-
JOptionPane.showMessageDialog(null, "no good");
124+
JOptionPane.showMessageDialog(null, "Could not load icon.");
124125

125126
try
126127
{
@@ -253,6 +254,8 @@ private void initialize()
253254
// create the chart
254255
chart = ChartFactory.createTimeSeriesChart("Gamma Scout measured data",
255256
"time", "value", dataset, false, true, false);
257+
chart.getXYPlot().setRangePannable(true);
258+
chart.getXYPlot().setDomainPannable(true);
256259
DateAxis dateAxis = (DateAxis) chart.getXYPlot().getDomainAxis();
257260
dateAxis.setTimeZone(Tools.UTC_TIMEZONE);
258261
chartPanel = new ChartPanel(chart);
@@ -269,6 +272,8 @@ private void initialize()
269272
chartPanel.setMaximumDrawWidth(7000);
270273
chartPanel.setMaximumDrawHeight(4000);
271274
chartPanel.setForeground(Color.BLACK);
275+
chartPanel.setMouseWheelEnabled(true);
276+
272277
frmOpenGammaTool.getContentPane().add(chartPanel);
273278

274279
btnLoadData = new JButton("Load data");

OpenGammaTool/src/com/gammascout/usb/Reading.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
*/
1313
public class Reading
1414
{
15+
//number of counts per minute per microSievert per hour. Divice CPM by this number to get uSv/h
16+
private static final double CONVERSION_FACTOR = 236;
1517
private long time;
1618
private long count;
1719
private long interval;
@@ -106,7 +108,7 @@ public double getCountsPerMinute()
106108
*/
107109
public double getMicroSievertsPerHour()
108110
{
109-
return getCountsPerMinute()/142;
111+
return getCountsPerMinute()/CONVERSION_FACTOR;
110112
}
111113

112114
/**

0 commit comments

Comments
 (0)