Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Renderer.java
- // Easel
- //
- // Created by Philip Rhodes on 7/21/05.
- // Copyright 2005 __MyCompanyName__. All rights reserved.
- //
- import java.awt.*;
- import java.awt.image.*;
- import javax.swing.*;
- /** This is the parent class of all Renderers. Currently, it just
- * holds a reference to a World object, but this will probably change.
- * In addition to the abstract methods defined below, child classes must
- * implement public void paintComponent(Graphics g)
- */
- public abstract class Renderer extends JPanel {
- protected World world;
- /** Create a renderer to render the shapes in the specified World */
- public Renderer(World w, boolean swingDoubleBuffered){
- super(swingDoubleBuffered);
- this.world = w;
- }
- /** We're hiding this constructor, because we don't need it.*/
- protected Renderer(LayoutManager l){
- }
- /** Perform any initialization necessary. */
- public void init(){}
- /** Render shapes in the World to 2D/*/
- public abstract void render();
- /** Erase the drawing surface of the renderer*/
- public abstract void clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment