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

📄 countryentity.java

📁 SWTJFace篇项目源程序该项目包含 包含了Eclipse下构建swt的基本工程
💻 JAVA
字号:
package cn.com.chengang.jface.treeviewer;

import java.util.ArrayList;
import java.util.List;

//国家的实体类
public class CountryEntity implements ITreeEntry<CityEntity> {
    private Long id; //惟一识别码,在数据库里常为自动递增的ID列
    private String name; //国家名
    private List<CityEntity> cities = new ArrayList<CityEntity>(); //此国家所包含的城市的集合
	//---------两个构造函数---------
    public CountryEntity() {}
    public CountryEntity(String name) { this.name = name; }
    //---------字段相应的Getter/Setter方法---------
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public void setChildren(List<CityEntity> children) {this.cities = children;}
    public List<CityEntity> getChildren() {return cities;}
}

⌨️ 快捷键说明

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