当前位置: 首页>>代码示例>>Java>>正文


Java DeleteAction类代码示例

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


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

示例1: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    if ( context ) {
        return super.getActions(context);
    } else {
        return new SystemAction[] {
            SystemAction.get(CreateDatabaseAction.class),
            SystemAction.get(StartAction.class),
            SystemAction.get(StopAction.class),
            SystemAction.get(ConnectServerAction.class),
            SystemAction.get(DisconnectServerAction.class),
            SystemAction.get(DeleteAction.class),
            SystemAction.get(RefreshServerAction.class),
            SystemAction.get(AdministerAction.class),
            SystemAction.get(PropertiesAction.class)
        };
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:ServerNode.java

示例2: defaultActions

import org.openide.actions.DeleteAction; //导入依赖的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: createActions

import org.openide.actions.DeleteAction; //导入依赖的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

示例4: createActionsForFavoriteFolder

import org.openide.actions.DeleteAction; //导入依赖的package包/类
/** Add action 'Remove from Favorites'. */
private Action [] createActionsForFavoriteFolder (Action [] arr) {
    boolean added = false;
    List<Action> newArr = new ArrayList<Action>();
    for (int i = 0; i < arr.length; i++) {
        //Add before CopyAction or CutAction
        if (!added && ((arr[i] instanceof CopyAction) || (arr[i] instanceof CutAction))) {
            added = true;
            newArr.add(Actions.remove());
            newArr.add(null);
        }
        //Do not add Delete action
        if (!(arr[i] instanceof DeleteAction)) {
            newArr.add(arr[i]);
        }
    }
    if (!added) {
        added = true;
        newArr.add(null);
        newArr.add(Actions.remove());
    }
    
    return newArr.toArray (new Action[newArr.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:FavoritesNode.java

示例5: createActionsForFavoriteFile

import org.openide.actions.DeleteAction; //导入依赖的package包/类
/** Add action 'Remove from Favorites'. */
private Action [] createActionsForFavoriteFile (Action [] arr) {
    boolean added = false;
    List<Action> newArr = new ArrayList<Action>();
    for (int i = 0; i < arr.length; i++) {
        //Add before CopyAction or CutAction
        if (!added && ((arr[i] instanceof CopyAction) || (arr[i] instanceof CutAction))) {
            added = true;
            newArr.add(Actions.remove());
            newArr.add(null);
        }
        //Do not add Delete action
        if (!(arr[i] instanceof DeleteAction)) {
            newArr.add(arr[i]);
        }
    }
    if (!added) {
        added = true;
        newArr.add(null);
        newArr.add(Actions.remove());
    }
    return newArr.toArray (new Action[newArr.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:FavoritesNode.java

示例6: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
    public Action[] getActions(boolean context) {
//        return super.getActions(context);
        if (((JmeSpatialChildren) jmeChildren).readOnly) {
            return new Action[]{
                        SystemAction.get(CopyAction.class),
                        new ControlsPopup(this)
                };
        } else {
            return new Action[]{
                        new NewControlPopup(this),
                        new NewLightPopup(this),
                        new ControlsPopup(this),
                        Actions.alwaysEnabled(new AddUserDataAction(this), "Add User Data", "", false),
                        new ToolPopup(this),
                        SystemAction.get(RenameAction.class),
                        SystemAction.get(CopyAction.class),
                        SystemAction.get(CutAction.class),
                        SystemAction.get(PasteAction.class),
                        SystemAction.get(DeleteAction.class)
                    };
        }
    }
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:24,代码来源:JmeSpatial.java

示例7: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    if (linkChildren.readOnly) {
        return new Action[]{
                    SystemAction.get(CopyAction.class),};
    } else {
        return new Action[]{
                    new NewControlPopup(this),
                    Actions.alwaysEnabled(new AddUserDataAction(this), "Add User Data", "", false),
                    SystemAction.get(RenameAction.class),
                    SystemAction.get(CopyAction.class),
                    SystemAction.get(CutAction.class),
                    SystemAction.get(PasteAction.class),
                    SystemAction.get(DeleteAction.class)
                };
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:18,代码来源:JmeAssetLinkNode.java

示例8: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
    public Action[] getActions(boolean context) {
//        return super.getActions(context);
        if (((JmeSpatialChildren) jmeChildren).readOnly) {
            return new Action[]{
                        SystemAction.get(CopyAction.class),};
        } else {
            return new Action[]{
                        new NewSpatialPopup(this),
                        new NewControlPopup(this),
                        new NewLightPopup(this),
                        Actions.alwaysEnabled(new AddUserDataAction(this), "Add User Data", "", false),
                        new ToolPopup(this),
                        new ControlsPopup(this),
                        SystemAction.get(RenameAction.class),
                        SystemAction.get(CopyAction.class),
                        SystemAction.get(CutAction.class),
                        SystemAction.get(PasteAction.class),
                        SystemAction.get(DeleteAction.class)
                    };
        }
    }
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:23,代码来源:JmeNode.java

示例9: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean context) {
    
    Action[] actions = super.getActions(context);
    java.util.ArrayList<Action> myactions = new java.util.ArrayList<Action>();
    for (int i=0; i<actions.length; ++i)
    {
        myactions.add(actions[i]);
    }
    
    myactions.add(SystemAction.get(EditQueryAction.class));
    myactions.add(null);
    myactions.add(SystemAction.get(CopyAction.class));
    myactions.add(SystemAction.get(DeleteAction.class));
    
    return myactions.toArray(new Action[myactions.size()]);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:18,代码来源:DatasetNode.java

示例10: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
public Action[] getActions(boolean popup) {

    List<Action> actions = new ArrayList<Action>();
    actions.add(SystemAction.get( NewAction.class ));
    actions.add(null);
    actions.add(SystemAction.get( AddTemplateReferenceToReportAction.class ));
    //actions.add(null);
    //actions.add(SystemAction.get( CopyAction.class ));
    //actions.add(SystemAction.get( CutAction.class ));
    //actions.add(SystemAction.get( RenameAction.class ));
    actions.add(null);
    actions.add(SystemAction.get( DeleteAction.class ));

    return actions.toArray(new Action[actions.size()]);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:17,代码来源:LibraryTemplateReferenceNode.java

示例11: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
    public Action[] getActions(boolean context) {
//        return super.getActions(context);
        if (((JmeSpatialChildren) jmeChildren).readOnly) {
            return new Action[]{
                        SystemAction.get(CopyAction.class),};
        } else {
            return new Action[]{
                        new NewControlPopup(this),
                        new NewLightPopup(this),
                        Actions.alwaysEnabled(new AddUserDataAction(this), "Add User Data", "", false),
                        new ToolPopup(this),
                        SystemAction.get(RenameAction.class),
                        SystemAction.get(CopyAction.class),
                        SystemAction.get(CutAction.class),
                        SystemAction.get(PasteAction.class),
                        SystemAction.get(DeleteAction.class)
                    };
        }
    }
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:21,代码来源:JmeSpatial.java

示例12: getActions

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
    public Action[] getActions(boolean context) {
//        return super.getActions(context);
        if (((JmeSpatialChildren) jmeChildren).readOnly) {
            return new Action[]{
                        SystemAction.get(CopyAction.class),};
        } else {
            return new Action[]{
                        new NewSpatialPopup(this),
                        new NewControlPopup(this),
                        new NewLightPopup(this),
                        Actions.alwaysEnabled(new AddUserDataAction(this), "Add User Data", "", false),
                        new ToolPopup(this),
                        SystemAction.get(RenameAction.class),
                        SystemAction.get(CopyAction.class),
                        SystemAction.get(CutAction.class),
                        SystemAction.get(PasteAction.class),
                        SystemAction.get(DeleteAction.class)
                    };
        }
    }
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:22,代码来源:JmeNode.java

示例13: doDelete

import org.openide.actions.DeleteAction; //导入依赖的package包/类
@Override
public void doDelete( final Lookup lookup ) {
    if (lookup.lookup(ExplorerContext.class) != null) {
        Node node = lookup.lookup(Node.class);
        node.setValue(NODE_ATTRIBUTE_NAME, Boolean.TRUE);
        try {
            SystemAction.get(DeleteAction.class).actionPerformed(null);
            return;
        }
        finally {
            node.setValue(NODE_ATTRIBUTE_NAME, Boolean.FALSE);
        }
    }
    Runnable runnable = new Runnable() {

        @Override
        public void run() {
            UI.openRefactoringUI(new DeleteRefactoringUI(getGwtXml(lookup)));
        }
    };
    ScanDialog.runWhenScanFinished(runnable, Bundle.delete());
}
 
开发者ID:vaadin,项目名称:netbeans-plugin,代码行数:23,代码来源:GwtRefactoringActionsProvider.java

示例14: getActions

import org.openide.actions.DeleteAction; //导入依赖的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

示例15: getActions

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


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