• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PropertiesAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openide.actions.PropertiesAction的典型用法代码示例。如果您正苦于以下问题:Java PropertiesAction类的具体用法?Java PropertiesAction怎么用?Java PropertiesAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertiesAction类属于org.openide.actions包,在下文中一共展示了PropertiesAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    //FieldInfo fieldInfo = getField();
    ObjectReference component = getComponent();
    ComponentBreakpoint b = ComponentBreakpointActionProvider.findBreakpoint(component);
    
    List<Action> actions = new ArrayList<Action>();
    actions.add(GoToFieldDeclarationAction.get(GoToFieldDeclarationAction.class));
    actions.add(GoToSourceAction.get(GoToSourceAction.class));
    if (getAddCallStack() != null) {
        actions.add(GoToAddIntoHierarchyAction.get(GoToAddIntoHierarchyAction.class));
    }
    actions.add(null);
    actions.add(ShowListenersAction.get(ShowListenersAction.class));
    actions.add(CreateFixedWatchAction.get(CreateFixedWatchAction.class));
    actions.add(null);
    actions.add(ToggleComponentBreakpointAction.get(ToggleComponentBreakpointAction.class));
    if (b != null) {
        actions.add(CBP_CUSTOMIZE_ACTION);
    }
    actions.add(null);
    actions.add(PropertiesAction.get(PropertiesAction.class));
    return actions.toArray(new Action[] {});
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:RemoteAWTScreenshot.java


示例2: defaultActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
/** Gets default system actions. Overrides superclass method. */
protected SystemAction[] defaultActions() {
    return new SystemAction[] {
        SystemAction.get(OpenAction.class),
        SystemAction.get (FileSystemAction.class),
        null,
        SystemAction.get(CutAction.class),
        SystemAction.get(CopyAction.class),
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(DeleteAction.class),
        SystemAction.get(RenameAction.class),
        null,
        SystemAction.get(SaveAsTemplateAction.class),
        null,
        SystemAction.get(ToolsAction.class),
        SystemAction.get(PropertiesAction.class),
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:AnnotationProviderTest.java


示例3: testCompatibilityIsPropagatedToDisk

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
/** Test to see whether a compatibility behaviour is still kept. E.g.
 * if one adds actions using DataLoader.setActions they really will be 
 * there.
 */
public void testCompatibilityIsPropagatedToDisk () throws Exception {
    assertEquals("No actions at the start", Collections.emptyList(), Arrays.asList(node.getActions(false)));
    FileObject test = root;
    
    PCL pcl = new PCL ();
    obj.getLoader ().addPropertyChangeListener (pcl);
    
    obj.getLoader().setActions(new SystemAction[] {
        SystemAction.get(PropertiesAction.class)
    });
    
    pcl.assertEvent (1, "actions");
    
    Action [] res = node.getActions(false);
    assertEquals("There should be exactly one action.", 1, res.length);
    assertEquals("One file created", 1, test.getChildren ().length);
    
    obj.getLoader().setActions(new SystemAction[0]);

    pcl.assertEvent (2, "actions");
    assertEquals("No actions after deleting", 0, node.getActions(false).length);
    
    assertEquals("file disappeared", 0, test.getChildren ().length);
    obj.getLoader ().removePropertyChangeListener (pcl);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:DataLoaderGetActionsTest.java


示例4: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean context) {
    if (catalog instanceof CatalogWriter)
        return new Action[] {
            SystemAction.get(AddCatalogEntryAction.class),
            SystemAction.get(RefreshAction.class),
            SystemAction.get(CatalogNode.UnmountAction.class),
            null,
            //??? #24349 CustimizeAction sometimes added by BeanNode here
            SystemAction.get(PropertiesAction.class)
        };
    else
        return new Action[] {
            SystemAction.get(RefreshAction.class),
            SystemAction.get(CatalogNode.UnmountAction.class),
            null,
            //??? #24349 CustimizeAction sometimes added by BeanNode here
            SystemAction.get(PropertiesAction.class)
        };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:CatalogNode.java


示例5: createActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
/** Lazily initialize set of node's actions.
 * Overrides superclass method.
 *
 * @return array of actions for this node
 */
@Override
protected SystemAction[] createActions () {
    return new SystemAction[] {
        SystemAction.get(EditAction.class),
        SystemAction.get(OpenAction.class),
        null,
        SystemAction.get(CutAction.class),
        SystemAction.get(CopyAction.class),
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(DeleteAction.class),
        SystemAction.get(LangRenameAction.class),
        null,
        SystemAction.get(NewAction.class),
        SystemAction.get(SaveAsTemplateAction.class),
        null,
        SystemAction.get(FileSystemAction.class),
        null,
        SystemAction.get(ToolsAction.class),
        SystemAction.get(PropertiesAction.class)
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:PropertiesLocaleNode.java


示例6: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public final Action[] getActions(boolean context) {
    if (isUISettingCategoryNode()) {
        return new Action[0];
    } else {
        return new Action[] {
            SystemAction.get(FileSystemAction.class),
            null,
            SystemAction.get(PasteAction.class),
            null,
            SystemAction.get(MoveUpAction.class),
            SystemAction.get(MoveDownAction.class),
            SystemAction.get(ReorderAction.class),
            null,
            SystemAction.get(NewTemplateAction.class),
            null,
            SystemAction.get(ToolsAction.class),
            SystemAction.get(PropertiesAction.class),
        };
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:LookupNode.java


示例7: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    if (job.getColor() == Color.secured) {
        return new Action[] {new LogInAction(job.getInstance())};
    }
    List<Action> actions = new ArrayList<Action>();
    actions.add(SystemAction.get(StartJobAction.class));
    actions.add(new ProjectAssociationAction(job));
    actions.add(null);
    if (job instanceof OpenableInBrowser) {
        actions.add(OpenUrlAction.forOpenable((OpenableInBrowser) job));
    }
    actions.add(new ViewConfigAction(job));
    actions.add(SystemAction.get(PropertiesAction.class));
    return actions.toArray(new Action[actions.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:HudsonJobNode.java


示例8: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean b) {
    List<Action> lst = new ArrayList<Action>();
    
    Action saveAction = null;
    Node parentNode = this.getParentNode();
    if (parentNode != null && parentNode instanceof HttpPostFormFolderNode) {
        HttpPostFormFolderNode hpffn = (HttpPostFormFolderNode)parentNode;
        
        if (hpffn.getCanSave()) {
            saveAction = SaveNodeAction.get( SaveNodeAction.class );
        }
    }
    lst.add(EditNodeAction.get(EditNodeAction.class));
    lst.add(DeleteNodeAction.get(DeleteNodeAction.class));
    if (saveAction != null) {
        lst.add( saveAction );
    }
    lst.add( null );
    lst.add(PropertiesAction.get(PropertiesAction.class));
    
    return (Action[])lst.toArray(new Action[lst.size()]);
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:23,代码来源:HttpPostFormNode.java


示例9: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Messages("LBL_CompilePackage_Action=Compile Package")
@Override
public Action[] getActions( boolean context ) {
    
    if ( !context ) {
        if ( actions == null ) {                
            // Copy actions and leave out the PropertiesAction and FileSystemAction.                
            Action superActions[] = super.getActions( context );            
            List<Action> actionList = new ArrayList<Action>(superActions.length);
            
            for( int i = 0; i < superActions.length; i++ ) {

                if ( (i <= superActions.length - 2) && superActions[ i ] == null && superActions[i + 1] instanceof PropertiesAction ) {
                    i ++;
                    continue;
                }
                else if ( superActions[i] instanceof PropertiesAction ) {
                    continue;
                }
                else if ( superActions[i] instanceof FileSystemAction ) {
                    actionList.add (null); // insert separator and new action
                    actionList.add (FileSensitiveActions.fileCommandAction(ActionProvider.COMMAND_COMPILE_SINGLE, LBL_CompilePackage_Action(), null));                           
                    actionList.add (testPackageAction);
                    actionList.addAll((List<Action>) org.openide.util.Utilities.actionsForPath("Projects/package/Actions"));
                }
                
                actionList.add( superActions[i] );                                                  
            }

            actions = new Action[ actionList.size() ];
            actionList.toArray( actions );
        }
        return actions;
    }
    else {
        return super.getActions( context );
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:PackageViewChildren.java


示例10: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean arg0) {
    return new Action[]{
        // XXX Find
        new RefreshIndexAction(), // XXX allow multiselections
        new EditAction(),
        DeleteAction.get(DeleteAction.class),
        null,
        PropertiesAction.get(PropertiesAction.class)
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:RepositoryNode.java


示例11: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean context) {
    Action[] result = new Action[] {
        SystemAction.get(RefreshPropsAction.class),
                null,
                SystemAction.get(OpenLocalExplorerAction.class),
                null,
                SystemAction.get(NewAction.class),
                null,
                SystemAction.get(ToolsAction.class),
                SystemAction.get(PropertiesAction.class),
    };
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:AllPropsNode.java


示例12: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean context) {
    Action[] result = new Action[] {
        SystemAction.get(DeleteAction.class),
                SystemAction.get(RenameAction.class),
                null,
                SystemAction.get(ToolsAction.class),
                SystemAction.get(PropertiesAction.class),
    };
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:OnePropNode.java


示例13: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean context) {
    return new Action[] {
                SystemAction.get (CutAction.class),
                SystemAction.get (CopyAction.class),
                SystemAction.get (PasteAction.class),
                null,
                SystemAction.get (DeleteAction.class),
                null,
                SystemAction.get (ToolsAction.class),
                SystemAction.get (PropertiesAction.class)
            };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:BrokenDataShadow.java


示例14: testNoDeserializationOfActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
/** Test to check that the deserialization of actions is completely ignored.
 */
public void testNoDeserializationOfActions () throws Exception {
    assertEquals("No actions at the start", 0, node.getActions(false).length);
    FileObject test = root;
    
    PCL pcl = new PCL ();
    obj.getLoader ().addPropertyChangeListener (pcl);
    
    obj.getLoader().setActions(new SystemAction[] {
        SystemAction.get(PropertiesAction.class)
    });
    
    pcl.assertEvent (1, "actions");
    
    Action [] res = node.getActions(false);
    assertEquals("There should be exactly one action.", 1, res.length);
    assertEquals("One file created", 1, test.getChildren ().length);
    
    NbMarshalledObject m = new NbMarshalledObject (obj.getLoader ());
    
    obj.getLoader().setActions(new SystemAction[0]);

    pcl.assertEvent (2, "actions");
    assertEquals("No actions after deleting", 0, node.getActions(false).length);
    
    assertEquals("file disappeared", 0, test.getChildren ().length);
    
    assertEquals ("Loader deserialized", obj.getLoader (), m.get ());
    assertEquals("Still no actions", 0, node.getActions(false).length);
    
    obj.getLoader ().removePropertyChangeListener (pcl);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:DataLoaderGetActionsTest.java


示例15: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
public Action[] getActions(boolean context) {
    if (isCatalogWriter)
        return new Action[] {
            SystemAction.get(EditAction.class),
            SystemAction.get(DeleteAction.class),
            null,
            SystemAction.get(PropertiesAction.class)
        };
    else
        return new Action[] {
            SystemAction.get(ViewAction.class),
            null,
            SystemAction.get(PropertiesAction.class)
        };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:CatalogEntryNode.java


示例16: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    Action[] oldActs = super.getActions(context);
    Action[] acts = Arrays.copyOf(oldActs, oldActs.length + 7);

    // open map
    acts[oldActs.length + 1] = getPreferredAction();
    // spectating action
    acts[oldActs.length + 2] = new NamedAction("ACT_Spectate", UnrealServerNode.class) {

        @Override
        protected void action(ActionEvent e) throws PogamutException {
            try {
                serverDef.spectate();
            } catch (PogamutException ex) {
                Exceptions.printStackTrace(ex);
            }
        }
    };

    // connect native bot action
    acts[oldActs.length + 4] = new ServerUpAction<IUnrealServer>("ACT_AddNativeBot", UnrealServerNode.class, serverDef) {

        @Override
        protected void action(ActionEvent e) throws PogamutException {
            // show dialog
            NotifyDescriptor.InputLine botTypeDialog = new NotifyDescriptor.InputLine("Bot type (optional): ", "Native bot type");
            DialogDisplayer.getDefault().notify(botTypeDialog);

            if (botTypeDialog.isValid()) {

                String botType = botTypeDialog.getInputText().trim();
                getServer().connectNativeBot(null, botType);
            }
        }
    };

    acts[oldActs.length + 6] = SystemAction.get(PropertiesAction.class);
    return acts;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:41,代码来源:UnrealServerNode.java


示例17: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    // TODO add action to restart debug bridge
    return new Action[]{
        new RestartADBAction(),
        SystemAction.get(PropertiesAction.class)
    };
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:9,代码来源:DevicesNode.java


示例18: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        SystemAction.get(SaveAsAction.class),
        SystemAction.get(InstallApkAction.class),
        SystemAction.get(CopyAction.class),
        SystemAction.get(DeleteAction.class),
        SystemAction.get(PropertiesAction.class)
    };
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:11,代码来源:ApkDataObject.java


示例19: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    MotionPathPopup m = new MotionPathPopup(this);
    return new Action[]{
        m.getAddAction(),
        m,
        SystemAction.get(PropertiesAction.class),
        SystemAction.get(DeleteAction.class)
    };
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:11,代码来源:JmeMotionPath.java


示例20: getActions

import org.openide.actions.PropertiesAction; //导入依赖的package包/类
@Override
@Nonnull
@MayContainNull
public Action[] getActions(final boolean context) {
  if (!context) {
    if (actions == null) {
      // Copy actions and leave out the PropertiesAction and FileSystemAction.                
      Action superActions[] = super.getActions(context);
      List<Action> actionList = new ArrayList<Action>(superActions.length);

      for (int i = 0; i < superActions.length; i++) {
        if ((i <= superActions.length - 2) && superActions[i] == null && (superActions[i + 1] instanceof PropertiesAction)) {
          i++;
          continue;
        }
        else if (superActions[i] instanceof PropertiesAction) {
          continue;
        }
        else if (superActions[i] instanceof FileSystemAction) {
          actionList.add(null); // insert separator and new action
          actionList.addAll((List<Action>) org.openide.util.Utilities.actionsForPath("Projects/package/Actions"));
        }

        actionList.add(superActions[i]);
      }

      actions = new Action[actionList.size()];
      actionList.toArray(actions);
    }
    return actions;
  }
  else {
    return super.getActions(context);
  }
}
 
开发者ID:raydac,项目名称:netbeans-mmd-plugin,代码行数:36,代码来源:AbstractMMFilter.java



注:本文中的org.openide.actions.PropertiesAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InternalFilter类代码示例发布时间:2022-05-22
下一篇:
Java BlocksActivity类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap