Java Code Examples for org.openide.util.actions.SystemAction#get()

The following examples show how to use org.openide.util.actions.SystemAction#get() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BookmarkNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[] {
        SystemAction.get(OpenAction.class),
        SystemAction.get(RenameAction.class),
        SystemAction.get(DeleteAction.class)
    };
}
 
Example 2
Source File: JaxWsRootNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(PropertiesAction.class)
    };
}
 
Example 3
Source File: PageFlowScene.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private WidgetAction createActionMap() {

        ActionMap actionMap = refPageFlowView.get().getActionMap();
        CallbackSystemAction a = (CallbackSystemAction) SystemAction.get(DeleteAction.class);
        actionMap.put(a.getActionMapKey(), new PageFlowDeleteAction(this));

        //Temporary workaround  ISSUE# 107506
        return new MyActionMapAction(MapActionUtility.initInputMap(), MapActionUtility.initActionMap());
        //return ActionFactory.createActionMapAction(MapActionUtility.initInputMap(), MapActionUtility.initActionMap());
    }
 
Example 4
Source File: JmeAnimControl.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new SystemAction[]{
                //                    SystemAction.get(CopyAction.class),
                //                    SystemAction.get(CutAction.class),
                //                    SystemAction.get(PasteAction.class),
                SystemAction.get(DeleteAction.class)
            };
}
 
Example 5
Source File: JmeGenericControl.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new SystemAction[]{
                //                    SystemAction.get(CopyAction.class),
                //                    SystemAction.get(CutAction.class),
                //                    SystemAction.get(PasteAction.class),
                SystemAction.get(DeleteAction.class)
            };
}
 
Example 6
Source File: JAXBWizardSchemaNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void initActions() {
    if ( actions == null ) {
        actions = new Action[] {
            SystemAction.get(OpenJAXBCustomizerAction.class),
            null,
            SystemAction.get(DeleteAction.class)
        };
    }
}
 
Example 7
Source File: BasicOpenFileTest.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void undo() throws Exception {
    final UndoAction ua = SystemAction.get(UndoAction.class);
    assertNotNull("Cannot obtain UndoAction", ua);
    while (ua.isEnabled()) {
        SwingUtilities.invokeAndWait(new Runnable() {

            public void run() {
                ua.performAction();
            }
        });
    }
}
 
Example 8
Source File: PlatformNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[] {
        SystemAction.get (ShowJavadocAction.class),
        SystemAction.get (EditRootAction.class),
    };
}
 
Example 9
Source File: DiffPanel.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void editorActivated(final JEditorPane editor) {
    //System.out.println("editor("+editor+") activated.");
    final Action copy = getAction (DefaultEditorKit.copyAction, editor);
    if (copy != null) {
        final CallbackSystemAction sysCopy
        = ((CallbackSystemAction) SystemAction.get (CopyAction.class));
        final ActionPerformer perf = new ActionPerformer () {
            public void performAction (SystemAction action) {
                copy.actionPerformed (new ActionEvent (editor, 0, "")); // NOI18N
            }
        };
        sysCopy.setActionPerformer(copy.isEnabled() ? perf : null);
        PropertyChangeListener copyListener;
        copy.addPropertyChangeListener(copyListener = new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
                if ("enabled".equals(evt.getPropertyName())) { // NOI18N
                    if (((Boolean)evt.getNewValue()).booleanValue()) {
                        sysCopy.setActionPerformer(perf);
                    } else if (sysCopy.getActionPerformer() == perf) {
                        sysCopy.setActionPerformer(null);
                    }
                }
            }
        });
        if (editor.equals(jEditorPane1)) copyL = copyListener;
        else copyP = copyListener;
    }
}
 
Example 10
Source File: JmeAssetLinkNode.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new SystemAction[]{
                SystemAction.get(DeleteAction.class)
            };
}
 
Example 11
Source File: HttpMethodNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public Action getPreferredAction() {
    return SystemAction.get(OpenAction.class);
}
 
Example 12
Source File: RestServiceNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Action getPreferredAction() {
    return SystemAction.get(OpenAction.class);
}
 
Example 13
Source File: ElementLook.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public Action[] getActions(Element e, Lookup env) {
    return new Action[] {
        SystemAction.get(DeleteAction.class),
    };
}
 
Example 14
Source File: AnnotationProviderTest.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/** Overrides default action from DataNode. */
public SystemAction getDefaultAction () {
    SystemAction result = super.getDefaultAction();
    return result == null ? SystemAction.get(OpenAction.class) : result;
}
 
Example 15
Source File: LayerFilterNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Action getPreferredAction() {
    return SystemAction.get(OpenLayerFilesAction.class);
}
 
Example 16
Source File: JaxWsClientNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Action getPreferredAction() {
    return SystemAction.get(OpenAction.class);
}
 
Example 17
Source File: MessageNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public Action[] getActions(boolean context) {
    return new SystemAction[] {
        SystemAction.get(OpenAction.class),
    };
}
 
Example 18
Source File: DockerImagesNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[] { 
        SystemAction.get(RefreshAction.class)
    };
}
 
Example 19
Source File: CMPFieldsNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public Action getPreferredAction() {
    return SystemAction.get(OpenAction.class);
}
 
Example 20
Source File: StyleSheetNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Action getPreferredAction() {
    return SystemAction.get(OpenResourceAction.class);
}