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

📄 navigatorentry.java

📁 学生成绩管理系统 eclipse rcp开发 swt技术
💻 JAVA
字号:
package com.zdh.sms.navigator;

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

import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorInput;

import com.zdh.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;
	}

	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -