scaffold ImageTagsSessionHeader control

This commit is contained in:
Denis-Cosmin NUTIU 2024-04-09 23:14:54 +03:00
parent d971ff591b
commit 4396e7e4e3
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,20 @@
package dev.nuculabs.imagetagger.ui.controls
import javafx.fxml.FXMLLoader
import javafx.scene.layout.HBox
import java.io.IOException
class ImageTagsSessionHeader : HBox() {
init {
val fxmlLoader = FXMLLoader(
ImageTagsSessionHeader::class.java.getResource("image-tags-session-header.fxml")
)
fxmlLoader.setRoot(this)
fxmlLoader.setController(this)
try {
fxmlLoader.load()
} catch (exception: IOException) {
throw RuntimeException(exception)
}
}
}

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<?import javafx.geometry.Insets?>
<fx:root type="javafx.scene.layout.HBox" xmlns:fx="http://javafx.com/fxml" alignment="CENTER" spacing="5">
<padding>
<Insets left="10" right="10"/>
</padding>
<Label text="9 Apr. 2024" styleClass="sessionTitle"/>
<Pane HBox.hgrow="ALWAYS"/>
<Button text="Open Directory">
<tooltip>
<Tooltip text="Open directory of the images"/>
</tooltip>
<graphic>
<FontIcon iconLiteral="far-folder-open" iconSize="16"/>
</graphic>
</Button>
<Separator/>
</fx:root>