J2ME中文教程 3 MIDP高级UI 的使用[28]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

        }

 

        for (int i = 0; i <= cols; i++) {

            g.drawLine(i * dx, 0, i * dx, rows * dy);

        }

 

        int oldColor = g.getColor();

        g.setColor(0x00D0D0D0);

        g.fillRect((currentX * dx) + 1, (currentY * dy) + 1, dx - 1, dy - 1);

        g.setColor(oldColor);

 

        for (int i = 0; i < rows; i++) {

 

            for (int j = 0; j < cols; j++) {

 

                if (data[i][j] != null) {

 

                    // store clipping properties

                    int oldClipX = g.getClipX();

                    int oldClipY = g.getClipY();

                    int oldClipWidth = g.getClipWidth();

                    int oldClipHeight = g.getClipHeight();

                    g.setClip((j * dx) + 1, i * dy, dx - 1, dy - 1);

                    g.drawString(data[i][j], (j * dx) + 2, ((i + 1) * dy) - 2,

                                 Graphics.BOTTOM | Graphics.LEFT);

 

本文关键:J2ME中文教程 3 MIDP高级UI 的使用
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top