@Component public class DialogUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
DialogUtil.SailorOnShipBinding
Sailors on ship binding with min and max.
|
private class |
DialogUtil.SimpleSailorOnShipBinding
Sailors on ship binding.
|
| Modifier and Type | Field and Description |
|---|---|
private JavaFXUtils |
fxUtils |
private SelectiveCachableXMLImageLoader |
imageLoader |
private ch.sahits.game.openpatrician.utilities.l10n.Locale |
locale |
private org.apache.logging.log4j.Logger |
logger |
private org.springframework.context.MessageSource |
messageSource |
private ch.sahits.game.openpatrician.clientserverinterface.service.ShipService |
shipService |
private DecoratedTextFactory |
textFactory |
private org.springframework.oxm.Unmarshaller |
unmarshaller |
private ch.sahits.game.openpatrician.data.xmlmodel.WeaponLocations |
weaponLocations |
| Constructor and Description |
|---|
DialogUtil() |
| Modifier and Type | Method and 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(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.
|
private javafx.beans.property.ObjectProperty<DecoratedText> |
createWeaponStrength(ch.sahits.game.openpatrician.model.ship.IShip currentShip) |
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.
|
private javafx.scene.image.ImageView |
getShipDeck(ch.sahits.game.openpatrician.model.ship.EShipType shipType) |
private javafx.scene.image.ImageView |
getShipWeapon(ch.sahits.game.openpatrician.model.ship.IWeaponSlot weaponSlot) |
private ch.sahits.game.openpatrician.data.xmlmodel.BasicSlot |
getSlotModel(int id) |
private Source |
getSourceFromFile(String fileName) |
private javafx.scene.image.ImageView |
getWeaponPlaceHolder(ch.sahits.game.openpatrician.model.ship.ESide side) |
private void |
initilizeWeaponModel() |
int |
removeById(javafx.scene.layout.Pane parent,
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. |
private final org.apache.logging.log4j.Logger logger
@Autowired private JavaFXUtils fxUtils
@Autowired private ch.sahits.game.openpatrician.clientserverinterface.service.ShipService shipService
@Autowired private ch.sahits.game.openpatrician.utilities.l10n.Locale locale
@Autowired private org.springframework.context.MessageSource messageSource
@Autowired private DecoratedTextFactory textFactory
@Autowired @Qualifier(value="xmlImageLoader") private SelectiveCachableXMLImageLoader imageLoader
@Autowired @Qualifier(value="jaxb2XmlModelMarshaller") private org.springframework.oxm.Unmarshaller unmarshaller
private ch.sahits.game.openpatrician.data.xmlmodel.WeaponLocations weaponLocations
@PostConstruct private void initilizeWeaponModel()
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(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.private javafx.beans.property.ObjectProperty<DecoratedText> createWeaponStrength(ch.sahits.game.openpatrician.model.ship.IShip currentShip)
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,
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 - private javafx.scene.image.ImageView getShipDeck(ch.sahits.game.openpatrician.model.ship.EShipType shipType)
private javafx.scene.image.ImageView getWeaponPlaceHolder(ch.sahits.game.openpatrician.model.ship.ESide side)
private javafx.scene.image.ImageView getShipWeapon(ch.sahits.game.openpatrician.model.ship.IWeaponSlot weaponSlot)
private ch.sahits.game.openpatrician.data.xmlmodel.BasicSlot getSlotModel(int id)
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.