/*
 * UtilityModel.java
 *
 * Created on Ketvirtadienis, 2007, Sausio 25, 17.14
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Main.data;

import java.util.*;
import javax.swing.table.*;

public class UtilityModel extends AbstractTableModel
{
	private double[][] mData;
	static final public String columns[] = {""};
    static final public int initLengths[] = {20};
    static final public int NUM_COLUMNS = columns.length;
	
	public UtilityModel()
	{
		super();
        //setDefaultList();
	}
	
	public double[][] getData()
	{return mData;}
    	
	public void setData(double[][] data)
	{
		mData= data;
		
	}
    	
    public Object getValueAt(int row,int col)
	{
	        if (row < 0 || row>=getRowCount())
	            return "";
	        
			return new Double(mData[row][col]); 			
	    }
	
    public  void  setValueAt ( Object object, int row, int col )
    {
		return;        
	}

	public int getRowCount()
	{
		return mData.length;
	}
	
	public int getColumnCount()
	{
		return mData[0].length; 
	}
	
	public boolean isCellEditable(int row, int col)
    {
		return false;
    }
	
   	
    	
}

