Class ScenePolygonInitialzer

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  ScenePolygonInitialzer.PolygonComparator
      Comparator based on descending order of the entries key values.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected ch.sahits.game.graphic.image.IDataImageLoader xmlLoader  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScenePolygonInitialzer​(java.lang.String sceneName)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract javafx.event.EventHandler<javafx.scene.input.MouseEvent> createEventHandler​(java.lang.String name)
      Create an event handler for the clicking on the polygon with the given name.
      java.util.List<javafx.scene.shape.Polygon> initialzePolygons​(ch.sahits.game.graphic.image.ImageScaleState state)
      Initialize the polygons defined in the metadata considering the proper scaling and cropping.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • xmlLoader

        @Autowired
        @Qualifier("xmlImageLoader")
        protected ch.sahits.game.graphic.image.IDataImageLoader xmlLoader
    • Constructor Detail

      • ScenePolygonInitialzer

        public ScenePolygonInitialzer​(java.lang.String sceneName)
    • Method Detail

      • initialzePolygons

        public java.util.List<javafx.scene.shape.Polygon> initialzePolygons​(ch.sahits.game.graphic.image.ImageScaleState state)
        Initialize the polygons defined in the metadata considering the proper scaling and cropping.
        Parameters:
        state - current state
        Returns:
        List of polygons.
      • createEventHandler

        protected abstract javafx.event.EventHandler<javafx.scene.input.MouseEvent> createEventHandler​(java.lang.String name)
        Create an event handler for the clicking on the polygon with the given name.
        Parameters:
        name - of the polygon
        Returns:
        EventHandler for the mouse click event