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

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


    mCodeArea = new HorizontalFieldManager(FIELD_HCENTER);

    Bitmap bitmap = Bitmap.getBitmapResource("ic_lock_lock.png");
    BitmapField icon = new BitmapField(bitmap, FIELD_VCENTER);

    mCodeTextView = new LabelField("", FIELD_VCENTER);
    mCodeArea.add(icon);
    mCodeArea.add(mCodeTextView);

    ApplicationDescriptor applicationDescriptor = ApplicationDescriptor
        .currentApplicationDescriptor();
    String version = applicationDescriptor.getVersion();
    mVersionText = new LabelField(version, FIELD_RIGHT | FIELD_BOTTOM);

    add(mCheckCodeTextView);
    add(mCodeArea);
    add(mVersionText);
  }
View Full Code Here


  private int mStatusColor;

  public EnterKeyScreen() {
    setTitle(sResources.getString(ENTER_KEY_TITLE));
    VerticalFieldManager manager = new VerticalFieldManager();
    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);
        super.paint(graphics);
        graphics.setColor(savedColor);
      }
    };
    mKeyEntryField.setChangeListener(this);
    manager.add(mDescriptionText);
    manager.add(new LabelField()); // Spacer
    manager.add(mAccountName);
    manager.add(mKeyEntryField);
    manager.add(mStatusText);
    manager.add(mType);

    HorizontalFieldManager buttons = new HorizontalFieldManager(FIELD_HCENTER);
    mSubmitButton = new ButtonField(sResources.getString(SUBMIT),
        ButtonField.CONSUME_CLICK);
    mClearButton = new ButtonField(sResources.getString(CLEAR),
        ButtonField.CONSUME_CLICK);
    mCancelButton = new ButtonField(sResources.getString(CANCEL),
        ButtonField.CONSUME_CLICK);
    mSubmitButton.setChangeListener(this);
    mClearButton.setChangeListener(this);
    mCancelButton.setChangeListener(this);
    buttons.add(mSubmitButton);
    buttons.add(mClearButton);
    buttons.add(mCancelButton);

    ApplicationDescriptor applicationDescriptor = ApplicationDescriptor
        .currentApplicationDescriptor();
    String version = applicationDescriptor.getVersion();
    mVersionText = new LabelField(version, FIELD_RIGHT | FIELD_BOTTOM);
    add(manager);
    add(buttons);
    add(mVersionText);
  }
View Full Code Here

    setAdapter();

    ApplicationDescriptor applicationDescriptor = ApplicationDescriptor
        .currentApplicationDescriptor();
    String version = applicationDescriptor.getVersion();
    mVersionText = new LabelField(version, FIELD_RIGHT | FIELD_BOTTOM);
    mStatusText = new LabelField("", FIELD_HCENTER | FIELD_BOTTOM);

    add(mEnterPinTextView);
    add(mUserList);
    add(new LabelField(" ")); // One-line spacer
    add(mStatusText);
    add(mVersionText);

    FieldUtils.setVisible(mEnterPinTextView, false);
   
View Full Code Here

      Languages language = new Languages();

      setBorder(AboutScreenConfig.border_popup_Transparent);
      setBackground(AboutScreenConfig.bg_popup_Transparent);

        LabelField labelAbout = new LabelField(language.getAbout(), USE_ALL_WIDTH | LabelField.ELLIPSIS);
        labelAbout.setFont(AboutScreenConfig.FONT_ABOUT_TITLE);
        labelAbout.setPadding(0, 0, 1, 0);

        LabelField labelTitle = new LabelField(title, USE_ALL_WIDTH | LabelField.ELLIPSIS);
        labelTitle.setFont(AboutScreenConfig.FONT_ABOUT_LARGE);

        LabelField labelVersion = new LabelField(language.getVersion() + version, USE_ALL_WIDTH | LabelField.ELLIPSIS | LabelField.RIGHT);
        labelVersion.setFont(AboutScreenConfig.FONT_ABOUT_SMALL);

      VerticalFieldManager vfmTitle = new VerticalFieldManager(FIELD_VCENTER);
        vfmTitle.add(labelAbout);
        vfmTitle.add(new SeparatorField());
        vfmTitle.add(labelTitle);
        vfmTitle.add(labelVersion);

      VerticalFieldManager vfmContent = new VerticalFieldManager(VERTICAL_SCROLL);
      HorizontalFieldManager horizontalContactTitle = new HorizontalFieldManager();
      //HorizontalFieldManager horizontalShortcutTitle = new HorizontalFieldManager();
      //VerticalButtonFieldSet vbf = new VerticalButtonFieldSet(USE_ALL_WIDTH);

        LabelField labelIntro = new LabelField(intro);

        LabelField labelContact = new LabelField(language.getContact(), USE_ALL_WIDTH | LabelField.ELLIPSIS);
        labelContact.setFont(AboutScreenConfig.FONT_ABOUT_HEADLINE);

        LabelField labelAuthor = addLabel("\u2022 " + author);
        if (!email.equalsIgnoreCase("")) {_labelEmail = addLabel("\u2022 " + language.getEmail() + email);}
        if (!weibo.equalsIgnoreCase("")) {_labelWeibo = addLabel("\u2022 " + language.getWeibo() + weibo);}
        if (!facebook.equalsIgnoreCase("")) {_labelFacebook = addLabel("\u2022 " + language.getFacebook() + facebook);}
        if (!twitter.equalsIgnoreCase("")) {_labelTwitter = addLabel("\u2022 " + language.getTwitter() + twitter);}
        if (!alipay.equalsIgnoreCase("")) {_labelAlipay = addLabel("\u2022 " + language.getAlipay() + alipay);}

        /*
        LabelField labelShortcut = new LabelField("快捷键:", USE_ALL_WIDTH | LabelField.ELLIPSIS);
        labelShortcut.setFont(AboutScreenConfig.FONT_ABOUT_HEADLINE);

        LabelField shortB=addLabel("\u2022 B:列表滚动到底部");
        LabelField shortT=addLabel("\u2022 T:列表滚动到顶部");
        LabelField shortL=addLabel("\u2022 L:获取最新新闻");
        LabelField shortH=addLabel("\u2022 H:获取热门新闻");
        LabelField shortS=addLabel("\u2022 S:获取专题分类");
        LabelField shortC=addLabel("\u2022 C:选择往期新闻");
        LabelField shortN=addLabel("\u2022 N:下一期新闻");
        LabelField shortP=addLabel("\u2022 P:上一期新闻");
        LabelField shortA=addLabel("\u2022 A:显示本窗口");
        LabelField shortX=addLabel("\u2022 X:退出程序");

        ButtonField btnWriteAReview = new ButtonField("编写评论", ButtonField.NEVER_DIRTY | ButtonField.CONSUME_CLICK);
        btnWriteAReview.setChangeListener(new FieldChangeListener() {
        public void fieldChanged(Field field, int context)
        {
          try
                {
                    openAppWorld(AboutScreenConfig.BBW_APPID);
                } catch(final Exception e)
                {
                    UiApplication.getUiApplication().invokeLater(new Runnable()
                    {
                        public void run()
                        {
                          if(e instanceof ContentHandlerException)
                          {
                            Dialog.alert("BlackBerry World is not installed!");
                          } else {
                            Dialog.alert("Problems opening App World: " + e.getMessage());
                          }
                        }
                    });
                }
        }
      });

        ButtonField btnBrowseOtherApps = new ButtonField("浏览其它软件", ButtonField.NEVER_DIRTY | ButtonField.CONSUME_CLICK);
        btnBrowseOtherApps.setChangeListener(new FieldChangeListener() {
        public void fieldChanged(Field field, int context)
        {
          BrowserSession browser=Browser.getDefaultSession();
            browser.displayPage("http://appworld.blackberry.com/webstore/vendor/69061");
        }
      });
      */

        horizontalContactTitle.add(labelContact);
        horizontalContactTitle.add(new LabelField("", LabelField.FOCUSABLE));
        vfmContent.add(labelIntro);
        vfmContent.add(new LabelField());
        vfmContent.add(horizontalContactTitle);
        vfmContent.add(labelAuthor);
        if (_labelEmail != null) {vfmContent.add(_labelEmail);}
        if (_labelWeibo != null) {vfmContent.add(_labelWeibo);}
        if (_labelAlipay != null) {vfmContent.add(_labelAlipay);}
        if (_labelFacebook != null) {vfmContent.add(_labelFacebook);}
        if (_labelTwitter != null) {vfmContent.add(_labelTwitter);}
        vfmContent.add(new LabelField());

      /*
        horizontalShortcutTitle.add(labelShortcut);
        horizontalShortcutTitle.add(new LabelField("", LabelField.FOCUSABLE));
        vfmContent.add(horizontalShortcutTitle);
View Full Code Here

        add(vfmContent);
    }

    private LabelField addLabel(String label)
    {
      return new LabelField(label, USE_ALL_WIDTH | LabelField.ELLIPSIS);
    }
View Full Code Here

    _spinBoxField.setRowHeight(rowHeight);
    if (selectedIndex < choices.length && selectedIndex > 0)
      _spinBoxField.setSelectedIndex(selectedIndex);
    else
      _spinBoxField.setSelectedIndex(0);
    add(new LabelField(title));
    add(new SeparatorField());
    HorizontalFieldManager hfm = new HorizontalFieldManager(Field.FIELD_HCENTER);
    hfm.add(_spinBoxField);
    add(hfm);    
    // Turn off the virtual keyboard
View Full Code Here

  private Category[] categories = new Category[0];
  private Field[] fields = new Field[0];
  private Category selectedCategory;
 
  public OmniLinkBBClientScreen() {
    LabelField title = new LabelField(OmniLinkBBClient.getString(OmniLinkClientResource.APPLICATION_TITLE), LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    setTitle(title);
  }
View Full Code Here

  }
 
  protected Field createLabelAndTextField(String label, String text) {
    HorizontalFieldManager fieldManager = new HorizontalFieldManager();
    fieldManager.setPadding(5, 0, 5, 0);
    LabelField labelField = new LabelField(label, Field.FIELD_LEFT);
    RichTextField textField = new RichTextField(text, RichTextField.TEXT_ALIGN_RIGHT | RichTextField.NON_FOCUSABLE);
    fieldManager.add(labelField);
    fieldManager.add(textField);

    return fieldManager;
View Full Code Here

    return fieldManager;
  }

  protected Field createLabelAndButtonField(String label, String buttonText, final Execution execution) {
    LabelField labelField = new LabelField(label, Field.FIELD_LEFT);
    ButtonField buttonField = new ButtonField(buttonText, Field.FIELD_RIGHT | ButtonField.CONSUME_CLICK);
    FieldChangeListener changeListener = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        execution.execute(null);
      }
View Full Code Here

   
    return hfm;
  }

  protected Field createLabelAndTwoButtonsField(String label, String buttonText1, final Execution execution1, String buttonText2, final Execution execution2) {
    LabelField labelField = new LabelField(label, Field.FIELD_LEFT);
    labelField.setPadding(5, 0, 5, 0);
    ButtonField buttonField1 = new ButtonField(buttonText1, Field.FIELD_RIGHT | ButtonField.CONSUME_CLICK);
    FieldChangeListener changeListener1 = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        execution1.execute(null);
      }
View Full Code Here

TOP

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

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.