GraphicsApplet.java :  » Game » sf-library » com » studiofortress » sf » graphics » display » Java Open Source

Java Open Source » Game » sf library 
sf library » com » studiofortress » sf » graphics » display » GraphicsApplet.java

package com.studiofortress.sf.graphics.display;

import java.applet.Applet;

/**
 * This is a GraphicsDisplay for Applets. The Applet being used should pass
 * itself in to create the GraphicsDisplay.
 *
 * @author Joseph Lenton
 * @param <A> The subclass of Applet (or Applet itself) that this will wrap.
 */
public class GraphicsApplet<A extends Applet> extends GraphicsWrapper<A>
{
    /**
     * The same as the other constructor, only this will use the same width and
     * height as the given applet.
     * @param applet
     */
    public GraphicsApplet(A applet)
    {
        this(applet, applet.getWidth(), applet.getHeight());
    }

    /**
     *
     * @param applet
     * @param width
     * @param height
     * @deprecated Because the width and height should always be equal to the applets width and height!
     */
    public GraphicsApplet(A applet, int width, int height)
    {
        super(applet, width, height);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.