Package net.rim.device.api.ui.component

Examples of net.rim.device.api.ui.component.ObjectChoiceField


    mDescriptionText = new LabelField(sResources.getString(ENTER_KEY_HELP));
    mAccountName = new EditField(EditField.NO_NEWLINE);
    mAccountName.setLabel(sResources.getString(ENTER_ACCOUNT_LABEL));
    mKeyEntryField = new EditField(EditField.NO_NEWLINE);
    mKeyEntryField.setLabel(sResources.getString(ENTER_KEY_LABEL));
    mType = new ObjectChoiceField(sResources.getString(TYPE_PROMPT), OtpType
        .values());
    mStatusText = new LabelField() {
      protected void paint(Graphics graphics) {
        int savedColor = graphics.getColor();
        graphics.setColor(mStatusColor);
View Full Code Here


  }
 
  protected void onUiEngineAttached(boolean attached) {
    super.onUiEngineAttached(attached);
   
    ObjectChoiceField categoryChoiceField = new ObjectChoiceField("", categories, 0, Field.FIELD_LEFT);
    categoryChoiceField.setChangeListener(new FieldChangeListener() {     
      public void fieldChanged(Field field, int context) {
        if (context == ChoiceField.CONTEXT_CHANGE_OPTION) {
          ChoiceField choiceField = (ChoiceField) field;
          int index = choiceField.getSelectedIndex();
          if (index >= 0) {
View Full Code Here

   
    return hfm;
  }

  protected Field createLabelAndChoiceField(String label, Object[] choices, final Object initialChoice, final Execution execution) {
    final ObjectChoiceField choiceField = new ObjectChoiceField(label, choices);
    if (initialChoice != null) {
      choiceField.setSelectedIndex(initialChoice);
      FieldChangeListener changeListener = new FieldChangeListener() {
        public void fieldChanged(Field field, int context) {
          if (context == ChoiceField.CONTEXT_CHANGE_OPTION) {
            Object selection = choiceField.getChoice(choiceField.getSelectedIndex());
            if (selection != null) {
              if (!execution.execute(selection)) {
                choiceField.setSelectedIndex(initialChoice);
              }
            }
          }
        }
      };
      choiceField.setChangeListener(changeListener);
    }
   
    return choiceField;
  }
View Full Code Here

    modeStrings = new String[] {"OPTIMAL", "GPS", "GEOLOCATION", "GEOLOCATION CELL", "GEOLOCATION WLAN"};
    //#endif
    //#ifdef BlackBerrySDK5.0.0
    modeStrings = new String[] {"OPTIMAL", "GPS", "GEOLOCATION"};
    //#endif
    modeField = new ObjectChoiceField("Mode: ", modeStrings, 0);
    modeField.setChangeListener(this);   
   
    trackingIntervalField = new NumericChoiceField("Tracking Interval: ", 1, 300, 1, 4);
    trackingIntervalField.setChangeListener(this);
   
View Full Code Here

        add(_addressField);

        // Start/end time selection
        final VerticalFieldManager vfm = new VerticalFieldManager();
        _choiceField =
                new ObjectChoiceField("When:", new Object[] { "Depart Now",
                        "Depart At", "Arrive At" }, 0);
        _choiceField.setChangeListener(new FieldChangeListener() {
            /**
             * @see net.rim.device.api.ui.FieldChangeListener#fieldChanged(Field,
             *      int)
View Full Code Here

        add(_editFieldLatitude);
        add(_editFieldLongitude);
        add(_blockingCheckBox);
        add(_bearingEditField);

        _choiceField = new ObjectChoiceField("Admin Level:", choices, 0);
        add(_choiceField);

        _searchButton = new ButtonField("Search");
        _searchButton.setChangeListener(this);
        add(_searchButton);
View Full Code Here

            add(new SeparatorField());

            // Initialize choice field for font selection and add to screen
            _fontChoiceField =
                    new ObjectChoiceField("Select a font:", _fontFamilies, 0,
                            Field.FIELD_HCENTER);
            _fontChoiceField.setEditable(false);
            _fontChoiceField.setChangeListener(this);
            add(_fontChoiceField);
View Full Code Here

                        "Illuminate with magnify lens",
                        "Illuminate with shrink lens" };
        add(new SeparatorField());
        add(new LabelField("Select highlight style", Field.FIELD_HCENTER));
        _choiceField =
                new ObjectChoiceField("", choices, HighlightStyle.ILLUMINATE,
                        Field.FIELD_HCENTER);
        _choiceField.setChangeListener(this);
        add(_choiceField);

        add(new SeparatorField());
View Full Code Here

        _blockingCheckbox = new CheckboxField("Blocking:", false);
        add(_blockingCheckbox);

        _choiceField =
                new ObjectChoiceField("Search Type: ", new String[] {
                        "Freeform", "Structured" }, 0);
        _choiceField.setChangeListener(this);
        add(_choiceField);

        add(new SeparatorField());
View Full Code Here

         * Create a new ColorChangeDialog object
         */
        public ColorChangeDialog(final int index) {
            super(Dialog.D_OK_CANCEL, "Choose Colour", Dialog.OK, null,
                    Dialog.GLOBAL_STATUS);
            _colorChooser = new ObjectChoiceField("Colour: ", _colors, 0);
            _colorChooser.setSelectedIndex(index);
            add(_colorChooser);
        }
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.component.ObjectChoiceField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.