vg.setGridColor("#000000");
vg.setMin(8);
vg.setMax(23);
TimeGeometry tg = new DefaultTimeGeometry();
tg.setGridStep(2 * 60 * 60 * 1000);
bugBtn.addEventListener("onClick", new EventListener()
{
@Override
public void onEvent(Event event) throws Exception
{
Date begin = format.parse("2009/01/01 13:00:00");
Date end = format.parse("2009/01/01 18:00:00");
timeplot.invalidate();
// new date reference
dfPlot1.setDataModel(generateData(new Date(begin.getTime()), end));
dfPlot2.setDataModel(generateData(new Date(begin.getTime()), end));
}
});
// ValueGeometry vg2 = new DefaultValueGeometry();
// vg2.setGridColor("#000000");
// vg2.setMin(8);
// vg2.setMax(23);
// tg.setMax((int) (new Date().getTime()+2*60*60*1000));
tg.setAxisLabelsPlacement("bottom");
tg.setGridStepRange(30 * 60 * 1000);
PlotDataSource pds = new PlotDataSource();
pds.setSeparator(" ");
dfPlot1.setRoundValues(false);
dfPlot1.setPlotDataSource(pds);
dfPlot1.setValueGeometry(vg);
dfPlot1.setTimeGeometry(tg);
dfPlot1.setDataModel(dataModel1);
dfPlot2.setRoundValues(false);
dfPlot2.setValueGeometry(vg);
dfPlot2.setPlotDataSource(pds);
dfPlot2.setDataModel(dataModel2);
// miss TimeGeometry
dfPlot2.setTimeGeometry(tg);
//
plots.add(dfPlot1);
plots.add(dfPlot2);
auto.setAttribute("push", false);
auto.addEventListener("onCheck", new EventListener()
{
@Override
public void onEvent(Event arg0) throws Exception
{
Boolean isPush = (Boolean) auto.getAttribute("push");
Desktop desktop = Executions.getCurrent().getDesktop();
if (!isPush)
{
desktop.enableServerPush(true);
new WorkingThread(auto, dfPlot1, databuff.get(0), 5).start();
new WorkingThread(auto, dfPlot2, databuff.get(1), 10).start();
}
else
{
desktop.enableServerPush(false);
}
auto.setAttribute("push", !isPush);
// ListModelList dataModelNew=makeModel();
//
// timplotModelTest.setDataModel(dataModelNew);
}
});
tbbox.addEventListener("onSelect", new EventListener()
{
@Override
public void onEvent(Event arg0) throws Exception
{