/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package util;

import java.io.*;
import java.util.*;

public class PageData implements Serializable{
    ArrayList ContainerList=null;
    ViewData viewData=null;
    private UndoDrawManager undoDrawManager=null;
    static int debug=0;
    
    public PageData(ArrayList containerList, ViewData viewData, UndoDrawManager undoManager){
        this.ContainerList=containerList;
        this.viewData=viewData;
        this.undoDrawManager=undoManager;
        if(debug>0) System.out.println("** PageData new UndoDrawManager="+
                this.undoDrawManager.toString());
    }

    public void setContainerList(ArrayList containerList){
        this.ContainerList=containerList;
    }
    
    public void setViewData(ViewData viewData){
        this.viewData=viewData;
    }

    public UndoDrawManager getUndoDrawManager(){
        if(this.undoDrawManager==null) System.err.println("*** Error  PageData.undoDrawManager=null");
        return this.undoDrawManager;
    }

    public String toString(){
        int size=ContainerList.size();
        String str="";
        str="Num. of shapes="+size;
        str+="\n  - viewData: "+this.viewData.toString();

        return str;
    }   
    
}