Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package carsales.gui.model;
- import carsales.be.Car;
- import carsales.bll.BLLManager;
- import java.util.List;
- import javafx.collections.FXCollections;
- import javafx.collections.ObservableList;
- /**
- *
- * @author kenne
- */
- public class CarModel {
- BLLManager bm = new BLLManager();
- private ObservableList<Car> cars
- = FXCollections.observableArrayList();
- public ObservableList<Car> getCars() {
- return cars;
- }
- public void loadCars() {
- List<Car> loadedCars = bm.getAllCars();
- cars.clear();
- cars.addAll(loadedCars);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement