Class OpenPatricianNoticeBoard

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget

    public class OpenPatricianNoticeBoard
    extends NoticeBoard
    Actual implementation of the notice board. The updating of the board happens through the client side asynchronous event bus.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void clearNoticeBoardOfSceneTiedMenu​(ViewChangeCityPlayerProxyJFX proxy)
      Clean out all menu entries that are tied to a scene.
      private void disableNavigationItems()  
      private void enableNavigationItems()  
      void handleCloseNoticeBoard​(NoticeBoardClose event)
      Event handler for removing the content of the notice board.
      void handleDayChange​(ClockTickPostDayChange event)
      Handle the day change event to update the notice board.
      void handleNavigationChange​(NavigationStateChange event)  
      void handleNoticeBoardClosePersistent​(NoticeBoardPersistentClose event)  
      void handleNoticeBoardUpdate​(NoticeBoardUpdate event)
      Event handler for updating the notice board
      void handlePersonLeaves​(PersonLeavesTavernEvent event)
      Update the notice board when a person leaves
      private void initializeEventRegistration()  
      private void initializeMenuProvider()  
      private ENoticeBoardType map​(EViewChangeEvent viewChange)
      Map the view change event to a notice board destinction.
      private EDialogType map​(IPerson person)  
      private void unregister()  
      private void updateAfterStackClearing​(ViewChangeCityPlayerProxyJFX proxy, boolean needsUpdate)
      Update the view of the notice board after the menu stack was cleared.
      void updateDisplayMessages​(DisplayMessage message)  
      private void updateNoticeBoard​(ViewChangeCityPlayerProxyJFX proxy, ENoticeBoardType newType)  
      private void updateNoticeBoardThroughContent​(ViewChangeCityPlayerProxyJFX proxy, ENoticeBoardType newType)  
      private void updateNoticeBoardThroughMenu​(ViewChangeCityPlayerProxyJFX proxy, ENoticeBoardType newType)
      Provide the content through a notice board menu.
      • Methods inherited from class javafx.scene.Group

        autoSizeChildrenProperty, getChildren, isAutoSizeChildren, layoutChildren, minHeight, minWidth, prefHeight, prefWidth, setAutoSizeChildren
      • Methods inherited from class javafx.scene.Parent

        computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
      • Methods inherited from class javafx.scene.Node

        accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, maxHeight, maxWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Field Detail

      • clientEventBus

        @Autowired
        @Qualifier("clientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientEventBus
      • clientServerEventBus

        @Autowired
        @Qualifier("serverClientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientServerEventBus
      • timerEventBus

        @Autowired
        @Qualifier("timerEventBus")
        private com.google.common.eventbus.AsyncEventBus timerEventBus
      • context

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

        private javafx.beans.value.ObservableValue<?> contentUpdate
      • contentUpdateListener

        private javafx.beans.value.ChangeListener<?> contentUpdateListener
    • Constructor Detail

      • OpenPatricianNoticeBoard

        public OpenPatricianNoticeBoard()
    • Method Detail

      • initializeEventRegistration

        @PostConstruct
        private void initializeEventRegistration()
      • unregister

        @PreDestroy
        private void unregister()
      • handleNoticeBoardUpdate

        public void handleNoticeBoardUpdate​(NoticeBoardUpdate event)
        Event handler for updating the notice board
        Parameters:
        event - object
      • updateDisplayMessages

        public void updateDisplayMessages​(DisplayMessage message)
      • disableNavigationItems

        private void disableNavigationItems()
      • enableNavigationItems

        private void enableNavigationItems()
      • initializeMenuProvider

        private void initializeMenuProvider()
      • handlePersonLeaves

        public void handlePersonLeaves​(PersonLeavesTavernEvent event)
        Update the notice board when a person leaves
        Parameters:
        event - for a person leaving the tavern
      • handleCloseNoticeBoard

        public void handleCloseNoticeBoard​(NoticeBoardClose event)
        Event handler for removing the content of the notice board.
        Parameters:
        event - object
      • handleDayChange

        public void handleDayChange​(ClockTickPostDayChange event)
        Handle the day change event to update the notice board. Actually this happens on the tick after the day change to ensure that all events that happen on the day change are accounted for and executed.
        Parameters:
        event - when the day has changed.
      • clearNoticeBoardOfSceneTiedMenu

        private void clearNoticeBoardOfSceneTiedMenu​(ViewChangeCityPlayerProxyJFX proxy)
        Clean out all menu entries that are tied to a scene.
        Parameters:
        proxy - city proxy
      • updateAfterStackClearing

        private void updateAfterStackClearing​(ViewChangeCityPlayerProxyJFX proxy,
                                              boolean needsUpdate)
        Update the view of the notice board after the menu stack was cleared.
        Parameters:
        proxy - city proxy
        needsUpdate - flag to indicate if an update is required
      • map

        private ENoticeBoardType map​(EViewChangeEvent viewChange)
        Map the view change event to a notice board destinction. If the view change does not result in a view change null will be returned.
        Parameters:
        viewChange - enum value indicating which notice board to display
        Returns:
        type of the notice board, matching viewChange