Class DialogFactory
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.dialog.service.DialogFactory
-
@Service @Lazy @DependentInitialisation(StartNewGameBean.class) public class DialogFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
-
Constructor Summary
Constructors Constructor Description DialogFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Dialog
createDialogForSideRoom(ISideRoomPerson sideRoomPerson, ICityPlayerProxyJFX cityProxy)
Retrieve the dialog that matches the side room personDialog
getDialog(EDialogType dialogType, ICityPlayerProxyJFX cityProxy)
Dialog
getDialog(EDialogType dialogType, ICityPlayerProxyJFX cityProxy, IConvoy convoy, IShip ship)
Dialog
getDialog(DialogTemplate template)
CloseButtonDialog
getDialog(IDialogState state)
Factory method for dialogs that are created with their own specific state.private HistoryStandaloneDialog
getHistoryDialog(ICityPlayerProxyJFX cityProxy, java.lang.String resourceName)
private java.lang.String
getHistoryResourceName(java.lang.String name)
-
-
-
Method Detail
-
getDialog
public Dialog getDialog(DialogTemplate template)
-
getHistoryDialog
private HistoryStandaloneDialog getHistoryDialog(ICityPlayerProxyJFX cityProxy, java.lang.String resourceName)
-
getHistoryResourceName
private java.lang.String getHistoryResourceName(java.lang.String name)
-
getDialog
public Dialog getDialog(EDialogType dialogType, ICityPlayerProxyJFX cityProxy)
-
getDialog
public CloseButtonDialog getDialog(IDialogState state)
Factory method for dialogs that are created with their own specific state.- Parameters:
state
- dialog state for which to create the dialog- Returns:
- dialog with a close button
-
getDialog
public Dialog getDialog(EDialogType dialogType, ICityPlayerProxyJFX cityProxy, IConvoy convoy, IShip ship)
-
createDialogForSideRoom
private Dialog createDialogForSideRoom(ISideRoomPerson sideRoomPerson, ICityPlayerProxyJFX cityProxy)
Retrieve the dialog that matches the side room person- Parameters:
sideRoomPerson
- person state from the side room- Returns:
- Side room person dialog
-
-