Module de.seggebaeing.sqlanalyzer
Class LLMDetailsController
java.lang.Object
de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow<LLM>
de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow<LLM>
de.seggebaeing.sqlanalyzer.presentation.controller.details.LLMDetailsController
- All Implemented Interfaces:
javafx.fxml.Initializable
Details/edit window controller for a single
LLM
.
Initializes API selection (optionally showing dummy providers), binds bounded
temperature sliders, performs lightweight validation on save, and loads/saves
values between UI controls and the domain object. Includes contextual help.- Since:
- 1.0
- Author:
- Felix Seggebäing
-
Field Summary
Fields inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow
deleteBtn, lastEditedLabel, root, saveBtn
Fields inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow
headerLabel, refreshBtn
-
Constructor Summary
ConstructorsConstructorDescriptionLLMDetailsController
(LLM object) Creates a details controller bound to the given LLM instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected BDOService
<LLM> Returns the service used to load and persist LLM objects.getTitle()
Returns the fixed title for the LLM details window.void
initialize
(URL location, ResourceBundle resources) Initializes the LLM details view: delegates tosuper.initialize
, enables contextual help, sets up the API combo box (incl. optional dummy providers), and configures bounded temperature sliders with labels.protected void
Writes the current UI values into the boundLLM
instance (name, API, model, API key, min/max temperature).protected void
refresh()
Loads values from the boundLLM
into the UI controls (name, API, model, API key, min/max temperature).Validates the current LLM form and returns human-readable error messages.Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow
deleteBtnClick, getObject, saveBtnClick
Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow
requestDeletion, setHeaderText
Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
closeWindow, enableHelp, getRoot, getStage
-
Constructor Details
-
LLMDetailsController
Creates a details controller bound to the given LLM instance.- Parameters:
object
- the LLM to display and edit; expected non-null
-
-
Method Details
-
initialize
Initializes the LLM details view: delegates tosuper.initialize
, enables contextual help, sets up the API combo box (incl. optional dummy providers), and configures bounded temperature sliders with labels.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Overrides:
initialize
in classDetailsWindow<LLM>
- Parameters:
location
- FXML location (may benull
)resources
- localization bundle (may benull
)- Implementation Note:
- Invoked by the FXML loader on the JavaFX Application Thread.
-
getService
Returns the service used to load and persist LLM objects.- Specified by:
getService
in classBDOWindow<LLM>
- Returns:
- the
LLMService
instance
-
getTitle
Returns the fixed title for the LLM details window.- Specified by:
getTitle
in classTitledInitializableWindow
- Returns:
- the string
"Large language model"
-
refresh
protected void refresh()Loads values from the boundLLM
into the UI controls (name, API, model, API key, min/max temperature). -
saveChecks
Validates the current LLM form and returns human-readable error messages. Checks: non-empty name; API selected; for non-dummy APIs, non-empty model and API key; temperatures within[0,1]
andmin <= max
.- Overrides:
saveChecks
in classDetailsWindow<LLM>
- Returns:
- list of validation messages; empty if saving is allowed
-
insertValues
protected void insertValues()Writes the current UI values into the boundLLM
instance (name, API, model, API key, min/max temperature). Does not persist.- Specified by:
insertValues
in classDetailsWindow<LLM>
-