Changeset 1106 for trunk


Ignore:
Timestamp:
09/05/18 12:44:05 (6 years ago)
Author:
bln4
Message:

org.expeditee.gio.EcosystemManager ->
org.expeditee.gui.DisplayController ->

Added some security code to ensure that the Ecosystem had finished initialising before using it.

Location:
trunk/src/org/expeditee
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gio/EcosystemManager.java

    r1097 r1106  
    209209                return _dndManager;
    210210        }
     211       
     212        /** Returns true once all managers are instantiated. */
     213        public static boolean IsEcosystemReady() {
     214                return _type != null && _clipboardManager != null && _imageManager != null &&
     215                                _graphicsManager != null && _fontManager != null && _textLayoutManager != null &&
     216                                _inputManager != null && _miscManager != null && _dndManager != null;
     217        }
    211218}
  • trunk/src/org/expeditee/gui/DisplayController.java

    r1098 r1106  
    14051405                {
    14061406                        try {
    1407                                 refresh(_useInvalidation);
     1407                                if(EcosystemManager.IsEcosystemReady()) refresh(_useInvalidation);
    14081408                        } catch (Throwable e) {
    14091409                                e.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.