Displayable类说明文档

Displayable类作为MIDP1.0的一部分,定义了能够在屏幕上显示的对象的基础行为。此类可包含标题、滚动条及命令监听器,并由其子类具体实现显示内容及用户交互。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

public abstract class Displayable
extends Object
 
能够被显示在display上的对象。一个Displayable对象可以包含一个标题,一个滚动条,零个或多个和命令监听器相联的命令。被显示的部件和与用户的交互行为由该类的子类定义。
 
标题栏可以包含换行符。标题的显示也要相应的换行。比如,如果只有一行可以用来显示标题并且标题字符串包含一个换行符,那么只有在换行符前面的字符会被显示出来。
 
除了子类有特殊定义,新创建的Displayable对象状态如下:
 
对象在屏幕上不可见;
对象没有相关联的滚动条;
对象的标题为空;
对象不含命令以及相关联的命令监听器

javax.microedition.lcdui
Class Displayable

java.lang.Object
  extended byjavax.microedition.lcdui.Displayable
Direct Known Subclasses:
Canvas, Screen

public abstract class Displayable extends Object

An object that has the capability of being placed on the display. A Displayable object may have a title, a ticker, zero or more commands and a listener associated with it. The contents displayed and their interaction with the user are defined by subclasses.

The title string may contain line breaks. The display of the title string must break accordingly. For example, if only a single line is available for a title and the string contains a line break then only the characters up to the line break are displayed.

Unless otherwise specified by a subclass, the default state of newly created Displayable objects is as follows:

  • it is not visible on the Display;
  • there is no Ticker associated with this Displayable;
  • the title is null;
  • there are no Commands present; and
  • there is no CommandListener present.

 

 

Since:
MIDP 1.0

 

                                                                                                                                          翻译: lori.wang 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值