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

class Gmix1Model extends AbstractTableModel
{
  Object[][] veri;
  String[] baslik={"Property ","Value ","Units"};

  public Gmix1Model(Gmix1 g1,double T,double P)
  {
  double TK;
  if(g1.SI)  TK=T+273.0;
  else TK=T+459.67;
  veri=g1.toString1(TK,P);
  }

  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(Gmix1 g1,String unit,String si,double T,double P)
  {
  double TK;
  if(g1.SI)  TK=T+273.0;
  else TK=T+459.67;
  g1.unit(unit);
  g1.base(si);
  veri=g1.toString1(TK,P);
  }

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


