comparison dwtx/draw2d/FrameBorder.d @ 103:2d6540440fe6

Replace static ctors with lazy init.
author Frank Benoit <benoit@tionex.de>
date Sun, 03 Aug 2008 17:01:51 +0200
parents 95307ad235d9
children
comparison
equal deleted inserted replaced
102:0de61c6f08ca 103:2d6540440fe6
34 34
35 /** 35 /**
36 * The border scheme that determines the border highlight and shadow colors, as well as 36 * The border scheme that determines the border highlight and shadow colors, as well as
37 * the border width (3). 37 * the border width (3).
38 */ 38 */
39 protected static const SchemeBorder.Scheme 39 private static SchemeBorder.Scheme SCHEME_FRAME_;
40 SCHEME_FRAME; 40 protected static SchemeBorder.Scheme SCHEME_FRAME(){
41 static this(){ 41 if( SCHEME_FRAME_ is null ){
42 SCHEME_FRAME = new SchemeBorder.Scheme( 42 synchronized( FrameBorder.classinfo ){
43 [ 43 if( SCHEME_FRAME_ is null ){
44 SCHEME_FRAME_ = new SchemeBorder.Scheme(
45 [
44 ColorConstants.button, 46 ColorConstants.button,
45 ColorConstants.buttonLightest, 47 ColorConstants.buttonLightest,
46 ColorConstants.button 48 ColorConstants.button
47 ], 49 ],
48 [ 50 [
49 ColorConstants.buttonDarkest, 51 ColorConstants.buttonDarkest,
50 ColorConstants.buttonDarker, 52 ColorConstants.buttonDarker,
51 ColorConstants.button 53 ColorConstants.button
52 ] 54 ]
53 ); 55 );
56 }
57 }
58 }
59 return SCHEME_FRAME_;
54 } 60 }
55
56 private void instanceInit(){ 61 private void instanceInit(){
57 createBorders(); 62 createBorders();
58 } 63 }
59 64
60 /** 65 /**