Class JavaFXUtils
- java.lang.Object
-
- ch.sahits.game.openpatrician.javafx.service.JavaFXUtils
-
@Component @Lazy public class JavaFXUtils extends java.lang.Object
Utility class facilitating some common tasks required by multiple components.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Dec 14, 2013
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
-
Constructor Summary
Constructors Constructor Description JavaFXUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addCellToGridPane(int rowNum, TableRow row, int col, ITableCell cell, javafx.scene.Node node, javafx.scene.layout.GridPane grid, javafx.geometry.HPos halignment)
Add a node to the grid pane with respect to the different constraints, that might be defined.void
addCellToGridPane(javafx.scene.layout.GridPane grid, int rowNum, TableRow row, int col, ITableCell cell, javafx.geometry.HPos hAlignment, java.lang.String textStyleClass)
Adding a table cell to the gridjavafx.scene.layout.GridPane
createGridPaneFromModel(Table model)
Create a grid pane from a supplied table model.MoneyTransfer
getMoneyTransfer(IDataImageLoader imageLoader)
Create a new instance for the money transfer.private int[]
mapColIndices(TableRow row)
-
-
-
Method Detail
-
addCellToGridPane
public void addCellToGridPane(javafx.scene.layout.GridPane grid, int rowNum, TableRow row, int col, ITableCell cell, javafx.geometry.HPos hAlignment, java.lang.String textStyleClass)
Adding a table cell to the grid- Parameters:
grid
- grid pant to which to add.rowNum
- row indexrow
- table rowcol
- column indexcell
- the node is pased onhAlignment
- horizontal alignmenttextStyleClass
- style class for the text
-
addCellToGridPane
private void addCellToGridPane(int rowNum, TableRow row, int col, ITableCell cell, javafx.scene.Node node, javafx.scene.layout.GridPane grid, javafx.geometry.HPos halignment)
Add a node to the grid pane with respect to the different constraints, that might be defined.- Parameters:
rowNum
- row indexrow
- table rowcol
- column indexcell
- the node is pased onnode
- node to be addedgrid
- grid pant to which to add.halignment
- horizontal alignment
-
createGridPaneFromModel
public javafx.scene.layout.GridPane createGridPaneFromModel(Table model)
Create a grid pane from a supplied table model.- Parameters:
model
- base model- Returns:
- grid pane
-
mapColIndices
private int[] mapColIndices(TableRow row)
-
getMoneyTransfer
public MoneyTransfer getMoneyTransfer(IDataImageLoader imageLoader)
Create a new instance for the money transfer.- Returns:
- new control for the money transfer.
-
-