Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Image


     */
    public int[] getRGBIntImageData(Object image) {
        if (!(image instanceof Image))
            return null;
       
        Image img = (Image)image;
       
        int w = img.getWidth();
        int h = img.getHeight();
        int[] data = new int[w * h];
       
        img.getRGB(data, 0, w, 0, 0, w, h);
        return data;
    }
View Full Code Here


     */
    public Object imageCreateFromImage(Object image) {
        if (!(image instanceof Image))
            return null;
       
        Image img = (Image)image;
       
        return Image.createImage(img);
    }
View Full Code Here

     */
    public Object imageCreateFromStream(java.io.InputStream stream) {
        if (stream == null)
            return null;
       
  Image image = null;
        try {
            image = Image.createImage(stream);
        } catch (java.io.IOException ioe) {
            return null;
        }
View Full Code Here

     * @throws IOException
     * @throws RecordStoreException
     */
    public void addItemToMailBox(textConvo crnt, int index) throws IOException, RecordStoreException
    {
        Image icon;
        StringBuffer itemBuff = new StringBuffer();
        itemBuff = new StringBuffer(crnt.getSender());
        itemBuff.append(": ");
        itemBuff.append(crnt.getLastMsg().getMessage());
        if(itemBuff.length() > itemLength)
View Full Code Here

     * @throws IOException
     * @throws RecordStoreException
     */
    public void addItemToMailBox(textConvo crnt, int index) throws IOException, RecordStoreException
    {
        Image icon;
        StringBuffer itemBuff = new StringBuffer();
        itemBuff = new StringBuffer(crnt.getSender());
        itemBuff.append(": ");
        itemBuff.append(crnt.getLastMsg().getMessage());
        if(itemBuff.length() > itemLength)
View Full Code Here

    Form aForm   = new Form(sTitle);
    int  nLayout = ImageItem.LAYOUT_CENTER | ImageItem.LAYOUT_NEWLINE_AFTER;

    if (rImage != null)
    {
      Image rImg;

      if (rImage instanceof Image)
      {
        rImg = (Image) rImage;
      }
View Full Code Here

   *
   * @return The Image for the node or NULL if no Image shall be displayed
   */
  protected Image getNodeImage(String sNodeType)
  {
    Image rImage = (Image) aNodeImages.get(sNodeType);

    if (rImage == null)
    {
      // if the image is not cached already get it from the resource (by
      // appending "I" to the node type key) and store it in the HashTable
View Full Code Here

        width_ = image_.getWidth() / (NUMBER_OF_CHARACTERS - FIRST_CHARACTER);
    }

    private Image load( final String filename )
    {
        Image image;
        try
        {
            image = Image.createImage( filename );
        }
        catch( Exception e )
        {
            throw new IllegalArgumentException( "cannot load font file '" + filename + "': " + e );
        }
        if( image.getHeight() <= 0 || image.getWidth() <= 0 )
            throw new RuntimeException( "bitmap font has null size" );
        return image;
    }
View Full Code Here

                }
            }

            final int anchor = Graphics.TOP | Graphics.LEFT;

            final Image imageC = currentPageCanvas.getImage();
            final Image imageP = prevPageCanvas.getImage();
            final Image imageN = nextPageCanvas.getImage();

            final int imageWidth = imageC.getWidth();
            final int imageHeight = imageC.getHeight();

            int x = 0;
View Full Code Here

    public final void renderPage(final ColorScheme cp) {

        final int color_bg = cp.colors[ColorScheme.COLOR_BACKGROUND];

        final Image img = (BUFFER == null ? canvas : BUFFER);

        final Graphics g = img.getGraphics();
        final int w = img.getWidth();
        final int h = img.getHeight();

        g.setColor(color_bg);
        g.fillRect(0, 0, w, h);

        //#debug
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.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.