Package net.rim.device.api.ui.container

Examples of net.rim.device.api.ui.container.HorizontalFieldManager


    mUser = user;
    setTitle(sResources.getString(CHECK_CODE_TITLE));
    mCheckCodeTextView = new RichTextField();
    mCheckCodeTextView.setText(sResources.getString(CHECK_CODE));

    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);
View Full Code Here


    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);
View Full Code Here

        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);}
View Full Code Here

      _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
    final VirtualKeyboard virtualKeyboard = this.getVirtualKeyboard();
    if (virtualKeyboard != null) {
      virtualKeyboard.setVisibility(VirtualKeyboard.HIDE);
View Full Code Here

        }

        if( _widgetConfigImpl.getForegroundImage().length() != 0 ) {
            EncodedImage foregroundImage = EncodedImage.getEncodedImageResource( _widgetConfigImpl.getForegroundImage() );
            if( foregroundImage != null ) {
                _hfm = new HorizontalFieldManager( Manager.NO_HORIZONTAL_SCROLL | Manager.NO_VERTICAL_SCROLL
                        | Field.NON_FOCUSABLE | Field.FIELD_HCENTER );

                if( foregroundImage instanceof GIFEncodedImage ) {
                    _foregroundImage = new AnimatedGIFField( (GIFEncodedImage) foregroundImage );
                    ( ( AnimatedGIFField) _foregroundImage ).startAnimation();
View Full Code Here

    private final int PADDING = 4;
    private final int PADDING_BOTTOM = 39;
    private final String OK = "OK";

    public ColorPickerPopup( int initialColor ) {
        super( new HorizontalFieldManager() );
        setPadding( PADDING, PADDING, PADDING, PADDING );
        _baseColorChooser = new BaseColorChooser();
        _baseColorChooser.setPadding( PADDING, PADDING, PADDING, PADDING );
        _baseColorChooser.setChangeListener( this );
        add( _baseColorChooser );
View Full Code Here

import net.rim.device.api.ui.container.HorizontalFieldManager;
import net.rim.device.api.ui.container.PopupScreen;

public class MessageScreen extends PopupScreen {
    public MessageScreen(String message) {
        super( new HorizontalFieldManager(), Field.NON_FOCUSABLE);
        final BitmapField logo = new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS));
        logo.setSpace( 5, 5 );
        add(logo);

        RichTextField rtf = new RichTextField(message, Field.FIELD_VCENTER | Field.NON_FOCUSABLE | Field.FIELD_HCENTER);
View Full Code Here

    dateField.setPadding(5, 0, 5, 0);
    return dateField;
  }
 
  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 createCheckBoxAndTextField(String label, boolean checked, final Execution exec, String text) {
    HorizontalFieldManager fieldManager = new HorizontalFieldManager();
    final CheckboxField checkBoxField = new CheckboxField(label, checked, NO_USE_ALL_WIDTH);
    FieldChangeListener changeListener = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        boolean checked = checkBoxField.getChecked();
        if (!exec.execute(new Boolean(checked))) {
          checkBoxField.setChecked(!checked);
        }
      }
    };
    checkBoxField.setChangeListener(changeListener);
    RichTextField textField = new RichTextField(text, RichTextField.TEXT_ALIGN_RIGHT | RichTextField.NON_FOCUSABLE);
    fieldManager.add(checkBoxField);
    fieldManager.add(textField);

    return fieldManager;
  }
View Full Code Here

    buttonField.setChangeListener(changeListener);
    VerticalFieldManager vfmLeft = new VerticalFieldManager();
    VerticalFieldManager vfmRight = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH);
    vfmLeft.add(labelField);
    vfmRight.add(buttonField);
    HorizontalFieldManager hfm = new HorizontalFieldManager();
    hfm.add(vfmLeft);
    hfm.add(vfmRight);
   
    return hfm;
  }
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.container.HorizontalFieldManager

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.