/**
   * Constructor.
   *
   * @param text The text to be displayed on the button
   * @param style Combination of field style bits to specify display attributes
   */
  public BOC(String dboc, String iboc, String tboc) {
    super(Field.NON_FOCUSABLE);
    try {
      _width = Display.getWidth();
      switch (_width) {
        case 480:
          f2 = 20;

          dbmp = Bitmap.getBitmapResource("bocdom480.jpg");
          ibmp = Bitmap.getBitmapResource("bocinter480.jpg");
          tbmp = Bitmap.getBitmapResource("boctotal480.jpg");
          _height = 60;
          break;
        case 360:
          f2 = 19;
          dbmp = Bitmap.getBitmapResource("bocdom360.png");
          ibmp = Bitmap.getBitmapResource("bocinter360.png");
          tbmp = Bitmap.getBitmapResource("boctotal360.png");
          _height = 60;
          break;
        default:
          f2 = 17;
          dbmp = Bitmap.getBitmapResource("bocdom320.png");
          ibmp = Bitmap.getBitmapResource("bocinter320.png");
          tbmp = Bitmap.getBitmapResource("boctotal320.png");

          _height = 60;
          break;
      }
      _dboc = dboc;
      _iboc = iboc;
      _tboc = tboc;
      FontFamily ff1 = FontFamily.forName("BBAlpha Serif");
      font = ff1.getFont(Font.PLAIN, f2);

    } catch (Exception ex) {
      System.out.println(ex.getMessage());
    }
  }
  CitationScreen6(Citation _c) {
    c = _c;

    String cNumberString = Integer.toString(c.Number);
    /*
            CustomLabelField lf = new CustomLabelField("OREGON UNIFORM CITATION: #" + cNumberString, LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
            lf.setBackgroundColor(0x00194E84);
            lf.setTextColor(0x00ffffff);
            FontFamily fontFamily0[] = FontFamily.getFontFamilies();
            Font font = fontFamily0[1].getFont(FontFamily.CBTF_FONT, 14);
            lf.setFont(font);

            add(lf);
    */
    LabelField lf0 =
        new LabelField(
            "OREGON UNIFORM CITATION: #" + cNumberString,
            LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER) {
          protected void paintBackground(net.rim.device.api.ui.Graphics g) {
            g.clear();
            g.getColor();
            g.setColor(Color.GREEN);
            g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
            g.setColor(Color.WHITE);
          }
        };
    FontFamily fontFamily0[] = FontFamily.getFontFamilies();
    Font font0 = fontFamily0[1].getFont(FontFamily.CBTF_FONT, 14);
    lf0.setFont(font0);
    setTitle(lf0);
    add(new SeparatorField());
    /*
          CustomLabelField lf1 = new CustomLabelField("************* INCIDENT ATTRIBUTES **************", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
          lf1.setBackgroundColor(Color.LIGHTGREY);
          lf1.setTextColor(Color.BLUE);

          FontFamily fontFamily[] = FontFamily.getFontFamilies();
          Font font1 = fontFamily[1].getFont(FontFamily.CBTF_FONT, 14);
          lf1.setFont(font1);
          add(lf1);
    */
    LabelField lf3 =
        new LabelField(
            "********* INCIDENT ATTRIBUTES **********",
            LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER) {
          protected void paintBackground(net.rim.device.api.ui.Graphics g) {
            g.clear();
            g.getColor();
            g.setColor(Color.GREEN);
            g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
            g.setColor(Color.WHITE);
          }
        };
    FontFamily fontFamily3[] = FontFamily.getFontFamilies();
    Font font3 = fontFamily3[1].getFont(FontFamily.CBTF_FONT, 14);
    lf3.setFont(font0);
    add(lf3);
    add(new SeparatorField());

    // --------------

    // CheckboxField
    field_accident = new CheckboxField("Accident", false);
    add(field_accident);

    // CheckboxField
    field_radar = new CheckboxField("Radar", false);
    add(field_radar);

    // CheckboxField
    field_jail_booking = new CheckboxField("Jail Booking", false);
    add(field_jail_booking);

    // CheckboxField
    field_paced = new CheckboxField("Paced", false);
    add(field_paced);

    // CheckboxField
    field_school_zone = new CheckboxField("School Zone", false);
    add(field_school_zone);

    // CheckboxField
    field_alcohol = new CheckboxField("Alcohol", false);
    add(field_alcohol);

    add(new SeparatorField());

    // EditField
    field_vbfi = new EditField("VBFI: ", "");
    add(field_vbfi);

    // ObjectChoiceField
    String choicestrs1[] = {
      "5MPH", "10MPH", "15MPH", "20MPH", "25MPH", "30MPH", "35MPH", "40MPH", "45MPH", "50MPH",
      "55MPH", "60MPH", "65MPH", "70MPH", "75MPH", "80MPH"
    };
    field_speed_limit = new ObjectChoiceField("Speed Limit: ", choicestrs1, 0);
    add(field_speed_limit);

    // EditField
    field_alleged_speed = new EditField("Alleged Speed: ", "");
    add(field_alleged_speed);

    add(new SeparatorField());

    // ButtonField row - set all buttons at the bottom row of the form
    HorizontalFieldManager navButtonManager = new HorizontalFieldManager();

    // ButtonField
    ButtonField btn_prev;
    btn_prev = new ButtonField("Prev", ButtonField.CONSUME_CLICK);
    btn_prev.setChangeListener(new ButtonListener6(this, c));
    navButtonManager.add(btn_prev);

    ButtonField btn_next;
    btn_next = new ButtonField("Next", ButtonField.CONSUME_CLICK);
    btn_next.setChangeListener(new ButtonListener6(this, c));
    navButtonManager.add(btn_next);

    add(navButtonManager);

    add(new SeparatorField());

    addMenuItem(saveItem6);
    addMenuItem(getItem6);

    restoreUIFieldsFromCitation();
  }