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

📄 removenodeaction.java

📁 java 调用windows的api
💻 JAVA
字号:
package org.jawin.browser.popup.actions;

import org.jawin.browser.popup.PopupAction;
import org.jawin.browser.data.BaseData;
import org.jawin.browser.gui.FrameManager;

/**
 * Removes the currently selected node from teh tree
 * and all of its children, used for cleaning up the tree
 * prior to code generation
 *
 * This is an example of the popup menu architecture, please add more
 * of these as required for functionality.
 *
 * They can be configured per BaseData node type
 *
 * <p>Title: Jawin Code Generation GUI</p>
 * <p>Description: GUI for exploring type libraries and generating Java code</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: Open Source Incentive</p>
 *
 * @author Josh Passenger
 * @version 1.0
 */

public class RemoveNodeAction extends PopupAction
{
	public RemoveNodeAction()
	{

	}

	/**
	 * This action removed this ndoe from its parent
	 *
	 * It should only ever be available for nodes where removing that node
	 * makes sense
	 *
	 * @param targetNode
	 */
	public void performAction(BaseData targetNode)
	{
		targetNode.removeFromParent();
		FrameManager.getInstance().getRootFrame().treeChanged();
	}

	/**
	 * Only show this action if this base data's parent is not null
	 * @param targetNode the node to check for display
	 * @return true if this action should eb shown, false if the target nodes's
	 * parent is null
	 */
	public boolean shouldDisplay(BaseData targetNode)
	{
		if (targetNode.getParent() == null)
		{
			return false;
		}
		else
		{
			return true;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -