Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TableMatchHistory
- {
- private ImageView Radiant;
- private ImageView Dire;
- public TableMatchHistory(ImageView Radiant,ImageView Dire)
- {
- this.Radiant = Radiant;
- this.Dire = Dire;
- }
- public TableMatchHistory() {}
- public ImageView getRadiant()
- {
- return Radiant;
- }
- public void setRadiant(ImageView Radiant)
- {
- this.Radiant = Radiant;
- }
- public ImageView getDire()
- {
- return Dire;
- }
- public void setDire(ImageView Dire)
- {
- this.Dire = Dire;
- }
- }
- public class Controller
- {
- private ObservableList<TableMatchHistory> MatchHistoryData =
- FXCollections.observableArrayList();
- @FXML
- TableView TableMatchHistory;
- @FXML
- private void initialize(){
- ImageView item_1 = new ImageView(new Image("/dota2-images-gh-pages/heroes_sb_59_33/abaddon_sb.png"));
- ImageView item_2 = new ImageView(new Image("/dota2-images-gh-pages/heroes_sb_59_33/alchemist_sb.png"));
- TableColumn Radiant = new TableColumn("Radiant");
- TableColumn Dire = new TableColumn("Dire");
- Radiant.setCellValueFactory(new PropertyValueFactory<TableMatchHistory, ImageView>("Radiant"));
- Dire.setCellValueFactory(new PropertyValueFactory<TableMatchHistory, ImageView>("Dire"));
- TableMatchHistory.setItems(MatchHistoryData);
- TableMatchHistory.getColumns().addAll(Radiant, Dire);
- MatchHistoryData.add(new TableMatchHistory(item_1, item_2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement