Abstrct Canvas/CAnimatedCanvas Classes
(Since adm V0.3)

Since release 0.3 the CCanvas class is split into two abstract classes CCanvas and CAnimatedCanvas.

The new CCanvas class is only responsible for posting the minotorOn and receiving data. It is the base class of the control system display widgets. It uses awt.component paint and update methods. Users can extend this class to develop simple custom widgets.

CAnimatedCanvas class extends CCanvas and implements double buffering. It can be used as a base class for widgets with complicated graphics. The background paint and foreground paint are separated in this class. The background painted is only called the first time in the paint method. Only the foreground paint is performed for each update. This provides a better image update (smoother) and an efficient paint. It is better to use this base class when developing widgets with the complicated backgrounds or dynamic graphics.

CCanvas and CAnimatedCanvas are abstract classes. The derived classes must implement the deviceChanged method for CCanvas, plus paintBackground and paintForeground methods for CAnimatedCanvas.