ADM CBits Widget
(Since adm V0.2)

CBits is an awt component bean. It displays and controls an integer property's value in the control system as bit patterns. The size, bound, foreground, background and the font of the label on the widget can be set like an awt component.

The bits display range can be set through the setDisplayBits (int, int), setStartBit (int) and setEndBit (int) methods. The default bits display range is 0 to 15.

By default it is a monitor widget only (the controllable property is set to false). Since version 0.3 it is can used to control the individual bits by calling setControllable(true). If the controllable property is set to true, the individual bit rectangle works like a push button. Pushing the bit button the value will change from 0 to 1 or 1 to 0.

There are three label styles with a default of LABEL_NONE (Fig.1). If LABEL_AXIS (or LABEL_VALUE) is used, start/end bit numbers and a arrow indicating increasing bit number will be shown (Fig. 2). All the information including the device and property name is shown when LABEL_ALL is used (Fig. 3, Fig. 4).

CBits has four directions which can be selected. The bits can start from right (direction = DIR_LEFT), left (direction = DIR_RIGHT), top (direction = DIR_DOWN) or bottom (direction = DIR_UP).


A left CBits with LABEL_NONE A down CBits with LABEL_AXIS A up CBits with LABEL_ALL A right CBits with LABEL_ALL
Fig. 1Fig. 2 Fig. 3Fig. 4