Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/taskmanagement/EntitySaveManager.java

    r919 r1102  
    2424import java.util.Set;
    2525
    26 import javax.swing.SwingUtilities;
    27 
    2826
    2927/**
    30  * Manages time/resource-consuming saving procedures. For enties in an expeditee Frame that
     28 * Manages time/resource-consuming saving procedures. For entities in an expeditee Frame that
    3129 * requires heavy-duty saving, implement the entity as a SaveableEntity.
    3230 *
     
    135133         * Saves all current registered entities and clears registrations.
    136134         *
    137          * Returns immediatly.
     135         * Returns immediately.
    138136         */
    139137        public synchronized void saveAll() {
     
    167165        /**
    168166         * If something is saving, this will block the thread until all entities that
    169          * have been requested to be saved has finished their saving proccesses.
     167         * have been requested to be saved has finished their saving processes.
    170168         *
    171169         * @throws InterruptedException
     
    237235                                if (entity.doesNeedSaving()) {
    238236                                       
    239                                         // notify observers that save has started - on swing thread
    240                                         SwingUtilities.invokeLater(new SafeFireEvent(entity, true));
     237                                        // notify observers that save has started
     238                                        (new SafeFireEvent(entity, true)).run();
    241239       
    242240                                        // Complete the save
     
    248246       
    249247                                        // notify observers that save has finished - on swing thread
    250                                         SwingUtilities.invokeLater(new SafeFireEvent(entity, false));
     248                                        (new SafeFireEvent(entity, false)).run();
    251249                                }
    252250                        }
     
    254252               
    255253                /**
    256                  * Notifies all listners of save start/completion event when run.
     254                 * Notifies all listeners of save start/completion event when run.
    257255                 *
    258256                 * @author Brook Novak
Note: See TracChangeset for help on using the changeset viewer.