package iDSS.disp;

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.awt.image.*;

import iDSS.gridDisp.*;


public class ImageDisplay extends DisplayFrame {

    private DrawingPanel2 drawingArea;

    private int drawingAreaX = 400;
    private int drawingAreaY = 400;


    public ImageDisplay (String title,int width,int height) {

        super(title,true,true,true,true,null,width,height);

        System.out.println("Creating ImageDisplay, width, height : " + width + ", " + height);

        setSize(width,height);

        System.out.println("Created ImageDisplay size: width, height : " + getWidth() + ", " + getHeight());

        drawingArea = new DrawingPanel2(width,height);
        JScrollPane scrollPane = new JScrollPane(drawingArea);
        JPanel panel = new JPanel();
        panel.add(scrollPane);

        getContentPane().add(panel);
        pack();
        setVisible(true);

    } //public ImageDisplay (Grid aGrid)





    public BufferedImage getCanvas() {

        return drawingArea.getCanvas();

    } //public BufferedImage getCanvas()




    public void refreshCanvas(BufferedImage bi) {

        drawingArea.refreshCanvas(bi);

    } //public void refreshCanvas(BufferedImage bi)





} //public class ImageDisplay extends DisplayFrame
