layout.java

来自「有关j2me的很好的例子可以研究一下」· Java 代码 · 共 69 行

JAVA
69
字号
/* * @(#)Layout.java	1.4 01/07/12 * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved. * * This software is the confidential and proprietary information of Sun * Microsystems, Inc. ("Confidential Information").  You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Sun. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING * THIS SOFTWARE OR ITS DERIVATIVES. */package javax.microedition.lcdui;/** * A Layout is a special class used to layout certain * types of screen components */interface Layout {    /**     * Get the width of this Layout     *     * @return int The pixel width of this Layout     */    int getWidth();    /**     * Set the width of this Layout     *     * @param w The maximum allowable width for this Layout     * @return int The height required to display this Layout     *              given the maximum allowable width     */    int setWidth(int w); // sets height    /**     * Get the height of this Layout     *     * @return int The pixel height of this Layout     */    int getHeight();    /**     * Set the maximum allowable height for this Layout     *     * @param h The maximum height for this Layout     */    void setMaxHeight(int h);    /**     * Get the line height for this Layout     *     * @return int The line height in pixels for this Layout     */    int getLineHeight();    /**     * Paint this Layout     *     * @param g The Graphics context to paint to     * @param eraseBgrnd A boolean flag to erase the background prior to     *                      painting     * @param inverted A boolean flag to paint the Layout in an inverted     *                  color scheme     */    void paint(Graphics g, boolean eraseBgrnd, boolean inverted);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?