|
| MIDP 2.0相对于MIDP1.0中新增加的类和方法
|
|
| 作者: 来源:www.javaresearch.org 发布时间:2006-07-04 09:09:31.787 |
|
|
扩展的新类:
CommConnection类(2.0) CustomItem类(2.0) GameCanvas类(2.0) PushRegistry类(2.0) Layer类(2.0) LayerManager类(2.0) HttpsConnection类(2.0) SecureConnection类(2.0) SecurityInfo类(2.0) ServerSocketConnection类(2.0) SocketConnection类(2.0) Sprite类(2.0) TiledLayer类(2.0) UDPDatagramConnection类(2.0)
相同类中2.0的方法
choice类
deleteall() setFitPolicy(int fitPolicy) getFitPolicy() setFont(int elementNum,Font font) getFont(int elementNum)
choiceGroup类
setFitPolicy(int fitPolicy) getFitPolicy() setFont(int elementNum,Font font) getFont(int elementNum)
Command类
Command(String shortLabel,String longLabel,int commandType,int priority)(构造方法) getLongLabel()
Display类
int getColor(int colorSpecifier) int getBorderStyle(boolean highlighted) int numAlphaLevels() int numAlphaLevels() setCurrentItem(Item item) callSerially(Runnable r) boolean vibrate(int duration) int getBestImageWidth(int imageType) int getBestImageHeight(int imageType)
Displayable类
String getTitle() setTitle(String s) Ticker getTicker() setTicker(Ticker ticker) sizeChanged(int w,int h)
Gauge类
setLayout(int layout) addCommand(Command cmd) setItemCommandListener(ItemCommandListener l) setPreferredSize(int width,int height) setDefaultCommand(Command cmd)
Image类
static Image createImage(InputStream stream)throws IOException static Image createRGBImage(int[] rgb,int width,int height,boolean processAlpha) getRGB(int[] rgbData,int offset,int scanlength,int x,int y,int width,int height)
ImageItem类
int getAppearanceMode() ImageItem(String label,Image image,int layout,String altText,int appearanceMode)(构造方法)
List类
setTicker(Ticker ticker) setTitle(String s) removeCommand(Command cmd) setSelectCommand(Command command) setFitPolicy(int fitPolicy) int getFitPolicy()
MIDlet类
final boolean platformRequest(String URL)throws ConnectionNotFoundException final int checkPermission(String permission)
RecordStore类
static RecordStore openRecordStore(String recordStoreName,boolean createIfNecessary,int authmode,boolean writable) throws RecordStoreException, RecordStoreFullException, RecordStoreNotFoundException static RecordStore openRecordStore(String recordStoreName,String vendorName,String suiteName) throws RecordStoreException, RecordStoreNotFoundException setMode(int authmode,boolean writable) throws RecordStoreException
StringItem类
StringItem(String label,String text,int appearanceMode)(构造方法)
TextBox类
setInitialInputMode(String characterSubset) setTicker(Ticker ticker)
TextField类
setInitialInputMode(String characterSubset)
可见,MIDP2.0比MIDP1.0有着极大的不同,即使是相同的类也有着新的方法。
仔细阅读API文档,会有更多的收获。
|
|
|