Mercurial > projects > dwt-addons
comparison dwtx/draw2d/RoutingAnimator.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 |
---|---|
35 * | 35 * |
36 * @since 3.2 | 36 * @since 3.2 |
37 */ | 37 */ |
38 public class RoutingAnimator : Animator , RoutingListener { | 38 public class RoutingAnimator : Animator , RoutingListener { |
39 | 39 |
40 static const RoutingAnimator INSTANCE; | 40 private static RoutingAnimator INSTANCE_; |
41 static this(){ | 41 static RoutingAnimator INSTANCE(){ |
42 INSTANCE = new RoutingAnimator(); | 42 if( INSTANCE_ is null ){ |
43 } | 43 synchronized( RoutingAnimator.classinfo ){ |
44 if( INSTANCE_ is null ){ | |
45 INSTANCE_ = new RoutingAnimator(); | |
46 } | |
47 } | |
48 } | |
49 return INSTANCE_; | |
50 } | |
51 | |
44 /** | 52 /** |
45 * Constructs a routing animator for use with one or more connections. The default | 53 * Constructs a routing animator for use with one or more connections. The default |
46 * instance ({@link #getDefault()} can be used on any number of connections. | 54 * instance ({@link #getDefault()} can be used on any number of connections. |
47 * | 55 * |
48 * @since 3.2 | 56 * @since 3.2 |