javaquery/canvas/src/main/java/org/apidesign/html/canvas/impl/CnvsAccssr.java
author Anton Epple <toni.epple@eppleton.de>
Thu, 26 Sep 2013 14:26:58 -0700
branchcanvas
changeset 1303 3d62ad46d744
parent 1302 e67363288df1
child 1308 e8429fba8cce
permissions -rw-r--r--
license fixes
toni@1303
     1
/**
toni@1303
     2
 * Back 2 Browser Bytecode Translator
toni@1303
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
toni@1303
     4
 *
toni@1303
     5
 * This program is free software: you can redistribute it and/or modify
toni@1303
     6
 * it under the terms of the GNU General Public License as published by
toni@1303
     7
 * the Free Software Foundation, version 2 of the License.
toni@1303
     8
 *
toni@1303
     9
 * This program is distributed in the hope that it will be useful,
toni@1303
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
toni@1303
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
toni@1303
    12
 * GNU General Public License for more details.
toni@1303
    13
 *
toni@1303
    14
 * You should have received a copy of the GNU General Public License
toni@1303
    15
 * along with this program. Look for COPYING file in the top folder.
toni@1303
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
toni@1303
    17
 */
toni@1302
    18
/*
toni@1302
    19
 * To change this template, choose Tools | Templates
toni@1302
    20
 * and open the template in the editor.
toni@1302
    21
 */
toni@1302
    22
package org.apidesign.html.canvas.impl;
toni@1302
    23
toni@1302
    24
import net.java.html.canvas.GraphicsContext;
toni@1302
    25
import net.java.html.canvas.spi.GraphicsEnvironment;
toni@1302
    26
toni@1302
    27
/**
toni@1302
    28
 *
toni@1302
    29
 * @author antonepple
toni@1302
    30
 */
toni@1302
    31
public abstract class CnvsAccssr {
toni@1302
    32
toni@1302
    33
    static CnvsAccssr DEFAULT;
toni@1302
    34
toni@1302
    35
    public CnvsAccssr() {
toni@1302
    36
        if (DEFAULT!=null) throw new IllegalStateException("Already initialized");
toni@1302
    37
        DEFAULT = this;
toni@1302
    38
    }
toni@1302
    39
toni@1302
    40
    public static CnvsAccssr getDefault() {
toni@1302
    41
        return DEFAULT;
toni@1302
    42
    }
toni@1302
    43
toni@1302
    44
    public abstract GraphicsContext create(GraphicsEnvironment environment);
toni@1302
    45
}