Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.Font


   
    int textWidth = Math.max(0, width - iconWidth - PADDING * 3);
    int textX = PADDING;
    int textY = y + PADDING;
    int flags = Graphics.ELLIPSIS;
    Font savedFont = graphics.getFont();
    graphics.setFont(mUserFont);
    graphics.drawText(item.mUser, textX, textY, flags, textWidth);
    textY += mUserFont.getHeight();
    graphics.setFont(mPinFont);
    graphics.drawText(item.mPin, textX, textY, flags, textWidth);
View Full Code Here


  }
 
  public void paint(net.rim.device.api.ui.Graphics graphics){
       // has the screen orientation changed? if so change my fonts
  
    Font currentFont = graphics.getFont();
    Font newFont = currentFont.derive(currentFont.getStyle(), 100, Ui.UNITS_px);
    graphics.setFont(newFont);
   
      super.paint(graphics);
  }
View Full Code Here

        private void paintListItem( ListItem listItem, ListField listField, Graphics graphics, int index, int y, int width ) {
            String text = listItem.toString().trim();

            int type = listItem.getType();
            Font font = graphics.getFont();
            final int checkboxSize = font.getHeight() - 6;
            final int textStart = PADDING + checkboxSize + 10;

            Bitmap checkWhite = GPATools.ResizeTransparentBitmap( Bitmap.getBitmapResource( "chk-white.png" ), checkboxSize,
                    checkboxSize, Bitmap.FILTER_BOX, Bitmap.SCALE_TO_FILL );
            Bitmap checkBlue = GPATools.ResizeTransparentBitmap( Bitmap.getBitmapResource( "chk-blue.png" ), checkboxSize,
                    checkboxSize, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL );
            Bitmap boxEmpty = GPATools.ResizeTransparentBitmap( Bitmap.getBitmapResource( "box-empty.png" ), checkboxSize,
                    checkboxSize, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL );

            switch( type ) {
                case SelectAsyncFunction.POPUP_ITEM_TYPE_SEPARATOR:
                    graphics.setColor( Color.GRAY );
                    int lineY = y + listField.getRowHeight() / 3;
                    graphics.drawLine( PADDING, lineY, width - PADDING, lineY );
                    break;
                case SelectAsyncFunction.POPUP_ITEM_TYPE_GROUP:
                    graphics.setColor( Color.GRAY );
                    font = font.derive( Font.BOLD );
                    graphics.setFont( font );
                    graphics.drawText( text, PADDING, y, DrawStyle.ELLIPSIS, width - PADDING ); // no fudge added to y coordinate
                    break;
                case SelectAsyncFunction.POPUP_ITEM_TYPE_OPTION:
                    boolean enabled = listItem.isEnabled();
View Full Code Here

    add(_instuctions);
        add(separator0);

    add(_urlField);
   
        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

   
View Full Code Here

        add(separator0);

    add(_urlField);
    add(_txtField);
   
        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

   
View Full Code Here

        _miStop.setCommand(new Command(new StopCommand(this)));

        _miStart.setCommandContext(this);
        _miStart.setCommand(new Command(new StartCommand(this)));

        Font default_font = Font.getDefault();
        _headingFont = default_font.derive(Font.BOLD, 24);

        _heading.setText("Event Log (newest items first)");
        _heading.setFont(_headingFont);

        add(_separator1);
View Full Code Here

//        if(emulation_type == Constants.EMULATE_SC) {
//            emulateSmartCard();
//        } else {
//        }

        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

        add(separator1);
View Full Code Here

        addMenuItem(mi_stop);

        mi_start.setCommandContext(this);
        mi_start.setCommand(new Command(new StartCommand(this)));

        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

        add(separator1);
View Full Code Here

            indicateSender();
        } else {
            indicateReceiver();
        }

        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

        add(separator1);
View Full Code Here

    add(_instuctions);
        add(separator0);

    add(_txtField);
   
        Font default_font = Font.getDefault();
        heading_font = default_font.derive(Font.BOLD, 24);

        heading.setText("Event Log (newest items first)");
        heading.setFont(heading_font);

   
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.Font

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.