J2ME中文API
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
J2ME中文API
Alert 列表; AlertType rithmeticException ArrayIndexOutOfBoundsException ArrayStoreException
Boolean
Byte
ByteArrayInputStream ByteArrayOutputStream Calendar
Canvas 画布; Certificate CertificateException
Character
Choice
ChoiceGroup
Class
ClassCastException ClassNotFoundException CommConnection
Command
CommandListener
Connection ConnectionNotFoundException Connector ContentConnection
Control
Controllable
CustomItem
DataInput
DataInputStream DataOutput DataOutputStream Datagram DatagramConnection
Date
DateField
Display
Displayable
Double
EOFException EmptyStackException Enumeration
Error
Exception
Float
Font
Form 文本;GameCanvas
Gauge
Graphics 虚拟画笔;Hashtable HttpConnection HttpsConnection IOException IllegalAccessException IllegalArgumentException IllegalMonitorStateException IllegalStateException IllegalThreadStateException
Image
ImageItem IndexOutOfBoundsException InputConnection InputStream InputStreamReader InstantiationException Integer InterruptedException InterruptedIOException InvalidRecordIDException Item ItemCommandListener ItemStateListener
Layer
LayerManager
List 绘制复选框; Long MIDlet MIDletStateChangeException Manager
Math
MediaException NegativeArraySizeException NoClassDefFoundError NoSuchElementException NullPointerException NumberFormatException OutOfMemoryError OutputConnection OutputStream
OutputStreamWriter
Player
PlayerListener
PrintStream
PushRegistry
Random
Reader RecordComparator RecordEnumeration RecordFilter RecordListener RecordStore RecordStoreException RecordStoreFullException RecordStoreNotFoundException RecordStoreNotOpenException Runnable
Runtime RuntimeException
Screen
SecureConnection SecurityException SecurityInfo ServerSocketConnection Short
SocketConnection
Spacer
Sprite
Stack
StreamConnection
StreamConnectionNotifier
String
StringBuffer StringIndexOutOfBoundsException StringItem
System
TextBox 绘制单选按钮; TextField Thread
Throwable
TiledLayer
TimeZone
Timer
TimerTask
ToneControl UDPDatagramConnection UTFDataFormatException UnsupportedEncodingException Vector
VirtualMachineError VolumeControl
Writer
Class Canvas javax.microedition.lcdui Field Summary
static int DOWN
static int FIRE
static int GAME_A
static int GAME_B
static int GAME_C
static int GAME_D
static int KEY_NUM0
static int KEY_NUM1
static int KEY_NUM2
static int KEY_NUM3
static int KEY_NUM4
static int KEY_NUM5
static int KEY_NUM6
static int KEY_NUM7
static int KEY_NUM8
static int KEY_NUM9
static int KEY_POUND
keyCode for ITU-T key "pound" (#).
static int KEY_STAR
keyCode for ITU-T key "star" (*).
static int LEFT
Constant for the LEFT game action.
static int RIGHT
Constant for the RIGHT game action.
static int UP
Constant for the UP game action.
Constructor Summary
protected Canvas()
Constructs a new Canvas object.
Method Summary
int getGameAction(int keyCode) 返回按键编码值对应用的游戏操作;
int getKeyCode(int gameAction) 返回游戏操作常量的案件编码值;
String getKeyName(int keyCode) 返回按键编码值对应的按键的名称,这个名称不是游戏操作的名称,而是实际按键的名称;
boolean hasPointerEvents() 响应指针拖动事件;
boolean hasPointerMotionEvents() 判断设备是否探测指针设备的按下,拖动和释放行为;
boolean hasRepeatEvents() 判断设备是否支持重复按键;
protected void hideNotify() 在应用程序管理器从屏幕删除画布后调用;
boolean isDoubleBuffered() 判断设备是否支持双缓冲器;
protected void keyPressed(int keyCode) 当按下按键时调用,通常处理按键的案件编码;
protected void keyReleased(int keyCode) 当释放按键时调用,通常处理按键的案件编码;
protected void keyRepeated(int keyCode) 当持续按下按键时调用,通常处理案件的按键编码;
(不是所有设备都支持)
protected
paint(Graphics g) 把Graphics类的实例作为参数,在画布上绘制一幅图像;
abstract void
protected void pointerDragged(int x, int y) 响应指针拖动事件;
protected void pointerPressed(int x, int y) 响应指针按下事件;
protected void pointerReleased(int x, int y) 响应指针释放事件;
void repaint() 重新绘制整个画布;
void repaint(int x, int y, int width, int height) 重新绘制画布的指定区域;
void serviceRepaints() 在其他优先需求之前必须处理的画笔需求;
void setFullScreenMode(boolean mode)
Controls whether the Canvas is in full-screen mode or in normal mode.
protected void showNotify() 在应用程序管理显示画布之前调用;
protected void sizeChanged(int w, int h)
Called when the drawable area of the Canvas has been
changed.
Class Screen javax.microedition.lcdui
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class Displayable javax.microedition.lcdui
Method Summary
void addCommand(Command cmd)
Adds a command to the Displayable.
int getHeight()
Gets the height in pixels of the displayable area
available to the application.
Ticker getTicker(): 获得屏幕标题;
String getTitle() :获得屏幕的滚动牌;
int getWidth()
Gets the width in pixels of the displayable area
available to the application.
boolean isShown()
Checks if the Displayable is actually visible on the
display.
void removeCommand(Command cmd)
Removes a command from the Displayable.
void setCommandListener(CommandListener l)
Sets a listener for Commands to this Displayable,
replacing any previous CommandListener.
void setTicker(Ticker ticker):设定屏幕的滚动牌;
void setTitle(String s):设定屏幕的标题;
protected void sizeChanged(int w, int h)
The implementation calls this method when the
available area of the Displayable has been changed. Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Class Alert javax.microedition.lcdui
Field Summary
static Command DISMISS_COMMAND
A Command delivered to a listener to indicate that the Alert
has been dismissed.
static int FOREVER
FOREVER indicates that an Alert is kept visible until the
user dismisses it.
Constructor Summary
Alert(String title) 创建Alert类的实例;
Alert(String title, String alertText, Image alertImage, AlertType alertType)
使用Image和AlertType创建Alert类的实例;
Method Summary
void addCommand(Command cmd)
Similar to
Displayable.addCommand(/doc/e321 93809.html,mand), however
when the application first adds a command to an Alert, DISMISS_COMMAND
is implicitly removed.
int getDefaultTimeout() 获得Alert类的实例的默认超时;
Image getImage() 获得Alert类的实例的图像;
Gauge getIndicator()
Gets the activity indicator for this Alert.
String getString() 获得Alert类的实例的消息;
int getTimeout() 获得Alcrt类的实例要显示的实际时间;
AlertType getType() 获得Alecrt类的实例的AlertTypc;
void removeCommand(Command cmd)
Displayable.removeCommand(/doc/e 32193809.html,mand), however
when the application removes the last command from an Alert,
DISMISS_COMMAND is implicitly added.
void setCommandListener(CommandListener l)
Displayable.setCommandListener(/do c/e32193809.html,mandListe
ner) but with the following additional semantics.
void setImage(Image img) 把指定图像和Alert类的实力建立关联;
void setIndicator(Gauge indicator)
Sets an activity indicator on this Alert.
void setString(String str) 设定Alert类的实力的消息;
void setTimeout(int time) 设定Alert类的实例的显示时间;
void setType(AlertType type) 设定Alert类的实例AlertType;
Methods inherited from class javax.microedition.lcdui.Displayable
getHeight, getTicker, getTitle, getWidth, isShown, setTicker, setTitle, sizeChanged Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait Class Form javax.microedition.lcdui
Constructor Summary
Form(String title) 创建Form类的实例;
Form(String title, Item[] items) 创建Form类的实例,并且把它指定的项数组加到实例上
Method Summary
int append(Image img) 把Image类的实例添加到Form类的实例;
int append(Item item) 把Item类或其子类的实例添加到Form 类的实例;
int append(String str) 把String类的实例添加到Form类的实例;
void delete(int itemNum) 根据索引从Form类的实例中删除指定Item类或其子类的实例
void deleteAll()
Item get(int itemNum) 获得索引指定的位置处的Item类或其子类的的实例;
int getHeight()
int getWidth()
void insert(int itemNum, Item item) 在索引指定的位置处插入Item类或子类的实例
void set(int itemNum, Item item) 在索引指定的位置使用第二个参数引用的Item类或其子类的实例;
void setItemStateListener(ItemStateListener iListener) 将ItemStateListener和Item类或其子类的实例建立关联;
int size() 获得Form类的实例中的Item类及子类的实例数目;
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class ChoiceGroup javax.microedition.lcdui
Field Summary
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Fields inherited from interface javax.microedition.lcdui.Choice
EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF,
TEXT_WRAP_ON
Constructor Summary
ChoiceGroup(String label, int choiceType) 创建一个空的ChoiceGroup类的实例,实例的标题是label,
实例的类型是choiceType;
ChoiceGroup(String label, int choiceType, String[] stringElements, Image[] imageElements) 创建ChoiceGroup类的实例,实例的标题是label,实例的类型是choiceType,实例使用图像,并且使用string中包含的选项组成这个实例;
Method Summary
int append(String stringPart, Image imagePart) 在choiceType 类的实例中的所有选项末尾增加选项,并且设定这个选项关联的图像;
void delete(int elementNum) 根据索引数,从ChoiceGroup类的实例中删除相应的选项及其相关联的图像;
void deleteAll()
Deletes all elements from this ChoiceGroup.
int getFitPolicy()
Gets the application's preferred policy for fitting Choice element
contents to the available screen space.
Font getFont(int elementNum)
Gets the application's preferred font for rendering the specified element
of this Choice.
Image getImage(int elementNum) 获得索引数标记的选项关联的图像;
int getSelectedFlags(boolean[] selectedArray_return) 获得选项的选择状态,并把状态存储在一个数组selectedArray_return中;
int getSelectedIndex() 获得被选择的选项关联的索引数;
String getString(int elementNum) 获得索引数标记的选项关联的字符串;
void insert(int elementNum, String stringPart, Image imagePart) 在索引数标记的选项前,插入一个又string和image指定的选项到ChoiceGroup类的实例中;
boolean isSelected(int elementNum)判断用户是否选择了索引数标识的选项;
void set(int elementNum, String stringPart, Image imagePart) 使用string和image指定的选项替代索引数标记的选项;
void setFitPolicy(int fitPolicy)
Sets the application's preferred policy for fitting Choice element
contents to the available screen space.
void setFont(int elementNum, Font font)
Sets the application's preferred font for rendering the
specified element
of this Choice.
void setSelectedFlags(boolean[] selectedArray) 使用数组中存储的状态设定选项的选择状态;
void setSelectedIndex(int elementNum, boolean selected) 设定索引鼠标及的选项的选择
状态,或者被选择(true),或者不被选择(false);
int size() 获得ChoiceGroup类的实例中选项的数目;
Methods inherited from class javax.microedition.lcdui.Item addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout, setPreferredSize Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class DateField javax.microedition.lcdui
Field Summary
static int DATE
Input mode for date information (day, month, year).
static int DATE_TIME
Input mode for date (day, month, year) and time (minutes, hours) information.
static int TIME
Input mode for time information (hours and minutes).
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK,
LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Constructor Summary
DateField(String label, int mode) 创建包含指定标签、使用特定模式的DateField类的实例;
DateField(String label, int mode, TimeZone timeZone) 创建包含指定标签、使用特定模式和时区的DateFild类的实例;
Method Summary
Date getDate() 从DateField类的实例中获得日期/时间;
int getInputMode() 获得DateField类的实例的收入模式;
void setDate(Date date) 从DateField类的实例设定日期;
void setInputMode(int mode) 使用一个不同的模式替换已有的日期域的模式;
Methods inherited from class javax.microedition.lcdui.Item addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout, setPreferredSize Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class Gauge javax.microedition.lcdui
Field Summary
static int CONTINUOUS_IDLE
The value representing the continuous-idle state of a non-interactive
Gauge with indefinite range.
static int CONTINUOUS_RUNNING
The value representing the continuous-running state of a
non-interactive Gauge with indefinite range.
static int INCREMENTAL_IDLE
The value representing the incremental-idle state of a non-interactive
Gauge with indefinite range.
static int INCREMENTAL_UPDATING
The value representing the incremental-updating state of a non-interactive Gauge with indefinite range.
static int INDEFINITE
A special value used for the maximum value in order to indicate that
the Gauge has indefinite range.
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Constructor Summary
Gauge(String label, boolean interactive, int maxValue, int initialValue)
Creates a new Gauge object with the given label, in interactive or
non-interactive mode, with the given maximum and initial values.
Method Summary
void addCommand(Command cmd)
Adds a context sensitive Command to the item.
int getMaxValue() 获得guage的最大值;
int getValue() 获得gauge的当前值;
boolean isInteractive() 判断guage是否是交互式的;
void setDefaultCommand(Command cmd)
Sets default Command for this Item.
void setItemCommandListener(ItemCommandListener l)
Sets a listener for Commands to this Item, replacing any previous
ItemCommandListener.
void setLabel(String label)
Sets the label of the Item.
void setLayout(int layout)
Sets the layout directives for this item.
void setMaxValue(int maxValue) 设定guage的最大值;
void setPreferredSize(int width, int height)
Sets the preferred width and height for this Item.
void setValue(int value) 为gauge设定一个新值;
Methods inherited from class javax.microedition.lcdui.Item getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class StringItem javax.microedition.lcdui
Field Summary
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE,
LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP,
LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Constructor Summary
StringItem(String label, String text) 创建StringItem类的实例,其中,lable是一个说明StringItem 类的标签,text是在屏幕上显示的文本;
StringItem(String label, String text, int appearanceMode)
Creates a new StringItem object with the given label, textual content, and appearance mode. Method Summary
int getAppearanceMode()
Font getFont()
String getText() 获得StringItem类的实例的文本部分;
void setFont(Font font)
Sets the application's preferred font for rendering this StringItem.
void setPreferredSize(int width, int height)
Sets the preferred width and height for this Item.
void setText(String text) 替换StringItem类的实例的文本部分;
Methods inherited from class javax.microedition.lcdui.Item addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class TextField javax.microedition.lcdui
Field Summary
static int ANY
The user is allowed to enter any text.
static int CONSTRAINT_MASK
The mask value for determining the constraint mode.
static int DECIMAL
The user is allowed to enter numeric values with optional decimal
fractions, for example "-123", "0.123", or ".5".
static int EMAILADDR
The user is allowed to enter an e-mail address.
static int INITIAL_CAPS_SENTENCE
This flag is a hint to the implementation that during text editing,
the initial letter of each sentence should be capitalized.
static int INITIAL_CAPS_WORD
This flag is a hint to the implementation that during text editing,
the initial letter of each word should be capitalized.
static int NON_PREDICTIVE
Indicates that the text entered does not consist of words that are
likely to be found in dictionaries typically used by predictive input schemes.
static int NUMERIC
The user is allowed to enter only an integer value.
static int PASSWORD
Indicates that the text entered is confidential data that should be
obscured whenever possible.
static int PHONENUMBER
The user is allowed to enter a phone number.
static int SENSITIVE
Indicates that the text entered is sensitive data that the
implementation must never store into a dictionary or table for use in predictive,
auto-completing, or other accelerated input schemes.
static int UNEDITABLE
Indicates that editing is currently disallowed.
static int URL
The user is allowed to enter a URL.
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Constructor Summary
TextField(String label, String text, int maxSize, int constraints) 创建TextField类的实例 Method Summary
void delete(int offset, int length) 在TextField类中指定的位置删除指定长度的字符;
int getCaretPosition() 获得TextField类的约束条件;
int getChars(char[] data) 将Textfield类的内容复制到一个字符数组中;
int getConstraints() 获得TextField类中的指针位置;
int getMaxSize() 获得TextField内的最大字符数;
String getString() 将TextField类的内容复制到一个字符串中;
void insert(char[] data, int offset, int length, int position) 在TextField类中指定位置从字符数组中插入指定长度字符;
void insert(String src, int position) 在TextField类中指定的位置插入字符串;
void setChars(char[] data, int offset, int length) 使用字符数组中从指定位置开始的指定长度的字符替换TextField类的字符;
void setConstraints(int constraints) 设定TextField类的约束条件;
void setInitialInputMode(String characterSubset)
Sets a hint to the implementation as to the input mode that should be used
when the user initiates editing of this TextField.
int setMaxSize(int maxSize) 设定T extField类的最大字符数;
void setString(String text) 使用字符串中的字符替换TextFiekt类的字符;
int size() 获得TextField类中的字符数目;
Methods inherited from class javax.microedition.lcdui.Item addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout, setPreferredSize Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class Image javax.microedition.lcdui
Method Summary
static Image createImage(byte[] imageData, int imageOffset, int imageLength) 创建静态图像,其中imageeData为一个表示图像的数据的数组,imageOffset是图像数据在数组
中的开始位置,imagelength是图像数据的长度;
static Image createImage(Image source) 创建静态图像,其中source为一个已经存在的图像的引用;
static Image createImage(Image image, int x, int y, int width, int height, int transform) Creates an immutable image using pixel
data from the specified
region of a source image, transformed as specified.
static Image createImage(InputStream stream)
Creates an immutable image from decoded image data obtained from
an InputStream.
static Image createImage(int width, int height) 创建指定宽度和高度的静态图像;
static Image createImage(String name) 创建静态图像,其中name为资源的名字;
static Image createRGBImage(int[] rgb, int width, int height, boolean processAlpha)
Creates an immutable image from a sequence of ARGB values, specified
as 0xAARRGGBB.
Graphics getGraphics() 获得Graphics类的实例的应用;
int getHeight() 获得图像的高度;
void getRGB(int[] rgbData, int offset, int scanlength, int x, int y, int width, int height)
Obtains ARGB pixel data from the specified region of this image and
stores it in the provided array of integers.
int getWidth() 获得图像的宽度;
boolean isMutable() 判断图像是否是一副可变图像;
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class ImageItem javax.microedition.lcdui
Field Summary
static int LAYOUT_CENTER
See
/doc/e32193809.html,YOUT_CENTER.
static int LAYOUT_DEFAULT
See
/doc/e32193809.html,YOUT_DEFAULT.
static int LAYOUT_LEFT
See /doc/e32193809.html,YOUT_LEFT.
static int LAYOUT_NEWLINE_AFTER
See
/doc/e32193809.html,YOUT_NEWLINE_AF TER.
static int LAYOUT_NEWLINE_BEFORE
See
/doc/e32193809.html,YOUT_NEWLINE_BE FORE.
static int LAYOUT_RIGHT
See
/doc/e32193809.html,YOUT_RIGHT.
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_EXPAND, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
Constructor Summary
ImageItem(String label, Image img, int layout, String altText) 创建ImageItem类的实例,其中,label 为描述图像的文本,img是图像的引用,layout是布局方案,altText是不能在设备上显示图像时显示的文本;
ImageItem(String label, Image image, int layout, String altText, int appearanceMode)
Creates a new ImageItem object with the given label, image, layout directive, alternate text string, and appearance mode.
Method Summary
String getAltText() 获得ImageItem的实例的替代文本;
int getAppearanceMode()
Returns the appearance mode of the ImageItem.
Image getImage() 获得ImageItem类的实例相关联的图像;
int getLayout() 获得ImageItem类的实例的布局方案;
void setAltText(String text) 替换ImageItem的实例的替代文本;
void setImage(Image img) 将图像和ImageItem类的实例建议关联;
void setLayout(int layout) 替换ImageItem类实例的布局方案;
Methods inherited from class javax.microedition.lcdui.Item
addCommand, getLabel, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setPreferredSize
Methods inherited from class /doc/e32193809.html,ng.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Class List javax.microedition.lcdui
Field Summary
static Command SELECT_COMMAND
The default select command for IMPLICIT Lists. Fields inherited from interface javax.microedition.lcdui.Choice EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF,
TEXT_WRAP_ON
Constructor Summary
List(String title, int listType) 创建一个List类的实例,不为这个
列表指定元素,title是列表的标题,listYType是列表的类型;
List(String title, int listType, String[] stringElements, Image[] imageElements) 船舰一个List类的实例,并且为列表指定元素,title 是列表的标题,listType是列表的类型,stringElements是列表中包含的文字的字符串数组,imageElements是和每个列表项关联的图像的数组;
Method Summary
int append(String stringPart, Image imagePart) 在列表的末尾添加表项,其中,
stringPart是表项的文本,imagePart是和表项相关联的图像;
void delete(int elementNum) 从列表中删除elementNum表示的表项;
void deleteAll()
Deletes all elements from this List.
int getFitPolicy()
Gets the application's preferred policy for fitting Choice element
contents to the available screen space.
Font getFont(int elementNum)
Gets the application's preferred font for rendering the specified element
of this Choice.
Image getImage(int elementNum) 获得列表中的indexNum表示的特定位置处的表项相关联的图像;
int getSelectedFlags(boolean[] selectedArray_return) 获得列表项背选择的状态,并把它们存放到selectedArray中;
int getSelectedIndex() 获得列表中被喜欢则的表项的素引数;
String getString(int elementNum) 获得列表中的elementNum 表示的特定位置处的表项相关联的文本;
void insert(int elementNum, String stringPart, Image
imagePart) 在列表中指定的位置插入表项,其中elementNum是表示要插入到列表的位置,stringPart是表项的文本,
imagePart是和表项项关联的图像;
boolean isSelected(int elementNum) 判断elementNum标记的表项是否被选择;
void removeCommand(Command cmd)
The same as Displayable.removeCommand but with the following additional。