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

code readapted to the fact that CometeTrendController.parseKey is static

parent 5d6ae350
Branches
Tags
No related merge requests found
......@@ -646,7 +646,7 @@ public class TrendFile {
CometeColor cometeColor = CometeColor.RED;
for (String fullAttributeName : attributeList) {
controller.rememberAttribute(fullAttributeName);
String key = controller.parseKey(fullAttributeName);
String key = CometeTrendController.parseKey(fullAttributeName);
PlotProperties plotProperties = controller.getPlotProperties(key);
if (plotProperties == null) {
plotProperties = new PlotProperties();
......@@ -693,7 +693,7 @@ public class TrendFile {
fullAttributeName = ObjectUtils.EMPTY_STRING;
}
}
String key = controller.parseKey(fullAttributeName);
String key = CometeTrendController.parseKey(fullAttributeName);
PlotProperties plotProperties = controller.getPlotProperties(key);
if (plotProperties == null) {
......@@ -1052,7 +1052,7 @@ public class TrendFile {
}
public String parseKey(String value) {
return controller.parseKey(value);
return CometeTrendController.parseKey(value);
}
public static void main(String[] args) throws IOException {
......
......@@ -46,8 +46,7 @@ public class TrendThread extends ATrendThread<String[]> {
AttributeInfoEx attributeInfoEx, String format, double value) {
Chart chart = ObjectUtils.recoverObject(chartRef);
if ((chart != null) && (attributeFullName != null)) {
CometeTrendController controller = ObjectUtils.recoverObject(controllerRef);
String id = controller == null ? attributeFullName : controller.parseKey(attributeFullName);
String id = CometeTrendController.parseKey(attributeFullName);
DataView dataView = chart.getDataViewList().getDataView(id, false);
if (dataView != null) {
dataView.add(time, value);
......
......@@ -144,7 +144,7 @@ public class ChartPanel extends JPanel implements ITrendFileListener, IChartView
if (index > 0) {
id = id.substring(0, index);
}
controller.setPlotProperties(controller.parseKey(id), properties);
controller.setPlotProperties(CometeTrendController.parseKey(id), properties);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment