48 lines
1.1 KiB
Java
48 lines
1.1 KiB
Java
/**
|
|
* <PRE>
|
|
* CBgLayer.java
|
|
*
|
|
* Revisions: 1.0 Nov. 24, 2002
|
|
* Created the CBgLayer class
|
|
*
|
|
* </PRE>
|
|
*
|
|
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
|
* @version Version 1.0, Nov. 24, 2002
|
|
*/
|
|
|
|
import javax.swing.*;
|
|
|
|
public class CBgLayer extends JPanel{
|
|
CEngine cEngine;
|
|
|
|
public CBgLayer(String fileName){
|
|
cEngine = new CEngine(fileName);
|
|
}
|
|
|
|
protected void paintComponent(Graphics g){
|
|
super.paintComponent(g);
|
|
int w = WIDTH / cEngine.cBgLayer.length;
|
|
int h = HEIGHT / cEngine.cBgLayer[0].length;
|
|
|
|
for(int x=0; x<cEngine.cBgLayer.length; x++){
|
|
for(int y=0; y<cEngine.cBgLayer[x].length; y++){
|
|
if(cEngine.cBgLayer[x][y].getZ() == 2){
|
|
fillrect(
|
|
|
|
}
|
|
|
|
/**
|
|
* Debugging main for class CBgLayer.
|
|
* This method will rigorously test my code.
|
|
*
|
|
* <br><br>
|
|
* @param args a String array of command line arguments.
|
|
*/
|
|
public static void main(String[] args) {
|
|
|
|
|
|
}// end of main(String[] args)
|
|
|
|
}// end of class CBgLayer
|