navigatorentry.java
来自「学生成绩管理系统 eclipse rcp开发 swt技术」· Java 代码 · 共 90 行
JAVA
90 行
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 + =
减小字号Ctrl + -
显示快捷键?