Class NewGameScene
- java.lang.Object
-
- ch.sahits.game.openpatrician.javafx.OpenPatricianScene
-
- ch.sahits.game.openpatrician.display.scene.NewGameScene
-
public class NewGameScene extends OpenPatricianScene
Scene for starting a new game.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Oct 26, 2013
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
NewGameScene.NewGameAction
-
Field Summary
-
Constructor Summary
Constructors Constructor Description NewGameScene()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createControls()
private java.util.List<java.lang.String>
getDificutlyList()
Compile a list of the difficulty levelsprivate java.util.List<OpenPatricianSpinnerOptionDataModel>
getHomeTowns4Map()
Create a list of town names that are available on the selected map as home towns.private java.util.List<OpenPatricianSpinnerOptionDataModel>
getMapList()
Retrieve the list of the available mapsprivate java.util.List<OpenPatricianSpinnerOptionDataModel>
getObjectiveList()
Create a list of objectives to select fromprivate javax.xml.transform.Source
getSourceFromFile(java.lang.String fileName)
private java.util.List<OpenPatricianSpinnerOptionDataModel>
getStartYears()
Initialize the list of start years from 1259 to 1400private java.lang.String
getStyleSheetFilename()
void
setSceneChangeable(IOpenPatricianApplicationWindow sceneChangeable)
-
Methods inherited from class ch.sahits.game.openpatrician.javafx.OpenPatricianScene
heightChange, widthChange
-
-
-
-
Field Detail
-
firstNameLoader
@Autowired @Qualifier("firstNameLoader") private RandomNameLoader firstNameLoader
-
lastNameLoader
@Autowired @Qualifier("lastNameLoader") private RandomNameLoader lastNameLoader
-
objective
private OpenPatricianSpinner objective
-
speed
private OpenPatricianSlider speed
-
difficulty
private OpenPatricianSlider difficulty
-
startYear
private OpenPatricianSpinner startYear
-
hometown
private OpenPatricianSpinner hometown
-
map
private OpenPatricianSpinner map
-
femaleRadioButton
private OpenPatricianRadioButton femaleRadioButton
-
maleRadioButton
private OpenPatricianRadioButton maleRadioButton
-
lastName
private OpenPatricianWoodenTextInput lastName
-
name
private OpenPatricianWoodenTextInput name
-
sceneChangeable
private SceneChangeable sceneChangeable
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
unmarshaller
@Autowired @Qualifier("jaxb2XmlModelMarshallerMap") private org.springframework.oxm.Unmarshaller unmarshaller
-
locale
@Autowired private Locale locale
-
gameDate
@Autowired private Date gameDate
-
uiFactory
@Autowired private UIFactory uiFactory
-
gameOptions
@Autowired private GameOptionsService gameOptions
-
messageSource
@Autowired private org.springframework.context.MessageSource messageSource
-
mapProviderService
@Autowired private MapProviderService mapProviderService
-
sceneChanger
@Autowired private SceneChangeService sceneChanger
-
firstYear
@Value("${openpatrician.newGame.startYear}") private int firstYear
-
endYear
@Value("${openpatrician.newGame.endYear}") private int endYear
-
-
Method Detail
-
createControls
@PostConstruct private void createControls()
-
setSceneChangeable
public void setSceneChangeable(IOpenPatricianApplicationWindow sceneChangeable)
-
getMapList
private java.util.List<OpenPatricianSpinnerOptionDataModel> getMapList()
Retrieve the list of the available maps- Returns:
- List of maps for the spinner
-
getHomeTowns4Map
private java.util.List<OpenPatricianSpinnerOptionDataModel> getHomeTowns4Map()
Create a list of town names that are available on the selected map as home towns.- Returns:
- list of city names of the selected map for the spinner
-
getSourceFromFile
private javax.xml.transform.Source getSourceFromFile(java.lang.String fileName)
-
getStartYears
private java.util.List<OpenPatricianSpinnerOptionDataModel> getStartYears()
Initialize the list of start years from 1259 to 1400- Returns:
- list of starting years for the spinner.
-
getDificutlyList
private java.util.List<java.lang.String> getDificutlyList()
Compile a list of the difficulty levels- Returns:
- List of localized difficulty settings
-
getObjectiveList
private java.util.List<OpenPatricianSpinnerOptionDataModel> getObjectiveList()
Create a list of objectives to select from- Returns:
- List of localized game objectives.
-
getStyleSheetFilename
private java.lang.String getStyleSheetFilename()
-
-