Mercurial > projects > dwt-addons
comparison dwtx/draw2d/graph/Subgraph.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 |
---|---|
63 /** | 63 /** |
64 * The minimum space between this subgraph's border and it's children. | 64 * The minimum space between this subgraph's border and it's children. |
65 */ | 65 */ |
66 public Insets innerPadding; | 66 public Insets innerPadding; |
67 | 67 |
68 private static const Insets NO_INSETS; | 68 private static Insets NO_INSETS_; |
69 static this(){ | 69 private static Insets NO_INSETS(){ |
70 NO_INSETS = new Insets(); | 70 if( NO_INSETS_ is null ){ |
71 synchronized( Subgraph.classinfo ){ | |
72 if( NO_INSETS_ is null ){ | |
73 NO_INSETS_ = new Insets(); | |
74 } | |
75 } | |
76 } | |
77 assert( NO_INSETS_ ); | |
78 return NO_INSETS_; | |
71 } | 79 } |
80 | |
72 /** | 81 /** |
73 * Constructs a new subgraph with the given data object. | 82 * Constructs a new subgraph with the given data object. |
74 * @see Node#Node(Object) | 83 * @see Node#Node(Object) |
75 * @param data an arbitrary data object | 84 * @param data an arbitrary data object |
76 */ | 85 */ |