Mercurial > projects > dwt-addons
comparison dwtx/draw2d/TextUtilities.d @ 101:1082a0fc2bb8
First Draw2D example running
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 02:17:46 +0200 |
parents | 95307ad235d9 |
children |
comparison
equal
deleted
inserted
replaced
100:86617aa6b5dd | 101:1082a0fc2bb8 |
---|---|
31 public class TextUtilities { | 31 public class TextUtilities { |
32 | 32 |
33 /** | 33 /** |
34 * a singleton default instance | 34 * a singleton default instance |
35 */ | 35 */ |
36 public static TextUtilities INSTANCE; | 36 private static TextUtilities INSTANCE_; |
37 | 37 public static TextUtilities INSTANCE(){ |
38 static this(){ | 38 if( INSTANCE_ is null ){ |
39 INSTANCE = new TextUtilities(); | 39 synchronized( TextUtilities.classinfo ){ |
40 if( INSTANCE_ is null ){ | |
41 INSTANCE_ = new TextUtilities(); | |
42 } | |
43 } | |
44 } | |
45 return INSTANCE_; | |
40 } | 46 } |
41 | |
42 /** | 47 /** |
43 * Returns the Dimensions of <i>s</i> in Font <i>f</i>. | 48 * Returns the Dimensions of <i>s</i> in Font <i>f</i>. |
44 * | 49 * |
45 * @param s | 50 * @param s |
46 * the string | 51 * the string |