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

📄 dbook.java

📁 Micro Window Toolkit(MWT)是一个用于开发J2ME用户界面(UI)的工具包。它具有友好
💻 JAVA
字号:
package com.viacube.j2me.component;

import mwt.Button;
import mwt.EventListener;
import mwt.Label;

import com.viacube.j2me.model.ImageList;

public class DBook extends SubWindow implements EventListener {
// static final int ACTION_CLOSE = 12;
// static final int ACTION_SELECT = 11;
	Button button;
	public DBook(int x, int y, int width, int height) {
		super(x, y, width, height,true);
		add(new Label(2,3,60,10,"DBook"));
		for(int i=0;i<3;i++){
			button = new Button(1, 14+i*20, width-2, 20, "Info "+i, this, ACTION_SELECT);
			button.setIconImage(ImageList.small[0]);
			add(button);
		}
//		this.setEnabled(false);
	}

//	public void processEvent(int eventType, Component c, Object[] args) {
//		switch ( eventType) {
//			case EVENT_ACTION: // when a button is pressed an event action is triggered
//				switch ( ((Button) c).getActionType()) {
//					// case ACTION_EXIT: exit = true; return;
//					case ACTION_SELECT:
//						final Window dialog = new Window(MainWindow.mw.width / 2 - 30, MainWindow.mw.height / 2 - 30, 60, 60){
//							public int getFocusAction(long key) {
//								switch(Midlet.canvas.getGameAction((int)key)) {
//									case Canvas.FIRE:	return FOCUSACTION_FIRE;
//									default: return FOCUSACTION_NONE;
//								}
//							}	
//						};
//						dialog.add(new Label(5, 12, 45, 20, "Click Me!"));
//						dialog.add(new Button(10, 35, 40, 20, "Close", this, ACTION_CLOSE));
//						dialog.setSkin(Window.STYLE_DEFAULT, new Skin(new int[] { 0xeeeeee,0xB2C4DF }));
//						dialog.setFocusFirst();
//						MainWindow.mw.win.dialogOpen(dialog);
//						break;
//					case ACTION_CLOSE:
//						MainWindow.mw.win.dialogClose();
//						break;
//				}
//				break;
//		}
//	}
}

⌨️ 快捷键说明

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