Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package carsales.gui.model;
  7.  
  8. import carsales.be.Car;
  9. import carsales.bll.BLLManager;
  10. import java.util.List;
  11. import javafx.collections.FXCollections;
  12. import javafx.collections.ObservableList;
  13.  
  14. /**
  15. *
  16. * @author kenne
  17. */
  18. public class CarModel {
  19. BLLManager bm = new BLLManager();
  20. private ObservableList<Car> cars
  21. = FXCollections.observableArrayList();
  22.  
  23. public ObservableList<Car> getCars() {
  24. return cars;
  25. }
  26.  
  27. public void loadCars() {
  28. List<Car> loadedCars = bm.getAllCars();
  29.  
  30. cars.clear();
  31. cars.addAll(loadedCars);
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement