?? pageselectionevent.java
字號:
//Title: Curriculum Development Tool
//Copyright: Copyright (c) 2001
//Author: David Bradford - dbrad@medstat.med.utah.edu
//Company: Knowledge Weavers - http://medstat.med.utah.edu/kw/
//File: projects/tree/event/PageSelectionEvent.java
//Description: This is a class to pass data when pages are selected in the tree.
package cdt.projects.tree.event;
import cdt.projects.tree.nodes.Node;
/**
* This class is used when an item in the tree is selected and the editor needs to changes the
* file that is being edited. This class is used to pass the info about where to save new
* text and what text to put in the editor.
*
* @version 1.0
* @author David Bradford<BR>
* Brad Schaefer (<A HREF="mailto:schaefer@medstat.med.utah.edu">schaefer@medstat.med.utah.edu</A>)
*/
public class PageSelectionEvent {
/** node to save changed text to. */
private Node lastNode;
/** node that is being switched to. */
private Node nextNode;
/**
* Create a page selection event.
*
* @param lastNode node to save changed text to.
* @param nextNode the node that was selected in the tree.
*/
public PageSelectionEvent(Node lastNode, Node nextNode) {
this.lastNode = lastNode;
this.nextNode = nextNode;
}
/**
* Saves text that has been changed to the last node.
*
* @param data changed text.
*/
public void saveText(String data) {
if(lastNode!=null) {
lastNode.setData(data);
}
}
/**
* Gets the next node (the one that has been selected creating this
* object).
*
* @return Node repesenting an item on the FileTree that has just been
* selected.
*/
public Node getNextNode() {
return nextNode;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -