Class NoticeBoardContentProvider
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.notice.NoticeBoardContentProvider
-
public class NoticeBoardContentProvider extends java.lang.Object
Service to provide content for the noticeboard in the form of nodes.- Author:
- Andi Hotz, (c) Sahits GmbH, 2018 Created on Jul 17, 2018
-
-
Field Summary
Fields Modifier and Type Field Description private BarrelConfiguration
barrelConfiguration
private javafx.scene.shape.Path
barrelShape
private org.springframework.context.ApplicationContext
context
private Date
date
private DialogUtil
dialogUtil
private IDataImageLoader
imageLoader
private Locale
locale
private org.springframework.context.MessageSource
messageSource
private ShipService
shipService
private ModelTranslations
translations
-
Constructor Summary
Constructors Constructor Description NoticeBoardContentProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.layout.Region
createContent(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create the content to be placed in the notice boards scroll pane.javafx.scene.layout.Region
createHeader(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create the header node for to be placed in the notice boards head.javafx.beans.value.ObservableValue<?>
createObservable(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create an observable to which an change listener can be subscribed that indicates, that the header and content need updating.private javafx.scene.layout.Region
createShipWareInfoContent(ViewChangeCityPlayerProxyJFX proxy)
private javafx.scene.layout.Region
createShipWareInfoHeader(ViewChangeCityPlayerProxyJFX proxy)
Right side barrel, with capacity, loaded and ocupied by weapons and passangers.private void
init()
private javafx.beans.value.ObservableValue<java.lang.Boolean>
shipWareObservable(ViewChangeCityPlayerProxyJFX proxy)
-
-
-
Field Detail
-
imageLoader
@Autowired private IDataImageLoader imageLoader
-
messageSource
@Autowired private org.springframework.context.MessageSource messageSource
-
locale
@Autowired private Locale locale
-
dialogUtil
@Autowired private DialogUtil dialogUtil
-
translations
@Autowired private ModelTranslations translations
-
date
@Autowired private Date date
-
barrelConfiguration
@Autowired private BarrelConfiguration barrelConfiguration
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
shipService
@Autowired private ShipService shipService
-
barrelShape
private javafx.scene.shape.Path barrelShape
-
-
Method Detail
-
init
@PostConstruct private void init()
-
createHeader
public javafx.scene.layout.Region createHeader(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create the header node for to be placed in the notice boards head.- Parameters:
type
- for which to create the header.proxy
- of the current state.- Returns:
- Node representing the header.
-
createContent
public javafx.scene.layout.Region createContent(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create the content to be placed in the notice boards scroll pane.- Parameters:
type
- for which to create the contentproxy
- of the current state- Returns:
- Node representing the content.
-
createObservable
public javafx.beans.value.ObservableValue<?> createObservable(ENoticeBoardType type, ViewChangeCityPlayerProxyJFX proxy)
Create an observable to which an change listener can be subscribed that indicates, that the header and content need updating.- Parameters:
type
- for which to create the contentproxy
- of the current state- Returns:
- Observable
-
createShipWareInfoHeader
private javafx.scene.layout.Region createShipWareInfoHeader(ViewChangeCityPlayerProxyJFX proxy)
Right side barrel, with capacity, loaded and ocupied by weapons and passangers. Left Side: - Auto trade icon, ship/convoy Ship name - sailing duration/status icon/ destination - DialogUtil#createShipInfoOnThreeLines(javafx.beans.property.ObjectProperty)- Parameters:
proxy
-- Returns:
-
createShipWareInfoContent
private javafx.scene.layout.Region createShipWareInfoContent(ViewChangeCityPlayerProxyJFX proxy)
-
shipWareObservable
private javafx.beans.value.ObservableValue<java.lang.Boolean> shipWareObservable(ViewChangeCityPlayerProxyJFX proxy)
-
-