Package model

Examples of model.Stadion


    super.COLUMNS = COLUMNS;
  }
 
  @Override
  public Object getValueAt(int arg0, int arg1) {
    Stadion stadion = objects.get(arg0);
    switch(arg1) {
    case -1:
      return stadion.getId();
    case 0:
      return stadion.getNazwa();
    case 1:
      return stadion.getUlica();
    case 2:
      return stadion.getNr();
    case 3:
      return stadion.getMiejscowosc();
    case 4:
      return stadion.getKod();
    default:
      return 0;
    }
  }
View Full Code Here


  }
 
  @Override
  public void setValueAt(Object Value, int rowIndex, int columnIndex) {
   
    Stadion stadion = objects.get(rowIndex);
    switch(columnIndex) {
    case -1:
      stadion.setId((Long)Value);
      break;
    case 0:
      stadion.setNazwa((String)Value);
      break;
    case 1:
      stadion.setUlica((String)Value);
    case 2:
      stadion.setNr((Integer)Value);
    case 3:
      stadion.setMiejscowosc((String)Value);
    case 4:
      stadion.setKod((String)Value);
    }
    fireTableCellUpdated(rowIndex, columnIndex);
  }
View Full Code Here

    super(StadionTableModel.COLUMNS);
  }

  @Override
  public Stadion getObject() {
    Stadion stadion = new Stadion();
    stadion.setNazwa(((JTextField)textFields.get("nazwa")).getText());
    stadion.setMiejscowosc(((JTextField)textFields.get("miejscowosc")).getText());
    stadion.setUlica(((JTextField)textFields.get("ulica")).getText());
    stadion.setKod(((JTextField)textFields.get("kod")).getText());
    stadion.setNr(Integer.parseInt(((JTextField)textFields.get("nr")).getText()));
    return stadion;
  }
View Full Code Here

TOP

Related Classes of model.Stadion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.