Class 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 Detail

      • messageSource

        @Autowired
        private org.springframework.context.MessageSource messageSource
      • locale

        @Autowired
        private Locale locale
      • dialogUtil

        @Autowired
        private DialogUtil dialogUtil
      • date

        @Autowired
        private Date date
      • context

        @Autowired
        private org.springframework.context.ApplicationContext context
      • shipService

        @Autowired
        private ShipService shipService
      • barrelShape

        private javafx.scene.shape.Path barrelShape
    • Constructor Detail

      • NoticeBoardContentProvider

        public NoticeBoardContentProvider()
    • 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 content
        proxy - 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 content
        proxy - 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:
      • shipWareObservable

        private javafx.beans.value.ObservableValue<java.lang.Boolean> shipWareObservable​(ViewChangeCityPlayerProxyJFX proxy)