comparison dwtx/draw2d/TitleBarBorder.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 public class TitleBarBorder 35 public class TitleBarBorder
36 : AbstractLabeledBorder 36 : AbstractLabeledBorder
37 { 37 {
38 38
39 private static Color defaultColor; 39 private static Color defaultColor_;
40 private static Color defaultColor(){
41 if( defaultColor_ is null ){
42 synchronized( TitleBarBorder.classinfo ){
43 if( defaultColor_ is null ){
44 defaultColor_ = ColorConstants.menuBackgroundSelected;
45 }
46 }
47 }
48 return defaultColor_;
49 }
40 50
41 private int textAlignment; 51 private int textAlignment;
42 private Insets padding; 52 private Insets padding;
43 private Color fillColor; 53 private Color fillColor;
44
45 static this(){
46 defaultColor = ColorConstants.menuBackgroundSelected;
47 }
48 54
49 /** 55 /**
50 * Constructs a TitleBarBorder with its label set to the name of this class. 56 * Constructs a TitleBarBorder with its label set to the name of this class.
51 * 57 *
52 * @since 2.0 58 * @since 2.0