Skip to content
Snippets Groups Projects
Commit 7a00f856 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

setup display duration in AttributeTrend mode (CONTROLGUI-390)

parent e68323d2
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ import fr.soleil.lib.project.swing.WindowSwingUtils;
public class ChartPanel extends JPanel implements ITrendFileListener, IChartViewerListener {
private static final long serialVersionUID = -8184675129148333990L;
private static final long serialVersionUID = 3050227888983426281L;
private static final Object DEFAULT_DATA = new double[0];
......@@ -48,7 +48,7 @@ public class ChartPanel extends JPanel implements ITrendFileListener, IChartView
private final TrendChart chart;
private final ChartViewerBox chartBox;
private CfFileReader configurationReader;
private boolean cometeTrendSettings;
private boolean attributeTrendSettings;
private final DataAccumulator dataAccumulator;
private final AttributeGroupListener groupListener;
......@@ -135,12 +135,12 @@ public class ChartPanel extends JPanel implements ITrendFileListener, IChartView
}
}
public boolean isCometeTrendSettings() {
return cometeTrendSettings;
public boolean isAttributeTrendSettings() {
return attributeTrendSettings;
}
public void setCometeTrendSettings(boolean cometeTrendSettings) {
this.cometeTrendSettings = cometeTrendSettings;
public void setAttributeTrendSettings(boolean attributeTrendSettings) {
this.attributeTrendSettings = attributeTrendSettings;
}
public void chartPropertiesAction() {
......@@ -303,13 +303,13 @@ public class ChartPanel extends JPanel implements ITrendFileListener, IChartView
@Override
public void applyConfiguration(CfFileReader f) {
if (isCometeTrendSettings()) {
if (isAttributeTrendSettings()) {
// CONTROLGUI-380: load settings is linked to CometeTrend
if (f != null) {
setCometeTrendSettings(false);
setAttributeTrendSettings(false);
controller.loadFileAction(f.getFilePath());
doApplyConfiguration(f);
setCometeTrendSettings(true);
setAttributeTrendSettings(true);
}
} else {
doApplyConfiguration(f);
......@@ -319,7 +319,7 @@ public class ChartPanel extends JPanel implements ITrendFileListener, IChartView
@Override
public String getConfiguration() {
String configuration;
if (isCometeTrendSettings()) {
if (isAttributeTrendSettings()) {
// CONTROLGUI-380: save settings is linked to CometeTrend
Window window = WindowSwingUtils.getWindowForComponent(this);
if (window instanceof CometeTrend) {
......
......@@ -157,7 +157,8 @@ public class CometeTrend extends JFrame implements ITrendFileListener {
private void initAttributeTrend(boolean samplingEnabled) {
initChartPanel(controller, samplingEnabled);
// CONTROLGUI-380: redirect settings
chartPanel.setCometeTrendSettings(true);
chartPanel.setAttributeTrendSettings(true);
chartPanel.setupDisplayDuration();
SPLASH.progress(10);
SPLASH.setMessage("Build menu");
initTrendMenu();
......@@ -195,7 +196,7 @@ public class CometeTrend extends JFrame implements ITrendFileListener {
SPLASH.progress(70);
initChartPanel(controller, samplingEnabled);
// CONTROLGUI-380: don't redirect settings
chartPanel.setCometeTrendSettings(false);
chartPanel.setAttributeTrendSettings(false);
chartPanel.setChartManagementPanelVisible(false);
chartPanel.setChartFreezePanelVisible(false);
SPLASH.progress(80);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment