navigatorentry.java

来自「学生成绩管理系统」· Java 代码 · 共 43 行

JAVA
43 行
字号
package cn.com.chengang.sms.navigator;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorInput;

import cn.com.chengang.sms.model.ITreeEntry;
public class NavigatorEntry implements ITreeEntry {
	private String name;// 结点名称
	private ITreeEntry parentEntry; // 父结点
	private List<ITreeEntry> children = new ArrayList<ITreeEntry>(); // 子结点的集合
	private Image image;// 结点的图标

	//两个构造函数
	public NavigatorEntry() {}
	public NavigatorEntry(String name) {this.name = name;	}

	//以下为字段相应的Getter/Setter方法,也是实现了ITreeEntry接口中定义的方法
	public String getName() {return name;}
	public void setName(String name) {this.name = name;}

	public ITreeEntry getParentEntry() {return parentEntry;}
	public void setParentEntry(ITreeEntry parentEntry) {this.parentEntry = parentEntry;}
	public void setChildren(List<ITreeEntry> children) {this.children = children;}
	public List<ITreeEntry> getChildren() {	return children;}
	public void addChild(ITreeEntry entry) {children.add(entry);}
	public boolean hasChild() {return children.size() > 0; }

	public Image getImage() {return image;}
	public void setImage(Image image) {this.image = image;}
	
	
	
	private IEditorInput editorInput;// 结点对应编辑器的EditorInput
	private String editorId;// 编辑器对应于plugin.xml中的Id值
    //--------Setter/Getter方法--------------
	public IEditorInput getEditorInput() {return editorInput;}
	public void setEditorInput(IEditorInput editorInput) {	this.editorInput = editorInput;	}
	public String getEditorId() {return editorId;}
	public void setEditorId(String editorId) {this.editorId = editorId;}
	
}

⌨️ 快捷键说明

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