Class ScenePolygonInitialzer
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.gameplay.impl.ScenePolygonInitialzer
-
- Direct Known Subclasses:
AbstractMarketPlaceBuildingPolygonInitializer,ArmoryPolygonInitializer,LoanerScenePolygonInitializer,MarketScenePolygonInitializer,PortScenePolygonInitializer,ShipyardScenePolygonInitializer,TavernScenePolygonInitializer
public abstract class ScenePolygonInitialzer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classScenePolygonInitialzer.PolygonComparatorComparator based on descending order of the entries key values.
-
Field Summary
Fields Modifier and Type Field Description protected ch.sahits.game.graphic.image.IDataImageLoaderxmlLoader
-
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.
-
-
-
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
-
-