package schedule;/* * 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 jonscheduler; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; import javafx.beans.property.SimpleStringProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import javafx.stage.Stage; /** * FXML Controller class * * @author jmiran03 */ public class WeeklyView_Controller implements Initializable { Stage stage; @FXML TableColumn columnTime; @FXML TableView tableView; public class TimeRow { private SimpleStringProperty time; public TimeRow(String time) { this.time = new SimpleStringProperty(time); } public String getTime() { return time.get(); } } private ObservableList dataList = FXCollections.observableArrayList( new TimeRow("7:00AM\n\n\n"), new TimeRow("8:00AM\n\n\n"), new TimeRow("9:00AM\n\n\n"), new TimeRow("10:00AM\n\n\n"), new TimeRow("11:00AM\n\n\n"), new TimeRow("12:00PM\n\n\n"), new TimeRow("1:00PM\n\n\n"), new TimeRow("2:00PM\n\n\n"), new TimeRow("3:00PM\n\n\n"), new TimeRow("4:00PM\n\n\n"), new TimeRow("5:00PM\n\n\n"), new TimeRow("6:00PM\n\n\n"), new TimeRow("7:00PM\n\n\n"), new TimeRow("8:00PM\n\n\n"), new TimeRow("9:00PM\n\n\n"), new TimeRow("10:00PM\n\n\n")); @Override public void initialize(URL url, ResourceBundle rb) { columnTime.setCellValueFactory( new PropertyValueFactory("time")); tableView.setItems(dataList); } }