perfsonar-dev - [GEANT/SA2/ps-java-services] r5517 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
Subject: perfsonar development work
List archive
[GEANT/SA2/ps-java-services] r5517 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
Chronological Thread
- From:
- To:
- Subject: [GEANT/SA2/ps-java-services] r5517 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
- Date: Mon, 1 Mar 2010 15:47:53 GMT
Author: bren.nikolova
Date: 2010-03-01 15:47:52 +0000 (Mon, 01 Mar 2010)
New Revision: 5517
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
Log:
Fix for PSANALYSIS-109 & PSANALYSIS-143 : The default time period is now set
to 24h and the Start date is set to one default time period from now e.g. 24h
before the application has been started
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
2010-03-01 15:31:48 UTC (rev 5516)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/TimeOptionsPanel.java
2010-03-01 15:47:52 UTC (rev 5517)
@@ -26,7 +26,8 @@
import org.perfsonar.perfsonarui.ui.AbstractDatePanel;
public class TimeOptionsPanel extends AbstractDatePanel {
- protected long timeInterval=TimeRange.timeIntervals[2];
+ //protected long timeInterval=TimeRange.timeIntervals[2]; commented
by iva
+ protected long timeInterval=TimeRange.timeIntervals[3]; //added by iva
protected final JSpinner spinner;
protected final JXDatePicker picker;
protected JRadioButton[] rb;
@@ -48,10 +49,15 @@
spinner = new JSpinner(new SpinnerDateModel());
picker = new JXDatePicker();
+ long dateTime = date.getTime();
+ long startDate = dateTime - timeInterval;
+ date.setTime(startDate);
+
SingleDaySelectionModel selectionModel = new
SingleDaySelectionModel();
picker.getMonthView().setSelectionModel(selectionModel);
picker.setTimeZone(TimeZone.getDefault());
picker.setDate(date);
+
spinner.setValue(picker.getDate());
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss",
picker.getLocale());
format.setTimeZone(picker.getTimeZone());
@@ -85,7 +91,8 @@
JLabel duration = new JLabel(" Duration: ");
add(duration);
JComboBox intervals = new JComboBox(timeTitles);
- intervals.setSelectedItem(TimeRange.getDayRange());
+
intervals.setSelectedItem(TimeRange.timeInterval2Title(TimeRange.getDayRange()));
//added by iva
+ //intervals.setSelectedItem(TimeRange.getDayRange()); commented by
Iva
intervals.setEditable(false);
intervals.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- [GEANT/SA2/ps-java-services] r5517 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels, svn-noreply, 03/01/2010
Archive powered by MHonArc 2.6.16.