menuitem.java

来自「最强手机阅读器Anyview3.0版的界面代码」· Java 代码 · 共 94 行

JAVA
94
字号
package com.ismyway.fairyui;import javax.microedition.lcdui.Image;public class MenuItem {	private String text = null; //显示的菜单文字	private String id = null; //唯一标识,由用户决定	private Image img = null; //菜单项前面的图片	private boolean checked = false; //是否被选中	private boolean enable = true; //是否启用	private MenuItem[] subItems = null; //子菜单	private Object obj = null; //菜单项中保存的信息	public Object getObj() {		return obj;	}	public void setObj(Object obj) {		this.obj = obj;	}	public MenuItem(String text) {		super();		this.text = text;	}		public MenuItem(String text, MenuItem[] subItems) {		super();		this.text = text;		this.subItems = subItems;	}		public MenuItem(String text, Object obj) {		super();		this.obj = obj;		this.text = text;	}		public MenuItem(String text, Object obj, MenuItem[] subItems) {		super();		this.obj = obj;		this.text = text;		this.subItems = subItems;	}	public boolean isChecked() {		return checked;	}	public void setChecked(boolean checked) {		this.checked = checked;	}	public String getId() {		return id;	}	public void setId(String id) {		this.id = id;	}	public Image getImg() {		return img;	}	public void setImg(Image img) {		this.img = img;	}	public MenuItem[] getSubItems() {		return subItems;	}	public void setSubItems(MenuItem[] subItems) {		this.subItems = subItems;	}	public String getText() {		return text;	}	public void setText(String text) {		this.text = text;	}	public boolean isEnable() {		return enable;	}	public void setEnable(boolean enable) {		this.enable = enable;	}}

⌨️ 快捷键说明

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