M
- the type of EntityApplicationModel
used by this application viewpublic abstract class EntityApplicationView<M extends EntityApplicationModel> extends javafx.application.Application implements ViewTreeNode<EntityView>
Constructor and Description |
---|
EntityApplicationView(java.lang.String applicationTitle)
Instantiates a new
EntityApplicationView instance. |
EntityApplicationView(java.lang.String applicationTitle,
java.lang.String iconFileName)
Instantiates a new
EntityApplicationView instance. |
Modifier and Type | Method and Description |
---|---|
void |
addEntityView(EntityView entityView)
Adds a
EntityView to this application |
protected javafx.scene.control.MenuBar |
createMainMenu() |
protected java.lang.String |
getApplicationIdentifier() |
protected User |
getApplicationUser()
Displays a login panel in case authentication is required, otherwise returns the default user.
|
java.util.List<EntityView> |
getChildViews() |
protected User |
getDefaultUser() |
M |
getModel() |
EntityView |
getNextSiblingView() |
ViewTreeNode<EntityView> |
getParentView() |
EntityView |
getPreviousSiblingView() |
protected abstract M |
initializeApplicationModel(EntityConnectionProvider connectionProvider)
Initializes the application model
|
protected javafx.scene.Scene |
initializeApplicationScene(javafx.stage.Stage primaryStage)
Creates the application scene from the available
EntityView s. |
protected EntityConnectionProvider |
initializeConnectionProvider(User user,
java.lang.String clientTypeId)
Initializes the connection provider to use in this application
|
protected abstract void |
initializeEntityViews()
Initialized all entity views and adds them via
addEntityView(EntityView) |
protected void |
savePreferences()
Called on application exit, override to save user preferences on program exit,
remember to call super.savePreferences() when overriding
|
protected User |
showLoginPanel(User defaultUser)
Displays a login panel
|
void |
start(javafx.stage.Stage stage)
Starts this application
|
public EntityApplicationView(java.lang.String applicationTitle)
EntityApplicationView
instance.applicationTitle
- the title to display in the view headerpublic EntityApplicationView(java.lang.String applicationTitle, java.lang.String iconFileName)
EntityApplicationView
instance.applicationTitle
- the title to display in the view headericonFileName
- the name of a icon file on the classpath to displaypublic final M getModel()
public final void addEntityView(EntityView entityView)
EntityView
to this applicationentityView
- the EntityView
to addpublic final ViewTreeNode<EntityView> getParentView()
getParentView
in interface ViewTreeNode<EntityView>
EntityApplicationView
does not have a parent viewpublic final EntityView getPreviousSiblingView()
getPreviousSiblingView
in interface ViewTreeNode<EntityView>
EntityApplicationView
does not have a previous sibling viewpublic final EntityView getNextSiblingView()
getNextSiblingView
in interface ViewTreeNode<EntityView>
EntityApplicationView
does not have a next sibling viewpublic final java.util.List<EntityView> getChildViews()
getChildViews
in interface ViewTreeNode<EntityView>
EntityView
s associated with this applicationaddEntityView(EntityView)
public final void start(javafx.stage.Stage stage)
start
in class javafx.application.Application
stage
- the State on which to set this applicationprotected EntityConnectionProvider initializeConnectionProvider(User user, java.lang.String clientTypeId)
user
- the user on which to base the connectionclientTypeId
- a String identifying the client typeEntityConnectionProvider
based on the given user and client typeprotected User getDefaultUser()
protected java.lang.String getApplicationIdentifier()
protected javafx.scene.control.MenuBar createMainMenu()
protected final User getApplicationUser()
EntityApplicationModel.AUTHENTICATION_REQUIRED
,
getDefaultUser()
protected final User showLoginPanel(User defaultUser)
defaultUser
- the default user to displayCancelException
- in case the login action is cancelledprotected void savePreferences()
EntityApplicationModel.savePreferences()
protected abstract void initializeEntityViews()
addEntityView(EntityView)
protected javafx.scene.Scene initializeApplicationScene(javafx.stage.Stage primaryStage)
EntityView
s.primaryStage
- the primary stageprotected abstract M initializeApplicationModel(EntityConnectionProvider connectionProvider)
connectionProvider
- the connection provider