@Component
public class DialogUtil
extends java.lang.Object
| Constructor | Description |
|---|---|
DialogUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
javafx.scene.layout.Pane |
center(javafx.scene.control.Control childNode) |
Create an element that will layout the
childNode
horizontally centered within a Dialog. |
javafx.scene.layout.Pane |
center(javafx.scene.image.ImageView childNode) |
Create an element that will layout the
childNode
horizontally centered within a Dialog. |
javafx.scene.Group |
center(javafx.scene.layout.Pane childNode) |
Create an element that will layout the
childNode
horizontally centered within a Dialog. |
javafx.scene.layout.GridPane |
createGridPaneFromModel(ch.sahits.game.openpatrician.javafx.model.Table model) |
Create a grid pane based on a model.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
createNextActionForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip) |
Navigate to the next ship in the catalogue.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
createPreviousActionForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip) |
Navigate to the previous ship in the catalogue.
|
javafx.scene.layout.GridPane |
createShipInfoOnThreeLines(javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip) |
Create the grid pane for the ship information on three lines.
|
javafx.scene.layout.GridPane |
createShipSelection3LinesForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip) |
Create the grid pane for the ship selection on three lines.
|
javafx.scene.layout.Pane |
createShipWeaponDisplay(ch.sahits.game.openpatrician.model.ship.IShip ship) |
Create the weapon display with all weapons and place holders.
|
javafx.scene.Node |
createVerticalSpacer(int heigth) |
Create a Node that forces vertical spacing.
|
javafx.beans.binding.BooleanBinding |
enableShipCatalogueForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships) |
Boolean binding for the navigation enabling of the ships cataloque.
|
int |
removeById(javafx.scene.layout.Pane parent,
java.lang.String id) |
Remove a node identified by
id from the parent
and return the index. |
javafx.scene.layout.Pane |
right(javafx.scene.control.Control childNode) |
Create an element that will layout the
childNode
at the right dialog content border. |
javafx.scene.Group |
right(javafx.scene.layout.Pane childNode) |
Create an element that will layout the
childNode
at the right dialog content border. |
public javafx.beans.binding.BooleanBinding enableShipCatalogueForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships)
ships - to be observed.public javafx.event.EventHandler<javafx.scene.input.MouseEvent> createNextActionForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip)
ships - in the selectioncurrentShip - current shippublic javafx.event.EventHandler<javafx.scene.input.MouseEvent> createPreviousActionForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip)
ships - in the selectioncurrentShip - current shippublic javafx.scene.layout.GridPane createGridPaneFromModel(ch.sahits.game.openpatrician.javafx.model.Table model)
model - base modelpublic javafx.scene.layout.GridPane createShipSelection3LinesForShips(javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> ships,
javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip)
ships.
+----------+-------------+-------------+-------------+-----------+
| ship type and name |
|prevShip | weapon icon | health icon | sailor icon | nextShip|
| |weapon amount| health | no. sailors | |
+----------+-------------+-------------+-------------+-----------+
ships - observable list of ships through which is to be navigated.currentShip - container to store the currently selected ship. The value will be set as par of the execution.public javafx.scene.layout.GridPane createShipInfoOnThreeLines(javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip)
+------------+-------------+-------------+-------------+
| ship type and name |
| knot icon | weapon icon | health icon | sailor icon |
| |weapon amount| health | no. sailors |
+------------+-------------+-------------+-------------+
currentShip - container to store the currently selected ship. The value will be set as par of the execution.public javafx.scene.layout.Pane center(javafx.scene.control.Control childNode)
childNode
horizontally centered within a Dialog.childNode - that should be centeredpublic javafx.scene.layout.Pane center(javafx.scene.image.ImageView childNode)
childNode
horizontally centered within a Dialog.childNode - that should be centeredpublic javafx.scene.Group center(javafx.scene.layout.Pane childNode)
childNode
horizontally centered within a Dialog.childNode - that should be centeredpublic javafx.scene.Group right(javafx.scene.layout.Pane childNode)
childNode
at the right dialog content border.childNode - that should be right aligned.public javafx.scene.layout.Pane right(javafx.scene.control.Control childNode)
childNode
at the right dialog content border.childNode - that should be right aligned.public javafx.scene.Node createVerticalSpacer(int heigth)
heigth - of the spacing node.heigth.public int removeById(javafx.scene.layout.Pane parent,
java.lang.String id)
id from the parent
and return the index.parent - containing the nodeid - of the idpublic javafx.scene.layout.Pane createShipWeaponDisplay(ch.sahits.game.openpatrician.model.ship.IShip ship)
ship - for which to create the weapon displayCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.