Package net.rim.device.api.ui.image

Examples of net.rim.device.api.ui.image.Image


            if (iconResourcePath != null) {
                // Retrieve the icon resource and add it to the menu item
                final EncodedImage encodedImage =
                        EncodedImage.getEncodedImageResource(iconResourcePath);
                if (encodedImage != null) {
                    final Image iconImage =
                            ImageFactory.createImage(encodedImage);
                    this.setIcon(iconImage);
                }
            }
        }
View Full Code Here


            ImageMenuItem() {
                super(new StringProvider("Image menu item"), 0x230100, 0);

                // Create Image object from project resource
                final Bitmap bitmap = Bitmap.getBitmapResource("img.png");
                final Image image = ImageFactory.createImage(bitmap);

                // Set image as this menu item's icon
                setIcon(image);
            }
View Full Code Here

            final SearchableEntity item = (SearchableEntity) element;

            final int rowHeight = listField.getRowHeight();

            // Paint icon for this item/searchable
            Image image = item.getIcon();
            if (image == null) {
                image = item.getSearchable().getIcon();
            }
            if (image != null) {
                // Paint icon with equal height and width
                image.paint(graphics, 3, y - y % rowHeight, rowHeight,
                        rowHeight);
            }

            // Build up display text
            final StringBuffer buffer = new StringBuffer();
View Full Code Here

            if (args[0].equals("autostartup")) {
                // Create image
                final EncodedImage encodedImage =
                        EncodedImage
                                .getEncodedImageResource("img/logo_blue.jpg");
                final Image image = ImageFactory.createImage(encodedImage);

                // Create an application descriptor for this application
                final ApplicationDescriptor applicationDescriptor =
                        new ApplicationDescriptor(ApplicationDescriptor
                                .currentApplicationDescriptor(),
View Full Code Here

        _searchableProvider.setSupportedSearchFields(searchFields);

        final Bitmap bitmap = Bitmap.getBitmapResource("default.png");

        if (bitmap != null) {
            final Image img = ImageFactory.createImage(bitmap);
            _searchableProvider.setIcon(img);
        }

        _searchableProvider.setName("Unified Search Demo");
View Full Code Here

            // Set icon for GCM menu
            final EncodedImage eiReply =
                    EncodedImage.getEncodedImageResource("img/sm_reply.png");
            if (eiReply != null) {
                final Image image = ImageFactory.createImage(eiReply);
                this.setIcon(image);
            }
        }
View Full Code Here

            // Set icon for GCM menu
            final EncodedImage eiMarkOpened =
                    EncodedImage
                            .getEncodedImageResource("img/sm_mark_opened.png");
            if (eiMarkOpened != null) {
                final Image image = ImageFactory.createImage(eiMarkOpened);
                this.setIcon(image);
            }
        }
View Full Code Here

            // Set icon for GCM menu
            final EncodedImage eiMarkUnOpened =
                    EncodedImage
                            .getEncodedImageResource("img/sm_mark_unopened.png");
            if (eiMarkUnOpened != null) {
                final Image image = ImageFactory.createImage(eiMarkUnOpened);
                this.setIcon(image);
            }
        }
View Full Code Here

            // Set icon for GCM menu
            final EncodedImage eiOpen =
                    EncodedImage.getEncodedImageResource("img/sm_open.png");
            if (eiOpen != null) {
                final Image image = ImageFactory.createImage(eiOpen);
                this.setIcon(image);
            }
        }
View Full Code Here

                        NWMDemo.errorDialog(e.toString());
                    }
                }
            }));

            final Image pauseImage =
                    ImageFactory.createImage(Bitmap
                            .getBitmapResource("pause.png"));
            pauseButton.setImage(pauseImage);
            componentCanvas.add(pauseButton, 0, VIDEO_HEIGHT - 15);

            // Button to start/re-start the video
            final ButtonField playButton =
                    new ButtonField("Play", ButtonField.CONSUME_CLICK
                            | ButtonField.NEVER_DIRTY);
            playButton.setCommand(new Command(new CommandHandler() {
                public void execute(final ReadOnlyCommandMetadata metadata,
                        final Object object) {
                    // Start the video
                    try {
                        _player.start();
                    } catch (final Exception e) {
                        NWMDemo.errorDialog(e.toString());
                    }
                }
            }));

            final Image playImage =
                    ImageFactory.createImage(Bitmap
                            .getBitmapResource("play.png"));
            playButton.setImage(playImage);
            componentCanvas
                    .add(playButton, VIDEO_WIDTH - 80, VIDEO_HEIGHT - 15);
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.image.Image

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.