Changeset 11629


Ignore:
Timestamp:
2006-04-07T17:12:28+12:00 (18 years ago)
Author:
mdewsnip
Message:

Kissed the horrible TreeSynchronizer goodbye.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
1 deleted
4 edited

Legend:

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

    r11627 r11629  
    5050import org.greenstone.gatherer.metadata.MetadataXMLFileManager;
    5151import org.greenstone.gatherer.util.DragGroup;
    52 import org.greenstone.gatherer.util.TreeSynchronizer;
    5352
    5453
     
    8079    /** The metadata value tree shows the metadata values that are currently assigned to a metadata element. */
    8180    private MetadataValueTreePane metadata_value_tree_pane = null;
    82     /** Provide synchronization between the collection trees in this view and the collection pane view. */
    83     private TreeSynchronizer collection_tree_sync = null;
    84 
    85 
    86     /** Constructor.
    87      * @param tree_sync The <strong>TreeSynchronizer</strong> to be used on the collection tree
    88      */
    89     public EnrichPane(TreeSynchronizer collection_tree_sync)
    90     {
    91     this.collection_tree_sync = collection_tree_sync;
    92 
     81
     82
     83    public EnrichPane()
     84    {
    9385    // Create the metadata value tree pane
    9486    metadata_value_tree_pane = new MetadataValueTreePane();
     
    247239    collection_filter.setEnabled(collection_loaded);
    248240
    249     // Ensure that this collection tree view is synchronized with all others
    250     collection_tree_sync.add(collection_tree);
    251 
    252241    // Force the metadata table to be rebuilt (for switching extracted metadata on or off)
    253242    if (refresh_reason == Gatherer.PREFERENCES_CHANGED) {
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r11628 r11629  
    6262import org.greenstone.gatherer.util.JarTools;
    6363import org.greenstone.gatherer.util.StaticStrings;
    64 import org.greenstone.gatherer.util.TreeSynchronizer;
    6564import org.greenstone.gatherer.util.Utility;
    6665
     
    9998    /** A threaded tab changer to try and avoid NPE on exit. */
    10099    private TabUpdater tab_updater = null;
    101     /** Ensures that expansion events between like collection trees are synchronized. */
    102     private TreeSynchronizer collection_tree_sync = null;
    103100
    104101
     
    111108    this.help = new HelpFrame();
    112109    this.size = size;
    113     this.collection_tree_sync = new TreeSynchronizer();
    114110   
    115111    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
     
    343339        }
    344340
    345         gather_pane = new GatherPane(collection_tree_sync);
     341        gather_pane = new GatherPane();
    346342        gather_pane.display();
    347343        if (Configuration.get("workflow.gather", true)) {
     
    351347        }
    352348
    353         enrich_pane = new EnrichPane(collection_tree_sync);
     349        enrich_pane = new EnrichPane();
    354350        enrich_pane.display();
    355351        if (Configuration.get("workflow.enrich", true)) {
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r11627 r11629  
    6262import org.greenstone.gatherer.util.DragGroup;
    6363import org.greenstone.gatherer.util.JarTools;
    64 import org.greenstone.gatherer.util.TreeSynchronizer;
    6564import org.greenstone.gatherer.util.Utility;
     65
    6666
    6767/** The collection pane is analogous with a file manager. It is there that the user chooses which files to include in their collection and what structure the file hierarchy should take. The later aspect is not important for the Greenstone Suite, but is usefull for grouping files for ease of metadata markup. The view essentially consists of two file trees, one denoting the entire source workspace and the other the files within your collection. The trees themselves have a title bar at the top, a filter control at the bottom, and are coloured to indicate activity (grey for disabled). The remainder of the screen is taken by a status area, to indicate current file job progress during copying etc, and three buttons for controlling features of the view.
     
    107107    /** A split pane seperating the two trees, allowing for the screen real-estate for each to be changed. */
    108108    private JSplitPane tree_pane          =  null;
    109     /** Ensures that expansion and selection events between collection trees based on the same model are synchronized. */
    110     private TreeSynchronizer collection_tree_sync = null;
    111109    /** The minimum size a gui component can become. */
    112110    static private Dimension MIN_SIZE   = new Dimension( 90,  90);
     
    120118
    121119
    122     /* Constructor.
    123      * @param tree_sync Ensures that expansion events between like trees are synchronized.
    124      * @see org.greenstone.gatherer.file.FileManager
    125      * @see org.greenstone.gatherer.file.FileQueue
    126      */
    127     public GatherPane(TreeSynchronizer collection_tree_sync) {
     120    public GatherPane()
     121    {
    128122    this.group = new DragGroup();
    129123    this.file_queue = Gatherer.f_man.getQueue();
    130     this.collection_tree_sync = collection_tree_sync;
    131124
    132125    // Create components.
     
    387380    collection_filter.setEnabled(collection_loaded);
    388381    new_folder.setEnabled(collection_loaded);
    389 
    390     // Ensure that this collection tree view is synchronized with all others
    391     collection_tree_sync.add(collection_tree);
    392382    }
    393383
  • trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java

    r11628 r11629  
    4949import org.greenstone.gatherer.gui.SimpleMenuBar;
    5050import org.greenstone.gatherer.gui.ModalDialog;
    51 import org.greenstone.gatherer.util.TreeSynchronizer;
     51
    5252
    5353/** The MetaAuditFrame provides a table view of all of the metadata assigned to a selection of CollectionTreeNodes. All values for a certain file and a certain metadata element appear in the same cell. This table can be sorted by any column, and also has a MS Excel-like AutoFilter allowing you to restrict the rows visible to only those that match a certain set of criteria (applied to each column, and then 'ANDED', or cojoined, to determine the filter). Finally this dialog does not block the Gatherer tool, so the file selection can be changed and the dialog will just generate a new table dynamically.<BR>
Note: See TracChangeset for help on using the changeset viewer.