Module de.seggebaeing.sqlanalyzer
Class BDOWindow<T extends BusinessDomainObject>
java.lang.Object
de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow<T>
- Type Parameters:
T
- the concreteBusinessDomainObject
handled by the window
- All Implemented Interfaces:
javafx.fxml.Initializable
- Direct Known Subclasses:
DetailsWindow
,OverviewWindow
Abstract JavaFX base controller for windows operating on a specific
BusinessDomainObject
type. Provides shared header/title
handling, a refresh action hook, and a guarded deletion workflow that checks
for dependants and can route to their overview windows.
Subclasses supply the backing BDOService
and implement
refresh()
and TitledInitializableWindow.getTitle()
.
Intended for use on the JavaFX Application Thread.
- Since:
- 1.0
- Author:
- Felix Seggebäing
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javafx.scene.control.Label
protected javafx.scene.control.Button
Fields inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
root
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BDOService
<T> Returns the backing service for this window’s domain type, used for CRUD operations, queries, and dependency resolution.void
initialize
(URL location, ResourceBundle resources) When overridden, make sure to always callsuper.initialize(location, resources)
first.protected abstract void
refresh()
Refreshes the window’s content from the underlying model/service.protected boolean
requestDeletion
(T object) Shows the alerts to the user.protected void
setHeaderText
(String headerText) Updates the window’s header text shown in the bound label.Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
closeWindow, enableHelp, getRoot, getStage, getTitle
-
Field Details
-
headerLabel
protected javafx.scene.control.Label headerLabel -
refreshBtn
protected javafx.scene.control.Button refreshBtn
-
-
Constructor Details
-
BDOWindow
public BDOWindow()
-
-
Method Details
-
getService
Returns the backing service for this window’s domain type, used for CRUD operations, queries, and dependency resolution.- Returns:
- the non-null
BDOService
forT
-
refresh
protected abstract void refresh()Refreshes the window’s content from the underlying model/service. Implementations should reload data and update bound controls. -
initialize
When overridden, make sure to always callsuper.initialize(location, resources)
first.- Parameters:
location
- The location used to resolve relative paths for the root object, ornull
if the location is not known.resources
- The resources used to localize the root object, ornull
if the root object was not localized.
-
setHeaderText
Updates the window’s header text shown in the bound label.- Parameters:
headerText
- new header text; may benull
to clear- Implementation Note:
- Invoke on the JavaFX Application Thread.
-
requestDeletion
Shows the alerts to the user. Doesn't actually delete the object itself, but returns if it's safe to delete- Parameters:
object
- the object for which the deletion is to be checked- Returns:
- if we can proceed with the deletion
-