本文整理了Java中org.openide.nodes.Node.getActions()
方法的一些代码示例,展示了Node.getActions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getActions()
方法的具体详情如下:
包路径:org.openide.nodes.Node
类名称:Node
方法名:getActions
[英]Get the set of actions associated with this node. This may be used e.g. in constructing a #getContextMenu.
By default returns the actions in NodeOp#getDefaultActions.
[中]获取与此节点关联的操作集。例如,在构建#getContextMenu时,可以使用此选项。
默认情况下,返回NodeOp#getDefaultActions中的操作。
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Get a special set of actions
* for situations when this node is displayed as a context.
* <p>For example, right-clicking on a parent node in a hierarchical view (such as
* the normal Explorer) should use <code>getActions</code>. However, if this node
* is serving as the parent of a (say) a window tab full of icons (e.g., in
* <code>IconView</code>), 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 context menu.
* <p>Note that in the Windows UI system, e.g., these action sets are quite different.
*
* @return actions for a context. In the default implementation, same as {@link #getActions}.
* @deprecated Use getActions (true) instead.
*/
@Deprecated
public SystemAction[] getContextActions() {
return getActions();
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
@Override
@Deprecated
public SystemAction[] getActions() {
if (delegating(DELEGATE_GET_ACTIONS)) {
return original.getActions();
} else {
return super.getActions();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
@Override
public Action[] getActions(boolean context) {
return switchToOriginal().getActions(context);
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Get all actions for the node.
* Initialized with {@link #createActions}, or with the superclass's list.
*
* @return actions for the node
* @deprecated Override {@link #getActions(boolean)} instead.
*/
@Deprecated
public SystemAction[] getActions() {
if (systemActions == null) {
systemActions = createActions();
if (systemActions == null) {
systemActions = super.getActions();
}
}
return systemActions;
}
代码示例来源: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: org.netbeans.api/org-openide-nodes
@Override
public javax.swing.Action[] getActions(boolean context) {
if (context) {
if (!delegating(DELEGATE_GET_ACTIONS) || overridesAMethod("getContextActions")) { // NOI18N
return super.getActions(context);
}
} else {
if (!delegating(DELEGATE_GET_CONTEXT_ACTIONS) || overridesAMethod("getActions")) { // NOI18N
return super.getActions(context);
}
}
javax.swing.Action[] retValue;
retValue = original.getActions(context);
return retValue;
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
actionsByNode[n] = nodes[n].getActions(false);
代码示例来源:origin: nl.cloudfarming.client/field-shape-type
@Override
public Action[] getActions(boolean context) {
return origional.getActions(context);
}
}
代码示例来源:origin: eu.agrosense.client/io-shape
@Override
public Action[] getActions(boolean context) {
return original.getActions(context);
}
代码示例来源:origin: nl.cloudfarming.client/geometry-shape-type
@Override
public Action[] getActions(boolean context) {
return origional.getActions(context);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public SystemAction[] getActions () {
if (delegating (DELEGATE_GET_ACTIONS))
return original.getActions ();
else
return super.getActions ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public SystemAction[] getActions () {
if (delegating (DELEGATE_GET_ACTIONS))
return original.getActions ();
else
return super.getActions ();
}
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-netbeans-visual
@Override @Nonnull
public JPopupMenu getPopupMenu (final @Nonnull Widget widget, final @Nonnull Point localLocation)
{
final JPopupMenu popup = new JPopupMenu();
for (final Action action : node.getActions(true))
{
popup.add(action);
}
return popup;
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2eeserver
public Action[] getActions(boolean context) {
List actions = new ArrayList();
if (extendsActions) {
actions.addAll(Arrays.asList(xnode.getActions(context)));
}
actions.addAll(Arrays.asList(getOriginal().getActions(context)));
return (Action[]) actions.toArray(new Action[actions.size()]);
}
代码示例来源:origin: nl.cloudfarming.client/sensor-api
@Override
public Action[] getActions(boolean arg0) {
Action[] addedActions = {new ChangePaletteAction()};
Action[] originalActions = original.getActions(arg0);
originalActions[0].setEnabled(true);
Action[] actions = Arrays.copyOf(originalActions, originalActions.length + addedActions.length);
int counter = originalActions.length;
for (Action addedAction : addedActions) {
actions[counter] = addedAction;
}
return actions;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Get all actions for the node.
* Initialized with {@link #createActions}, or with the superclass's list.
*
* @return actions for the node
* @deprecated Override {@link #getActions(boolean)} instead.
*/
public SystemAction[] getActions () {
if (systemActions == null) {
systemActions = createActions ();
if (systemActions == null) {
systemActions = super.getActions ();
}
}
return systemActions;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2eeserver
public javax.swing.Action[] getActions(boolean context) {
List actions = new ArrayList();
actions.addAll(Arrays.asList(getOriginal().getActions(context)));
/*Boolean isRunning = instance.checkRunning();
if (isRunning != null && isRunning.booleanValue()) {*/
if (getServerTarget() != null) {
actions.addAll(Arrays.asList(getDelegateTargetNode().getActions(context)));
}
return (javax.swing.Action[]) actions.toArray(new javax.swing.Action[actions.size()]);
}
代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-graph
@Override
public Action[] getActions (boolean arg0)
{
final List<Action> actions = new ArrayList<Action>(Arrays.asList(getOriginal().getActions(arg0)));
// FIXME; this action should not stay in this module
actions.add(new ApplyTreeLayoutAction(this));
return actions.toArray(new Action[0]);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public javax.swing.Action[] getActions(boolean context) {
if (context) {
if (!delegating (DELEGATE_GET_ACTIONS) || overridesAMethod ("getContextActions", new Class[0])) // NOI18N
return super.getActions (context);
} else {
if (!delegating (DELEGATE_GET_CONTEXT_ACTIONS) || overridesAMethod ("getActions", new Class[0])) // NOI18N
return super.getActions (context);
}
javax.swing.Action[] retValue;
retValue = original.getActions(context);
return retValue;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public javax.swing.Action[] getActions(boolean context) {
if (context) {
if (!delegating (DELEGATE_GET_ACTIONS) || overridesAMethod ("getContextActions", new Class[0])) // NOI18N
return super.getActions (context);
} else {
if (!delegating (DELEGATE_GET_CONTEXT_ACTIONS) || overridesAMethod ("getActions", new Class[0])) // NOI18N
return super.getActions (context);
}
javax.swing.Action[] retValue;
retValue = original.getActions(context);
return retValue;
}
内容来源于网络,如有侵权,请联系作者删除!