javaquery/canvas/src/main/java/org/apidesign/html/canvas/impl/CnvsAccssr.java
author Anton Epple <toni.epple@eppleton.de>
Thu, 26 Sep 2013 14:20:18 -0700
branchcanvas
changeset 1302 e67363288df1
child 1303 3d62ad46d744
permissions -rw-r--r--
refactoring for API review
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 package org.apidesign.html.canvas.impl;
     6 
     7 import net.java.html.canvas.GraphicsContext;
     8 import net.java.html.canvas.spi.GraphicsEnvironment;
     9 
    10 /**
    11  *
    12  * @author antonepple
    13  */
    14 public abstract class CnvsAccssr {
    15 
    16     static CnvsAccssr DEFAULT;
    17 
    18     public CnvsAccssr() {
    19         if (DEFAULT!=null) throw new IllegalStateException("Already initialized");
    20         DEFAULT = this;
    21     }
    22 
    23     public static CnvsAccssr getDefault() {
    24         return DEFAULT;
    25     }
    26 
    27     public abstract GraphicsContext create(GraphicsEnvironment environment);
    28 }