Package net.rim.device.api.system

Examples of net.rim.device.api.system.Bitmap


            final Object iconURI = options.getField("icon");
            if(iconURI.equals(UNDEFINED)) {
                iconID = -1;
            } else {
                final byte[] iconBytes = Util.requestBitmapBytes((String) iconURI);
                final Bitmap icon = Bitmap.createBitmapFromBytes(iconBytes, 0, iconBytes.length, 1);
                iconID = Math.abs(ByteBuffer.wrap(iconBytes).hashCode()); // icon ID is hash code of bitmap
                if(! _profileBox.isIconRegistered(iconID)) {
                    _profileBox.registerIcon(iconID, PNGEncodedImage.encode(icon));
                }
            }
View Full Code Here


                vc.addElement( (byte) b );
            }

            // An application could have multiple entry points and each entry point has its own icon.
            // We need to update icons for all entry points to be the same one.
            Bitmap image = Bitmap.createBitmapFromBytes( vc.getArray(), 0, vc.size(), 1 );
            ApplicationDescriptor current = ApplicationDescriptor.currentApplicationDescriptor();
            int moduleHandle = current.getModuleHandle();
            ApplicationDescriptor[] descriptors = CodeModuleManager.getApplicationDescriptors( moduleHandle );
           
            if( args.length == 1 || !( (Boolean) args[ 1 ] ).booleanValue() ) {
View Full Code Here

        /**
         * Creates the home screen with all the UI components on it
         */
        public AppScreen()
        {
            Bitmap icon            = null;
            BitmapField iconField  = null;

            icon = Bitmap.getBitmapResource(IMAGE_LOGO);
            iconField = new BitmapField(icon, Field.FIELD_HCENTER);//Field is centered horizontally
           
View Full Code Here

  public Bitmap transformAndPaintBitmap() {

    applyTransformation();

    // create the new bitmap
    Bitmap transformedBitmap = new Bitmap(bitmap.getType(), transformedRegion.width, transformedRegion.height);
    transformedBitmap.createAlpha(Bitmap.ALPHA_BITDEPTH_8BPP);
    Graphics graphics = new Graphics(transformedBitmap);
    paintTransformedBitmap(graphics);
    return transformedBitmap;
  }
View Full Code Here

       
        GameState game_state = GameState.getInstance();
        game_state.setGame_over(false);
       
        uiconfig = UiConfigFactory.getUiConfig(Display.getWidth(), Display.getHeight());
        Bitmap nought_unfocused = BitmapFactory.getNoughtUnfocused();
        Bitmap nought_focused = BitmapFactory.addStateIndicator(nought_unfocused, Constants.FOCUSED_COLOUR);
        Bitmap nought_clicked = BitmapFactory.addStateIndicator(nought_unfocused, Constants.CLICKED_COLOUR);

        Bitmap cross_unfocused = BitmapFactory.getCrossUnfocused();
        Bitmap cross_focused = BitmapFactory.addStateIndicator(cross_unfocused, Constants.FOCUSED_COLOUR);
        Bitmap cross_clicked = BitmapFactory.addStateIndicator(cross_unfocused, Constants.CLICKED_COLOUR);
       
        MsbConfig nought_btn_config = new MsbConfig();
        MsbState btn_state_nought = new MsbState(Constants.SELECT_STATE_NOUGHT, "", "");
        btn_state_nought.setbmp_focused(nought_focused);
        btn_state_nought.setbmp_unfocused(nought_unfocused);
View Full Code Here

import nfc.sample.tictactoe.Constants;

public class BitmapFactory {
   
    public static Bitmap getBackground(int width, int height) {
        Bitmap bg = new Bitmap(width, height);
        Graphics pen = Graphics.create(bg);
        int x1 = width / 3;
        int x2 = x1 * 2;
        int y1 = height / 3;
        int y2 = y1 * 2;
 
View Full Code Here

   
    public static Bitmap getBlankUnfocused() {
        int width  = Display.getWidth();
        int height = Display.getHeight();
        UiConfig uiconfig = UiConfigFactory.getUiConfig(width,height);
        Bitmap blank_unfocused = Bitmap.getBitmapResource(uiconfig.getTileNameBlankUnfocus());
        return blank_unfocused;
    }
View Full Code Here

    public static Bitmap getNoughtUnfocused() {
        int width  = Display.getWidth();
        int height = Display.getHeight();
        UiConfig uiconfig = UiConfigFactory.getUiConfig(width,height);
        Bitmap nought_unfocused = Bitmap.getBitmapResource(uiconfig.getTileNameNoughtUnfocus());
        return nought_unfocused;
    }
View Full Code Here

    public static Bitmap getCrossUnfocused() {
        int width  = Display.getWidth();
        int height = Display.getHeight();
        UiConfig uiconfig = UiConfigFactory.getUiConfig(width,height);
        Bitmap cross_unfocused = Bitmap.getBitmapResource(uiconfig.getTileNameCrossUnfocus());
        return cross_unfocused;
    }
View Full Code Here

    public static Bitmap getNewGameScreen() {
        int width  = Display.getWidth();
        int height = Display.getHeight();
        UiConfig uiconfig = UiConfigFactory.getUiConfig(width,height);
        Bitmap new_game = Bitmap.getBitmapResource(uiconfig.getNewGameScreenName());
        return new_game;
    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.system.Bitmap

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.