0
点赞
收藏
分享

微信扫一扫

关于菜单基础属性的实体类


关于菜单基础属性的实体类

 

 

在代码中经常会用到菜单,为了使用方便,因此创建1个菜单实体类,用于定义菜单。

 

代码:

 

package com.zhouzijing.android.util;


/**
 * 定义菜单实体结构.
 * @author stephen
 *
 */
public class MenuEntity{
	
	
	/**
	 * 生成菜单.
	 * @param groupId
	 * @param itemId
	 * @param order
	 * @param title
	 * @param iconRes
	 */
	public MenuEntity(int groupId, int itemId, int order, CharSequence title,int iconRes) {
		this(groupId,itemId,order,title);
		this.iconRes = iconRes;
	}
	
	/**
	 * 生成菜单.
	 * @param groupId
	 * @param itemId
	 * @param order
	 * @param title
	 */
	public MenuEntity(int groupId, int itemId, int order, CharSequence title) {
		super();
		this.groupId = groupId;
		this.itemId = itemId;
		this.order = order;
		this.title = title;
	}
	
	/**
	 * 组.
	 */
	private int groupId;
	/**
	 * 菜单编号.
	 */
	private int itemId;
	/**
	 * 显示顺序号.
	 */
	private int order;
	/**
	 * 菜单显示名称.
	 */
	private CharSequence title;
	/**
	 * 菜单图标.
	 */
	private int iconRes;
	/**
	 * @return the groupId
	 */
	public int getGroupId() {
		return groupId;
	}
	/**
	 * @param groupId the groupId to set
	 */
	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}
	/**
	 * @return the itemId
	 */
	public int getItemId() {
		return itemId;
	}
	/**
	 * @param itemId the itemId to set
	 */
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	/**
	 * @return the order
	 */
	public int getOrder() {
		return order;
	}
	/**
	 * @param order the order to set
	 */
	public void setOrder(int order) {
		this.order = order;
	}
	/**
	 * @return the title
	 */
	public CharSequence getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(CharSequence title) {
		this.title = title;
	}
	/**
	 * @return the iconRes
	 */
	public int getIconRes() {
		return iconRes;
	}
	/**
	 * @param iconRes the iconRes to set
	 */
	public void setIconRes(int iconRes) {
		this.iconRes = iconRes;
	}
	
	
	
}

 

举报

相关推荐

0 条评论