Skip to content

Commit 80c6b16

Browse files
committed
CSSTUDIO-2040 Add DataBrowserSelection.makeTimeRangeAbsolute().
1 parent 443d292 commit 80c6b16

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/databrowser/src/main/java/org/csstudio/trends/databrowser3/ui/selection/DatabrowserSelection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.csstudio.trends.databrowser3.model.ModelItem;
1313
import org.csstudio.trends.databrowser3.persistence.XMLPersistence;
1414
import org.csstudio.trends.databrowser3.ui.plot.ModelBasedPlot;
15+
import org.phoebus.util.time.TimeInterval;
1516
import org.phoebus.util.time.TimeRelativeInterval;
1617

1718
import javafx.scene.image.Image;
@@ -53,6 +54,13 @@ public TimeRelativeInterval getPlotTime()
5354
return model.getTimerange();
5455
}
5556

57+
public void makeTimeRangeAbsolute()
58+
{
59+
TimeInterval absoluteInterval = model.getTimerange().toAbsoluteInterval();
60+
TimeRelativeInterval absoluteTimeInterval = TimeRelativeInterval.of(absoluteInterval.getStart(), absoluteInterval.getEnd());
61+
model.setTimerange(absoluteTimeInterval);
62+
}
63+
5664
/**
5765
* Get the title of the selected databrowser plot
5866
* @return plot title

0 commit comments

Comments
 (0)