// ======================================================
// Thermodynamics package in java
//sogutmacevrimiModel1 class to calculate properties of refrigerants
// requires by user interface refTable(JApplet)
// Dr. Turhan Coban
// Ege University, Engineering Department
// Mechanical Engineering, 
// phone :
// email : turhan.coban@ege.edu.tr
// File Name   : sogut1Table.java
// requires    : sogut1.java, sogut1Table.java, sogut1Model.java
// =====================================================

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

class sogutmacevrimiModel2 extends AbstractTableModel
{
  Object[][] veri;
  String[] baslik={"Özellik ","Değer ","Birim"};
  sogutmacevrimi2 sc;

  public sogutmacevrimiModel2(String s1, double mv,
                          double ti[],double p1,double p2,
                          double Powi,double Patm)
  {
  sc=new sogutmacevrimi2(s1,mv,ti,p1,p2,Powi,Patm);   
  veri=sc.toString(s1,mv,ti,p1,p2,Powi,Patm); 
  }
  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(String s1, double mv,
                          double ti[],double p1,double p2,
                          double Powi,double Patm)
  {
  veri=sc.toString(s1,mv,ti,p1,p2,Powi,Patm); 
  }
  
  public boolean isCellEditable(int row, int col) {return true;}
}


