Ejemplo n.º 1
0
 public void drawPrevious() {
   if (!_dsi.atStart()) _dsi.retreat();
   DataSetElement dse = null;
   while (!_dsi.atStart()) {
     dse = _dsi.getElement();
     if (_filter.isAcceptable(dse)) break;
     _dsi.retreat();
   }
   _timeText.setText(dse.getXString());
   for (int i = 0; i < _dse.getDimension(); i++) _dse.setX(i, dse.getX(i + 1));
   _pdm.setReferenceObject(_dse);
   _canvas.redoNextPaint();
   _canvas.repaint();
   if (_dsi.atStart()) {
     timer.stopAnimation();
     return;
   }
 }
Ejemplo n.º 2
0
 public void drawNext() {
   if (_dsi.atEnd()) {
     timer.stopAnimation();
   }
   DataSetElement dse = null;
   while (!_dsi.atEnd()) {
     dse = _dsi.getElement();
     if (_filter.isAcceptable(dse)) break;
     _dsi.advance();
   }
   if (dse == null) return; // no more good elements, probably at end
   _timeText.setText(dse.getXString());
   for (int i = 0; i < _dse.getDimension(); i++) _dse.setX(i, dse.getX(i + 1));
   // System.out.println(_dse);
   _pdm.setReferenceObject(_dse);
   _canvas.redoNextPaint();
   _canvas.repaint();
   if (!_dsi.atEnd()) _dsi.advance();
 }