checkitem.java

来自「用Java开发的、实现类似Visio功能的应用程序源码」· Java 代码 · 共 73 行

JAVA
73
字号
/**
 *    $Id:CheckItem.java $
 *
 *    Copyright 2004 ~ 2005  JingFei International Cooperation LTD. All rights reserved. *
 */
package com.jfimagine.jfgraph.shape.union;


/**
 *  Class CheckItem is used to encapsulate an action of a new item,
 *  such as layer,to be added,updated or removed.
 */
public class CheckItem{
       
        public static final int STATE_NORMAL	=0;
        public static final int STATE_NEW	=1;
        public static final int STATE_UPDATE	=2;
        public static final int STATE_REMOVED	=3;
       
	private int m_id	=0;
	/** get id of this item*/
	public int getId(){
		return m_id;
	}                   
	/** set a new id of this item*/
	public void setId(int id){
		m_id	=id;
	}

	private String m_label	="";
	/** get label of this item*/
	public String getLabel(){
		return m_label;
	}                   
	/** set a new label of this item*/
	public void setLabel(String l){
		if (l==null) l="";
		m_label	=l;
	}
	
	private boolean m_checked	=false;
	/** get checked state of this item*/
	public boolean getChecked(){
		return m_checked;
	}                   
	/** set a new checked state of this item*/
	public void setChecked(boolean checked){
		m_checked	=checked;
	}

	private int m_state	=0;
	/** get state of this item*/
	public int getState(){
		return m_state;
	}                   
	/** set a new state of this item*/
	public void setState(int state){
		m_state	=state;
	}


	private Object m_object	=null;
	/** get internal object of this item*/
	public Object getObject(){
		return m_object;
	}                   
	/** set a new internal object of this item*/
	public void setObject(Object obj){
		m_object	=obj;
	}
}

⌨️ 快捷键说明

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