changeset 2450:0ecf532bd668

Add a default duration to ThermostatChartPanel Reviewed-by: omajid, jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2016-September/020880.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Wed, 14 Sep 2016 17:39:54 +0200
parents bce16ab0a34a
children 1b6ba42c0fb5
files client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/ThermostatChartPanel.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/ThermostatChartPanel.java	Wed Sep 14 15:12:54 2016 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/ThermostatChartPanel.java	Wed Sep 14 17:39:54 2016 +0200
@@ -43,6 +43,7 @@
 import java.beans.PropertyChangeListener;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import javax.swing.BoxLayout;
 import javax.swing.JPanel;
@@ -66,6 +67,13 @@
 
 public class ThermostatChartPanel extends JPanel {
 
+    private static final long DEFAULT_VALUE = 10;
+    private static final TimeUnit DEFAULT_TIMEUNIT = TimeUnit.MINUTES;
+    
+    /**
+     * Default range of time for charts to display data for. Set to 10 minutes.
+     */
+    public static final Duration DEFAULT_DATA_DISPLAY = new Duration(DEFAULT_VALUE, DEFAULT_TIMEUNIT);
     public static final String PROPERTY_VISIBLE_TIME_RANGE = "visibleTimeRange";
 
     private static final Color WHITE = new Color(255,255,255,0);