Package io.github.jbastgen.stemma.app.ui
Class ProjectLogo
java.lang.Object
io.github.jbastgen.stemma.app.ui.ProjectLogo
Finds the logo of a project in its working tree (feature 61). A logo the user chose for the repository (
stemma.logo in the
repository's configuration) wins; else the usual places are searched: a file called logo, <name>-logo,
logo-<name> or <name> in the root and in the folders where logos live (logo/, img/logo/, resources/,
docs/, …), and, if there is none, anywhere in the tree a few levels deep. Pictures that JavaFX can show only: PNG, JPEG, GIF
and BMP (an SVG file is passed over). Pure file reading, no JavaFX: tested with folders.-
Method Summary
Modifier and TypeMethodDescriptionThe logo of a project.The file the user chose, if it is there and is a picture that is shown.static StringThe text to keep in the configuration for a chosen file: relative to the working tree (with slashes) if it is inside, else absolute.static booleanWhether the file is a kind of picture that is shown.
-
Method Details
-
supported
Whether the file is a kind of picture that is shown. -
find
The logo of a project.- Parameters:
workTree- the working treename- the name of the repository (its folder name, as shown in the library)configured- the file the user chose: relative to the working tree or absolute; empty for the search
-
resolve
The file the user chose, if it is there and is a picture that is shown. -
stored
The text to keep in the configuration for a chosen file: relative to the working tree (with slashes) if it is inside, else absolute.
-