Package org.openide.nodes

Examples of org.openide.nodes.Node


        return "";
    }

    private String getTextDetailInnerDetailNodeString(Object object) {
        if (object instanceof org.openide.nodes.Node) {
            Node node = (Node) object;
            String sayString = node.getDisplayName();
            if (sayString != null) {
                return sayString;
            }
        }
        return "";
View Full Code Here


    }

    public class KeyHandler extends AbstractAction {

        public void actionPerformed(ActionEvent evt) {
            Node n = getNodeSelected();
            if (n == null) {
                return;
            }
           
            if (TextToSpeechOptions.isScreenReading()) {
                speech.speak(n.getDisplayName() + " " + n.getShortDescription(),
                        SpeechPriority.MEDIUM);
            }
            actionNode = n;
        }
View Full Code Here

    }

    public class LeftKeyHandler extends AbstractAction {

        public void actionPerformed(ActionEvent evt) {
            Node n = getNodeSelected();
            if (n == null) {
                return;
            }
            if (actionNode == n) {
                if (TextToSpeechOptions.isScreenReading()) {
                    String str1 = "Closing" + n.getDisplayName() + " " + n.getShortDescription();
                    speech.speak(str1, SpeechPriority.MEDIUM);
                }
            } else {
                if (TextToSpeechOptions.isScreenReading()) {
                    String str1 = n.getDisplayName() + " " + n.getShortDescription();
                    speech.speak(str1, SpeechPriority.MEDIUM);
                }
            }
            actionNode = getNodeSelected();
        }
View Full Code Here

    }

    public class RightKeyHandler extends AbstractAction {

        public void actionPerformed(ActionEvent evt) {
            Node n = getNodeSelected();
            if (n == null) {
                return;
            }
            if (n.getShortDescription().compareTo("Class") == 0) {
                if (TextToSpeechOptions.isScreenReading()) {
                    String str = "Opening" + n.getDisplayName() + " " + n.getShortDescription();
                    speech.speak(str, SpeechPriority.MEDIUM);
                }
            }
            actionNode = getNodeSelected();
        }
View Full Code Here

            if(o instanceof FileObject) {
                panelUI.setCurrentFileInEditor((FileObject)o);
            }
        }

        Node node = panelUI.resetModelToCurrentFile();
    }
View Full Code Here

            return null;
        }
        if (nodes.length != 1) {
            return null;
        }
        Node n = nodes[0];
        FileObject fo = (FileObject) n.getLookup().lookup(FileObject.class);
        if (fo == null) {
            DataObject dobj = (DataObject) n.getLookup().lookup(DataObject.class);
            if (dobj != null) {
                fo = dobj.getPrimaryFile();
            }
        }
        if (fo == null) {
            return null;
        }
        if (!isQuorumSource(fo)) {
            return null;
        }
        LineCookie lineCookie = (LineCookie) n.getCookie(LineCookie.class);
        if (lineCookie == null) {
            return null;
        }
        EditorCookie editorCookie = (EditorCookie) n.getCookie(EditorCookie.class);
        if (editorCookie == null) {
            return null;
        }
        JEditorPane jEditorPane = getEditorPane(editorCookie);
        if (jEditorPane == null) {
View Full Code Here

            return null;
        }
        if (nodes.length != 1) {
            return null;
        }
        Node n = nodes[0];
        FileObject fo = (FileObject) n.getLookup().lookup(FileObject.class);
        if (fo == null) {
            DataObject dobj = (DataObject) n.getLookup().lookup(DataObject.class);
            if (dobj != null) {
                fo = dobj.getPrimaryFile();
            }
        }
        return fo;
View Full Code Here

        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Node getNodeSelected() {
        Node[] nodes = mgr.getSelectedNodes();
        Node cNode = null;
        if (nodes != null) {
            if (nodes.length != 0) {
                if (nodes[0] instanceof CompilerNode) {
                    cNode = (CompilerNode) nodes[0];
                }
View Full Code Here

    protected Node createNodeForKey(KeyValueQueryContent key) {
        final Content content = key.getContent();
        final String queryStr = key.getQueryStr();;
        QueryResults hits = key.getHits();

        Node kvNode = new KeyValueNode(key, Children.LEAF, Lookups.singleton(content));

        //wrap in KeywordSearchFilterNode for the markup content, might need to override FilterNode for more customization
        // store the data in HighlightedMatchesSource so that it can be looked up (in content viewer)
        HighlightedTextMarkup highlights = new HighlightedTextMarkup(content, queryStr, !key.getQuery().isLiteral(), false, hits);
        return new KeywordSearchFilterNode(highlights, kvNode);
View Full Code Here

     * displays it in the TopComponet.
     */
    public void execute() {
        if(!map.isEmpty()) {
            Collection<AbstractFile> kvCollection = kvContents;
            Node rootNode = null;

            if (kvCollection.size() > 0) {
                Children childKeyValueContentNodes =
                        Children.create(new HashDbSearchResultFactory(kvCollection), true);

View Full Code Here

TOP

Related Classes of org.openide.nodes.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.