本文整理汇总了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)
};
}
}
示例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),
};
}
示例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)
};
}
示例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()]);
}
示例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()]);
}
示例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)
};
}
}
示例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)
};
}
}
示例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)
};
}
}
示例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()]);
}
示例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()]);
}
示例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)
};
}
}
示例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)
};
}
}
示例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());
}
示例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)
};
}
示例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)
};
}
}