Changeset 142:7dca96709d29

Show
Ignore:
Timestamp:
08/07/08 11:23:25 (4 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix: remove trigger of Display creation in static ctors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • draw2d/UmlExample.d

    r135 r142  
    6060 
    6161public class UMLClassFigure : Figure { 
    62     public static Color classColor; 
    63     static this(){ 
    64         classColor = new Color(null,255,255,206); 
     62    private static Color classColor_; 
     63    public static Color classColor(){ 
     64        if( classColor_ is null ){ 
     65            classColor_ = new Color(null,255,255,206); 
     66        } 
     67        return classColor_; 
    6568    } 
    6669 
     
    104107 */ 
    105108public static void main(){ 
    106     Display d = Display.getCurrent(); 
     109    Display d = new Display(); 
    107110    final Shell shell = new Shell(d); 
    108111    shell.setSize(400, 400);