Package net.sf.jabref

Examples of net.sf.jabref.EntryEditor$ExternalViewerListener


    // construct an EntryEditor ...
    JabRef jabref = TestUtils.getInitializedJabRef();
    BibtexEntry bibtexEntry = new BibtexEntry();
    bibtexEntry.setField("author", "Brigitte Laurant");
    FieldEditor authorTextField = new FieldTextArea("author", "Hans Meiser");
    EntryEditor editor = new EntryEditor(jabref.jrf, jabref.jrf.basePanel(), bibtexEntry);
    // perform action ...
    editor.storeFieldAction.actionPerformed(new ActionEvent(authorTextField, 0, ""));
    // test content of stored words in autocompleter ...
    AbstractAutoCompleter autoCompleter = jabref.jrf.basePanel().getAutoCompleter("author");
    assertTrue(autoCompleter.indexContainsWord("Hans Meiser"));
View Full Code Here


    // construct an EntryEditor ...
    JabRef jabref = TestUtils.getInitializedJabRef();
    BibtexEntry bibtexEntry = new BibtexEntry();
    bibtexEntry.setField("journal", "Testtext");
    FieldEditor authorTextField = new FieldTextArea("journal", "New Testtext");
    EntryEditor editor = new EntryEditor(jabref.jrf, jabref.jrf.basePanel(), bibtexEntry);
    // perform action ...
    editor.storeFieldAction.actionPerformed(new ActionEvent(authorTextField, 0, ""));
    // test content of stored words in autocompleter ...
    AbstractAutoCompleter autoCompleter = jabref.jrf.basePanel().getAutoCompleter("journal");
    assertTrue(autoCompleter.indexContainsWord("New Testtext"));
View Full Code Here

            // Ok, we have a single new entry that has been selected. Now decide what to do with it:
            final BibtexEntry toShow = (BibtexEntry) newSelected;
            final int mode = panel.getMode(); // What is the panel already showing?
            if ((mode == BasePanel.WILL_SHOW_EDITOR) || (mode == BasePanel.SHOWING_EDITOR)) {
                // An entry is currently being edited.
                EntryEditor oldEditor = panel.getCurrentEditor();
                String visName = null;
                if (oldEditor != null) {
                    visName = oldEditor.getVisiblePanelName();
                }
                // Get an old or new editor for the entry to edit:
                EntryEditor newEditor = panel.getEntryEditor(toShow);

                if ((oldEditor != null))// && (oldEditor != newEditor))
                    oldEditor.setMovingToDifferentEntry();

                // Show the new editor unless it was already visible:
                if ((newEditor != oldEditor) || (mode != BasePanel.SHOWING_EDITOR)) {
                   
                    if (visName != null)
                        newEditor.setVisiblePanel(visName);
                    panel.showEntryEditor(newEditor);
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            table.ensureVisible(table.getSelectedRow());
                        }
View Full Code Here

        }
    }

    public void editSignalled(BibtexEntry entry) {
        final int mode = panel.getMode();
        EntryEditor editor = panel.getEntryEditor(entry);
        if (mode != BasePanel.SHOWING_EDITOR) {
            panel.showEntryEditor(editor);
            panel.adjustSplitter();
        }
        new FocusRequester(editor);
View Full Code Here

TOP

Related Classes of net.sf.jabref.EntryEditor$ExternalViewerListener

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.