Package io.github.jbastgen.stemma.app.ui
Interface Host
- All Known Implementing Classes:
MainView
public interface Host
What views need from the application window.
-
Method Summary
Modifier and TypeMethodDescriptionai()The connection to AI services (switched off unless the settings say otherwise).default voidaiBusy(boolean on) An AI command starts (true) or ends (false): the window shows a spinner while at least one runs (feature 30).The global settings as last saved.default Avatarsavatars()The pictures of the authors (feature 59); none by default, so a host without them shows the initials.voidCloses the dialog shown withshowDialog(javafx.scene.layout.Region).The accounts and their secrets.labels()The commit labels.voidlibraryEntryChanged(LibraryEntry entry) A real repository was reloaded: the library entry (branch, changes, ahead/behind) may have changed.default ProjectLogoslogos()The logos of the projects (feature 61); none by default.default voidOpens the file with the program the system has for it (feature 12), in the background; a failure comes as a toast.default voidopenInBrowser(String url) Opens a web address (http or https) in the default browser, in the background; a failure comes as a toast.default voidopenInTerminal(Path dir) Opens a terminal in the folder (feature 11), in the background; a failure comes as a toast.default voidStarts a program of the tools list (feature 13) in the background; a failure comes as a toast.service()The Git service all real repositories are used through.settings()The look settings; the changes of them go to the window.voidshowDialog(javafx.scene.layout.Region dialog) Shows a larger dialog (settings) over the window.default voidshowInFileManager(Path repo, String relPath) Shows the repository, or one of its files, in the system's file manager (feature 10).voidShows a form dialog over the window.voidCalled when the state of a repository changed in a way that affects the status bar.Describes commits with AI; remembers the answers.theme()The active colour theme (needed by popups, which have their own scene).voidShows a short message that goes away by itself.default voidA toast with one button, e.g.default UserBookusers()The user mapping (feature 26); an empty one when the feature is off.default voidThe user mapping file was changed: load it again and redraw.voidA look or layout setting changed (e.g. a panel was resized): save it.voidwithCredentials(Runnable action) Runsaction(an operation that talks to a remote) once the stored credentials can be used: if they are locked, the user is asked for the master password first.
-
Method Details
-
settings
ViewSettings settings()The look settings; the changes of them go to the window. -
appSettings
AppSettings appSettings()The global settings as last saved. -
ai
AiService ai()The connection to AI services (switched off unless the settings say otherwise). -
summarizer
CommitSummarizer summarizer()Describes commits with AI; remembers the answers. -
labels
LabelService labels()The commit labels. -
credentials
CredentialService credentials()The accounts and their secrets. -
withCredentials
Runsaction(an operation that talks to a remote) once the stored credentials can be used: if they are locked, the user is asked for the master password first. If they decline, the action runs anyway: SSH agents and credential helpers may still work. -
showInFileManager
Shows the repository, or one of its files, in the system's file manager (feature 10). Runs in the background and reports a failure as a toast; uses the command from the settings when there is one.- Parameters:
relPath- the file inside the repository, or null for the repository's folder
-
runTool
Starts a program of the tools list (feature 13) in the background; a failure comes as a toast. -
openFile
Opens the file with the program the system has for it (feature 12), in the background; a failure comes as a toast. -
aiBusy
default void aiBusy(boolean on) An AI command starts (true) or ends (false): the window shows a spinner while at least one runs (feature 30). Calls come in pairs from the UI thread. -
logos
The logos of the projects (feature 61); none by default. -
avatars
The pictures of the authors (feature 59); none by default, so a host without them shows the initials. -
openInTerminal
Opens a terminal in the folder (feature 11), in the background; a failure comes as a toast. Uses the terminal and the command of the settings. -
openInBrowser
Opens a web address (http or https) in the default browser, in the background; a failure comes as a toast. Only the address is handed over, nothing is sent. -
theme
Theme theme()The active colour theme (needed by popups, which have their own scene). -
toast
Shows a short message that goes away by itself. -
toast
A toast with one button, e.g. Undo; it stays a little longer. A host that cannot show buttons shows the text only. -
showModal
Shows a form dialog over the window. -
showDialog
void showDialog(javafx.scene.layout.Region dialog) Shows a larger dialog (settings) over the window. -
closeDialog
void closeDialog()Closes the dialog shown withshowDialog(javafx.scene.layout.Region). -
statusChanged
void statusChanged()Called when the state of a repository changed in a way that affects the status bar. -
viewSettingsChanged
void viewSettingsChanged()A look or layout setting changed (e.g. a panel was resized): save it. -
users
The user mapping (feature 26); an empty one when the feature is off. -
usersChanged
default void usersChanged()The user mapping file was changed: load it again and redraw. -
service
RepositoryService service()The Git service all real repositories are used through. -
libraryEntryChanged
A real repository was reloaded: the library entry (branch, changes, ahead/behind) may have changed.
-