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

📄 pageselectionevent.java

📁 eclipse平台的CDT项目3.0版本的源代码
💻 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 + -