// ======================================================
// Thermodynamics package in java
// steamModelT türkçe buhartablosu steamTableT(JApplet)
// tarafından kullanılan bir arayüzdür
// Dr. Turhan Coban
// TÜBİTAK Ulusal Metroloji Enstitüsü
//
// phone : 90(262)6795013
// email : turhan.coban@ume.tubitak.gov.tr
// File Name   : steamTable.java
// requires    : steam.java, steamTable.java
// =====================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;

class steamModelT extends AbstractTableModel
{
  Object[][] veri;
  String[] baslik={"Özellik ","Değer","Birim"};
  steamT st=new steamT();

  public steamModelT(String unit,String s,double v1,double v2)
  {
  st.setUnit(unit);
  veri=st.toString(s,v1,v2);
  }

  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 unit,String s,double v1,double v2)
  {
  st.setUnit(unit);
  veri=st.toString(s,v1,v2);
  }

  public boolean isCellEditable(int row, int col) {return true;}
}


