protected String applySettings(CfFileReader f) {
String errBuff = "";
if (widget != null) {
ChartViewer chartViewer = (ChartViewer) widget;
List<String> p;
// Get model
p = f.getParam("model");
if (p == null) {
clearDAO();
}
else {
setCompleteAttributeName(p.get(0));
// canInitDAO may fail if p is invalid, and a clear would be needed
// XXX this is to start or stop regardless the init state
if (canInitDAO()) {
initDAO();
}
else {
clearDAO();
}
}
// Get Refresh Interval
p = f.getParam("refresh_time");
if (p != null) {
setRefreshingPeriod(OFormat.getInt(p.get(0)));
}
else {
setRefreshingPeriod(TangoDataSourceFactory.DEFAULT_SLEEPING_PERIOD);
}
chartViewer.getChart().setMaxDisplayDuration(Double.POSITIVE_INFINITY);
chartViewer.getChart().setDisplayDuration(Double.POSITIVE_INFINITY);
chartViewer.getChart().applyConfiguration(f);
chartViewer.getChart().getXAxis().applyConfiguration("x", f);
chartViewer.getChart().getY1Axis().applyConfiguration("y1", f);
chartViewer.getChart().getY2Axis().applyConfiguration("y2", f);
}
return errBuff;
}