Gauge field

Use a gauge field to create a horizontal bar to display a progress indicator or a numeric value.

Class GaugeField
Supported since BlackBerry® Java® SDK 4.2

For more information about gauge fields, see the UI Guidelines.

Code sample: Creating a gauge field

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.GaugeField;
import net.rim.device.api.ui.container.*;

public class GaugeFieldDemo extends UiApplication 
    public static void main(String[] args)
        GaugeFieldDemo theApp = new GaugeFieldDemo(); 
    public GaugeFieldDemo() 
        pushScreen(new GaugeFieldDemoScreen()); 

class GaugeFieldDemoScreen extends MainScreen
    public GaugeFieldDemoScreen ()
        setTitle("Gauge Field Demo");
        GaugeField percentGauge = new GaugeField("Percent: ", 1, 100, 29, GaugeField.PERCENT);

Next topic: Activity indicator
Previous topic: Activity fields

Was this information helpful? Send us your comments.