Package io.github.jbastgen.stemma.app.ui
Class MainView
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.StackPane
io.github.jbastgen.stemma.app.ui.MainView
- All Implemented Interfaces:
Host,javafx.css.Styleable,javafx.event.EventTarget
Application shell: tab strip, library or repository view, status bar, dialogs and toasts.
Repositories opened from disk are loaded through
RepositoryService; the library also holds sample
repositories (demo data of the design prototype).-
Property Summary
Properties inherited from class javafx.scene.layout.StackPane
alignmentProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible -
Field Summary
FieldsFields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionMainView(javafx.stage.Stage stage, RepositoryService service, BackendManager backends, SettingsStore settingsStore, AppSettings appSettings, LibraryStore libraryStore, CredentialService credentials, Path askpass, boolean demo) Creates the window content and loads the library: the repositories of the library file, or the demo repositories whendemois set. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe dialog that creates a new repository.ai()The connection to AI services (switched off unless the settings say otherwise).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.avatars()The pictures of the authors (feature 59); none by default, so a host without them shows the initials.voidbindTheme(javafx.scene.Scene scene) Gives the window its scene: the theme is applied to it, and what went wrong with a branding file is shown.voidCloses the dialog shown withHost.showDialog(javafx.scene.layout.Region).The accounts and their secrets.labels()The commit labels.library()The repositories of the library.voidlibraryEntryChanged(LibraryEntry updated) A real repository was reloaded: the library entry (branch, changes, ahead/behind) may have changed.static javafx.scene.image.ImageViewlogo(double size) The logo as an image of the given size.logos()The logos of the projects (feature 61); none by default.voidOpens a repository from disk.voidKeeps the size of the window for the next start (feature 62); an unknown size leaves what was kept.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 overlay) Shows a larger dialog (settings) over the window.voidAt the first start: remembers that the welcome was shown (so closing the dialog in any way is enough) and opens it.voidShows a form dialog over the window.voidshowNotice(String message) Shows a warning, e.g. when the configured backend could not be used at startup.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.voidA toast with one button, e.g.users()The user mapping (feature 26); an empty one when the feature is off.voidThe user mapping file was changed: load it again and redraw.static PathThe file of the user mapping.voidA look or layout setting changed (e.g. a panel was resized): save it.static StringwindowTitle(String repositoryName) The window title: the application and its version, and the name of the repository that is selected.static StringwindowTitle(String repositoryName, String company) The window title with the company name after the name (feature 16), when it is given.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.Methods inherited from class javafx.scene.layout.StackPane
alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, layoutChildren, requestLayout, setAlignment, setAlignment, setMarginMethods inherited from class javafx.scene.layout.Pane
getChildrenMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.jbastgen.stemma.app.ui.Host
openFile, openInBrowser, openInTerminal, runTool, showInFileManagerMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Field Details
-
VERSION
- See Also:
-
-
Constructor Details
-
MainView
public MainView(javafx.stage.Stage stage, RepositoryService service, BackendManager backends, SettingsStore settingsStore, AppSettings appSettings, LibraryStore libraryStore, CredentialService credentials, Path askpass, boolean demo) Creates the window content and loads the library: the repositories of the library file, or the demo repositories whendemois set.
-
-
Method Details
-
bindTheme
public void bindTheme(javafx.scene.Scene scene) Gives the window its scene: the theme is applied to it, and what went wrong with a branding file is shown. -
showNotice
Shows a warning, e.g. when the configured backend could not be used at startup. -
open
Opens a repository from disk. Safe to call from the UI thread; the work runs in the background. -
settings
Description copied from interface:HostThe look settings; the changes of them go to the window. -
appSettings
Description copied from interface:HostThe global settings as last saved.- Specified by:
appSettingsin interfaceHost
-
avatars
Description copied from interface:HostThe pictures of the authors (feature 59); none by default, so a host without them shows the initials. -
logos
Description copied from interface:HostThe logos of the projects (feature 61); none by default. -
library
The repositories of the library. -
toast
Description copied from interface:HostShows a short message that goes away by itself. -
toast
Description copied from interface:HostA toast with one button, e.g. Undo; it stays a little longer. A host that cannot show buttons shows the text only. -
showModal
Description copied from interface:HostShows a form dialog over the window. -
showDialog
public void showDialog(javafx.scene.layout.Region overlay) Description copied from interface:HostShows a larger dialog (settings) over the window.- Specified by:
showDialogin interfaceHost
-
closeDialog
public void closeDialog()Description copied from interface:HostCloses the dialog shown withHost.showDialog(javafx.scene.layout.Region).- Specified by:
closeDialogin interfaceHost
-
statusChanged
public void statusChanged()Description copied from interface:HostCalled when the state of a repository changed in a way that affects the status bar.- Specified by:
statusChangedin interfaceHost
-
service
Description copied from interface:HostThe Git service all real repositories are used through. -
viewSettingsChanged
public void viewSettingsChanged()Description copied from interface:HostA look or layout setting changed (e.g. a panel was resized): save it.- Specified by:
viewSettingsChangedin interfaceHost
-
libraryEntryChanged
Description copied from interface:HostA real repository was reloaded: the library entry (branch, changes, ahead/behind) may have changed.- Specified by:
libraryEntryChangedin interfaceHost
-
theme
Description copied from interface:HostThe active colour theme (needed by popups, which have their own scene). -
actCreate
public void actCreate()The dialog that creates a new repository. -
rememberWindowSize
Keeps the size of the window for the next start (feature 62); an unknown size leaves what was kept. -
showFirstStart
public void showFirstStart()At the first start: remembers that the welcome was shown (so closing the dialog in any way is enough) and opens it. Does nothing at later starts. -
credentials
Description copied from interface:HostThe accounts and their secrets.- Specified by:
credentialsin interfaceHost
-
labels
Description copied from interface:HostThe commit labels. -
usersFile
The file of the user mapping. -
users
Description copied from interface:HostThe user mapping (feature 26); an empty one when the feature is off. -
usersChanged
public void usersChanged()Description copied from interface:HostThe user mapping file was changed: load it again and redraw.- Specified by:
usersChangedin interfaceHost
-
ai
Description copied from interface:HostThe connection to AI services (switched off unless the settings say otherwise). -
summarizer
Description copied from interface:HostDescribes commits with AI; remembers the answers.- Specified by:
summarizerin interfaceHost
-
withCredentials
Description copied from interface:HostRunsaction(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.- Specified by:
withCredentialsin interfaceHost
-
aiBusy
public void aiBusy(boolean on) Description copied from interface:HostAn 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. -
windowTitle
The window title: the application and its version, and the name of the repository that is selected. -
windowTitle
The window title with the company name after the name (feature 16), when it is given. -
logo
public static javafx.scene.image.ImageView logo(double size) The logo as an image of the given size.
-