?? navigatorentry.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 + -