Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     [Bindable]
  4.     public class PropertyEditorSingleton
  5.     {
  6.         private static var _instance:PropertyEditorSingleton = null;
  7.        
  8.  
  9.         public var menuTextColor:uint = 0;
  10.         public var bgColor:uint = 3355443;
  11.         public var titleColor:uint = 6710886;
  12.         private var _colorLogoAlpha:Number = 0;
  13.        
  14.        
  15.        
  16.         public function PropertyEditorSingleton(enforcer:SingletonEnforcer)
  17.         {
  18.             if(enforcer == null)
  19.                 throw new Error("PropertyEditorSingleton is a singleton class, use getInstance() instead");
  20.         }
  21.    
  22.  
  23.         public static function getInstance():PropertyEditorSingleton
  24.         {
  25.             if(_instance == null){
  26.                 _instance = new PropertyEditorSingleton(new SingletonEnforcer);            
  27.             }
  28.             return _instance;
  29.         }
  30.        
  31.     }
  32. }
  33.  
  34. internal class SingletonEnforcer {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement