import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;

class ELBAModel extends AbstractTableModel
{
  Object[][] veri;
  String[] baslik={"            Name           ","Value","Units"};
  ELBA g;
  
  public ELBAModel()
  { g=new ELBA(11,300);
    veri=g.toString(1000,18,60,50);
  }
 
  public  ELBAModel(int Tipi,int Hi,int L,double Toda,double Tsugir, double Tsucik)
  {g=new ELBA(Tipi,Hi);
   veri=g.toString(L,Toda,Tsugir,Tsucik);
  }

  public int getRowCount() {return veri.length;}
  
  public int getColumnCount() {return baslik.length;}
  
  public Object getValueAt(int satir,int sutun) {return veri[satir][sutun];}
  
  public String getColumnName(int c) {return baslik[c];}

  public void setValueAt(Object val, int row, int col)
  {  veri[row][col] = val; }
  


  public void setValues(int Tipi,int Hi,int L,double Toda,double Tsugir, double Tsucik)
  {g=new ELBA(Tipi,Hi);
   veri=g.toString(L,Toda,Tsugir,Tsucik);
  }
    
  public boolean isCellEditable(int row, int col) {return true;}
}


