本文整理了Java中org.openide.nodes.Node.getContextActions()
方法的一些代码示例,展示了Node.getContextActions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getContextActions()
方法的具体详情如下:
包路径:org.openide.nodes.Node
类名称:Node
方法名:getContextActions
[英]Get a special set of actions for situations when this node is displayed as a context.
For example, right-clicking on a parent node in a hierarchical view (such as the normal Explorer) should use getActions
. However, if this node is serving as the parent of a (say) a window tab full of icons (e.g., in org.openide.explorer.view.IconView), and the users right-clicks on the empty space in this pane, then this method should be used to get the appropriate actions for a popup menu.
Note that in the Windows UI system, e.g., these action sets are quite different.
[中]当此节点显示为上下文时,获取一组特殊的操作。
例如,在层次视图(如普通资源管理器)中的父节点上单击鼠标右键应使用getActions
。然而,如果这个节点是一个(比如)满是图标的窗口选项卡(例如,在org.openide.explorer.view.IconView中)的父节点,并且用户右键单击这个窗格中的空白区域,那么应该使用这个方法为弹出菜单获取适当的操作。
请注意,例如,在Windows UI系统中,这些操作集是完全不同的。
代码示例来源:origin: org.netbeans.api/org-openide-nodes
@Override
@Deprecated
public SystemAction[] getContextActions() {
if (delegating(DELEGATE_GET_CONTEXT_ACTIONS)) {
return original.getContextActions();
} else {
return super.getContextActions();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Get the set of actions that are associated with this node.
* This set is used to construct the context menu for the node.
*
* <P>
* By default this method delegates to the deprecated getActions or getContextActions
* method depending on the value of supplied argument.
* <P>
* It is supposed to be overridden by subclasses accordingly.
*
* @param context whether to find actions for context meaning or for the
* node itself
* @return a list of actions (you may include nulls for separators)
* @since 3.29
*/
public Action[] getActions(boolean context) {
return context ? getContextActions() : getActions();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public SystemAction[] getContextActions () {
if (delegating (DELEGATE_GET_CONTEXT_ACTIONS))
return original.getContextActions ();
else
return super.getContextActions ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public SystemAction[] getContextActions () {
if (delegating (DELEGATE_GET_CONTEXT_ACTIONS))
return original.getContextActions ();
else
return super.getContextActions ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Get the set of actions that are associated with this node.
* This set is used to construct the popup menu for the node.
*
* <P>
* By default this method delegates to the deprecated getActions or getContextActions
* method depending on the value of suplied argument.
* <P>
* It is supposed to be overridden by subclasses accordingly.
*
* @param context whether to find actions for context meaning or for the
* node itself
* @return a list of actions (you may include nulls for separators)
* @since 3.29
*/
public Action[] getActions (boolean context) {
return context ? getContextActions () : getActions ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Get the set of actions that are associated with this node.
* This set is used to construct the popup menu for the node.
*
* <P>
* By default this method delegates to the deprecated getActions or getContextActions
* method depending on the value of suplied argument.
* <P>
* It is supposed to be overridden by subclasses accordingly.
*
* @param context whether to find actions for context meaning or for the
* node itself
* @return a list of actions (you may include nulls for separators)
* @since 3.29
*/
public Action[] getActions (boolean context) {
return context ? getContextActions () : getActions ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
popup = Utilities.actionsToPopup(manager.getExploredContext().getContextActions(), this);
} else {
Action[] actions = NodeOp.findActions(manager.getSelectedNodes());
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
popup = Utilities.actionsToPopup(manager.getExploredContext().getContextActions(), this);
} else {
Action[] actions = NodeOp.findActions(manager.getSelectedNodes());
内容来源于网络,如有侵权,请联系作者删除!