Changeset 9113


Ignore:
Timestamp:
2005-02-18T16:08:46+13:00 (19 years ago)
Author:
kjdon
Message:

added right click option to create a new dummy doc in colleciton tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r9108 r9113  
    481481    private JMenuItem metaaudit = null;
    482482    private JMenuItem new_folder = null;
     483    private JMenuItem new_dummy_doc = null;
    483484    private JMenuItem open_externally = null;
    484485
     
    553554    private void buildContextMenu(TreePath[] selection_paths)
    554555    {
    555         // If nothing is selected, only the new folder option is available...
     556        // If nothing is selected, only the new folder/dummy doc options are available...
    556557        if (selection_paths == null) {
    557558        // ... but only in the collection tree!
     
    560561            new_folder.addActionListener(this);
    561562            add(new_folder);
     563
     564            new_dummy_doc = new JMenuItem(Dictionary.get("CollectionPopupMenu.New_Dummy_Doc"));
     565            new_dummy_doc.addActionListener(this);
     566            add(new_dummy_doc);
    562567
    563568            node = (CollectionTreeNode) tree.getModel().getRoot();
     
    620625        }
    621626
    622         // New folder option, for collection tree only
     627        // New folder/dummy doc options, for collection tree only
    623628        if (tree == collection_tree && !node.isReadOnly()) {
    624629        new_folder = new JMenuItem(Dictionary.get("CollectionPopupMenu.New_Folder"), KeyEvent.VK_N);
    625630        new_folder.addActionListener(this);
    626631        add(new_folder);
     632        new_dummy_doc = new JMenuItem(Dictionary.get("CollectionPopupMenu.New_Dummy_Doc"));
     633        new_dummy_doc.addActionListener(this);
     634        add(new_dummy_doc);
    627635        }
    628636
     
    705713        Gatherer.f_man.newFolder(tree, (CollectionTreeNode) node);
    706714        }
    707 
     715        // New dummy doc
     716        else if (source == new_dummy_doc) {
     717        Gatherer.f_man.newDummyDoc(tree, (CollectionTreeNode) node);
     718        }
    708719        // Open in external program
    709720        else if (source == open_externally) {
Note: See TracChangeset for help on using the changeset viewer.