Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Graphics.fillRect()


    //#endif
    Graphics g = offscreen.getGraphics();
    // Draw background
    g.setColor(background);
    if (aBody) {
      g.fillRect(0, 0, width, height);
    }
    // Draw text
    g.setColor(foreground);
    drawText(g);
    if (aBody) {
View Full Code Here


      g.setColor(foreground);
      g.drawRect(0, 0, width - 1, height - 1);
      if (aScrollBar) {
        // Draw scroll
        g.setColor(background);
        g.fillRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        g.setColor(foreground);
        g.drawRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        int scroll = getScrollPosition(height, scrollHeight);
        g.fillRect(width - scrollWidth, scroll,
            scrollWidth - 1, scrollHeight - 1);
View Full Code Here

        g.setColor(background);
        g.fillRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        g.setColor(foreground);
        g.drawRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        int scroll = getScrollPosition(height, scrollHeight);
        g.fillRect(width - scrollWidth, scroll,
            scrollWidth - 1, scrollHeight - 1);
      }
    }
    // Draw offscreen
    aGraphic.drawImage(offscreen, aX, aY, Graphics.LEFT | Graphics.TOP);
View Full Code Here

    //#endif
    Graphics g = offscreen.getGraphics();
    // Draw background
    g.setColor(background);
    if (aBody) {
      g.fillRect(0, 0, width, height);
    }
    // Draw text
    g.setColor(foreground);
    drawText(g);
    if (aBody) {
View Full Code Here

      g.setColor(foreground);
      g.drawRect(0, 0, width - 1, height - 1);
      if (aScrollBar) {
        // Draw scroll
        g.setColor(background);
        g.fillRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        g.setColor(foreground);
        g.drawRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        int scroll = getScrollPosition(height, scrollHeight);
        g.fillRect(width - scrollWidth, scroll,
            scrollWidth - 1, scrollHeight - 1);
View Full Code Here

        g.setColor(background);
        g.fillRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        g.setColor(foreground);
        g.drawRect(width - scrollWidth, 0, scrollWidth - 1, height - 1);
        int scroll = getScrollPosition(height, scrollHeight);
        g.fillRect(width - scrollWidth, scroll,
            scrollWidth - 1, scrollHeight - 1);
      }
    }
    // Draw offscreen
    aGraphic.drawImage(offscreen, aX, aY, Graphics.LEFT | Graphics.TOP);
View Full Code Here

                {
                    buffer = Image.createImage( getWidth(), height );
                    g = buffer.getGraphics();
                }
                g.setColor( background );
                g.fillRect( 0, 0, getWidth(), height );
//                g.setColor( 0x85B0C6 );
//                g.fillRect( 0, 0, getWidth(), height );
//                g.setColor( background );
//                g.fillArc( 0, 0, getWidth(), height, 45, -45 );
                g.setFont( font );
View Full Code Here

      {
        e.printStackTrace();
        // no tile available, draw default color (black)
        Graphics g = frontLayer.getGraphics();
        g.setColor(0x00000000);
        g.fillRect(0, 0, getWidth(), getHeight());
      }
    }
   
    // prepare the tiled back  layer.
    if (backLayer == null)
View Full Code Here

      {
        e.printStackTrace();
        // no tile available, draw default color (black)
        Graphics g = backLayer.getGraphics();
        g.setColor(0x00000000);
        g.fillRect(0, 0, getWidth(), getHeight());
      }
    }

    if (worldLayer == null)
    { // initialize world
View Full Code Here

            final int width = font.stringWidth( button.text ) + 2;
            final int height = font.getHeight() + 2;
            button.image = Image.createImage( width, height );
            final Graphics g = button.image.getGraphics();
            g.setColor( 0xD0D0D0 );
            g.fillRect( 0, 0, width, height );
            g.setColor( color );
            g.drawString(
                    button.text,
                    1,
                    1 + font.getBaselinePosition(),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.