/**
* Main class, so you can have an example. You can put your own attribute names in parameter
*/
public static void main(String[] args) {
IFrame frame = CometeWidgetFactory.createFrame();
String scanServer = "test/scan/julien";
String[] xAttributeNameList = null;
String[] yAttributeNameList = null;
if (args != null && args.length > 1) {
xAttributeNameList = new String[] { args[0] };
yAttributeNameList = new String[] { args[1] };
}
else {
xAttributeNameList = new String[] { "sensorsTimestamps", "sensorsTimestamps" };
yAttributeNameList = new String[] { "data_02", "actuator_1_2" };
}
CurrentScanDualSpectrumViewer f = new CurrentScanDualSpectrumViewer();
// f.setAttributeNameList(scanServer, attributeNameList);
f.setXAttributeNameList(scanServer, xAttributeNameList);
f.setYAttributeNameList(scanServer, yAttributeNameList);
// f.setColorArrayList(new Color[] { Color.BLUE, Color.RED });
// f.setMarkerStyleList(new int[] { IChartViewer.MARKER_BOX });
// f.setMarkerSizeList(new int[] { 5 });
// f.setDataArrayLineWidth(new int[] { 2 });
// f.setY1GridStyle(IChartViewer.STYLE_LONG_DASH);
// f.setY1GridVisible(true);
// f.setY2GridStyle(IChartViewer.STYLE_LONG_DASH);
// f.setY2GridVisible(true);
// f.setXDateFormat(true);
f.setAttributesOnAxis(scanServer, new String[] { "actuator_1_1", "data_01" },
IChartViewer.Y2);
// f.setAttributesOnAxis(scanServer, new String[] { "data_01" }, IChartViewer.Y2);
// f.setAxisList(new int[] { 0, 1 });
frame.setContentPane(f);
frame.setSize(640, 600);
frame.setTitle(f.getClass().getName());
frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}