⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputmethodclient.java

📁 有关j2me的很好的例子可以研究一下
💻 JAVA
字号:
/* * @(#)InputMethodClient.java	1.11 01/08/12 * * Copyright (c) 2000-2001 Sun Microsystems, Inc., 901 San Antonio Road, * Palo Alto, CA 94303, U.S.A.  All Rights Reserved. * * Sun Microsystems, Inc. has intellectual property rights relating * to the technology embodied in this software.  In particular, and * without limitation, these intellectual property rights may include * one or more U.S. patents, foreign patents, or pending * applications.  Sun, Sun Microsystems, the Sun logo, Java, KJava, * and all Sun-based and Java-based marks are trademarks or * registered trademarks of Sun Microsystems, Inc.  in the United * States and other countries. * * This software is distributed under licenses restricting its use, * copying, distribution, and decompilation.  No part of this * software may be reproduced in any form by any means without prior * written authorization of Sun and its licensors, if any. * * FEDERAL ACQUISITIONS:  Commercial Software -- Government Users * Subject to Standard License Terms and Conditions */package com.sun.midp.lcdui;import javax.microedition.lcdui.Display;import javax.microedition.lcdui.Font;/** * A public interface for the InputMethod client. */public interface InputMethodClient {    /**     * Get the display of the InputMethod client.     *     * @return Display The display of the InputMethod client     */    Display getDisplay();    /**     * Get the size of the current text buffer.     *     * @return int The size of the current text buffer     */     int getSize();    /**     * Get the maximum size of the text buffer that the InputMethod     * has to support.     *     * @return int The maximum size of the text buffer     */    int getMaxSize();    /**     * Get the input constraints of the InputMethod client.     *     * @return int The input constraints of the InputMethod client     */    int getConstraints();    /**     * Set the contents of the InputMethod to its client.     *     * @param data The characters to set in the buffer     * @param offset The offset into the character array     * @param length The number of characters to set out of the array     * @see #getChars     */    void setChars(char[] data, int offset, int length);    /**     * Get the contents of the InputMethod client.     *     * @param data An array to copy the buffer contents into     * @return int The number of characters put into the char array     *     * @see #setChars     */    int getChars(char[] data);    /**     * Make the caret visible.     *     * @param t A flag indicating the visibility of the caret     */    void setCaretVisible(boolean t);    /**     * Set the caret position.     *     * @param pos The position to set the caret to     *     * @see #getCaretPosition     */    void setCaretPosition(int pos);    /**     * Get the caret position.     *     * @return int The current position of the caret     *     * @see #setCaretPosition     */    int getCaretPosition();    /**     * Replace the text buffer of the InputMethod client.     *     * @param data The characters to replace the buffer with     * @param offset The offset into the character array     * @param length The number of characters to replace     * @param start The start index of the text buffer     * @param end The end index of the text buffer     */    void replace(char[] data, int offset, int length, int start, int end);    /**     * Insert the text buffer to the InputMethod client.     *     * @param data The characters to insert     * @param offset The offset into the character array     * @param length The number of characters to insert     * @param pos The position to start the insertion into the buffer     */    void insert(char[] data, int offset, int length, int pos);    /**     * Call the repaint method of the InputMethod client display.     */    void repaint();    /**     * Call the repaint method of the InputMethod client content.     */    void repaintContent();    /**     * Get the text's font of the InputMethod client.     *     * @return Font The Font for this client     */    Font getFont();    /**     * Get the title of the InputMethod client.     *     * @return String The title of this client     */    String getTitle();    /**     * Get the location of the InputMethod client i.e. TextBox.  The     * location will be stored into the array of integers with     * rectangle coordinates.     * rectangle[0] - x     * rectangle[1] - y     * rectangle[2] - width     * rectangle[3] - height     *     * @param rectangle An array holding the x, y, width, height of the     *                      bounding box     */    void getLocation(int rectangle[]);    /**     * Set the input mode.     *     * @param mode The input mode to set     */    void setInputMode(int mode);    /**     * Get the client object.     *     * @return Object The client object     */    Object getClientObject();}

⌨️ 快捷键说明

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