1 /* 2 * Copyright 2013-2023 Medical Information Systems Research Group (https://medical.zcu.cz), 3 * Department of Computer Science and Engineering, University of West Bohemia. 4 * Address: Univerzitni 8, 306 14 Plzen, Czech Republic. 5 * 6 * This file is part of Sparkle project. 7 * 8 * Sparkle is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License. 11 * 12 * Sparkle is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with Sparkle. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 package cz.zcu.mre.sparkle.gui.query; 21 22 import cz.zcu.mre.sparkle.gui.tools.Components; 23 import javafx.fxml.FXML; 24 import javafx.scene.Node; 25 import javafx.scene.control.Label; 26 import javafx.scene.layout.VBox; 27 28 /** 29 * Kontroler triviální kontejnerové komponenty, jejímž účelem je obsahovat další 30 * komponenty a zobrazovat titulek. 31 * 32 * @author Jan Smucr 33 * @author Petr Vcelak (vcelak@kiv.zcu.cz) 34 */ 35 public final class CustomTitledPane 36 extends VBox { 37 38 @FXML 39 private VBox container; 40 @FXML 41 private Label title; 42 43 /** 44 * @param title Titulek. 45 * @param content Obsah. 46 */ 47 public CustomTitledPane(final String title, final Node... content) { 48 Components.load(this); 49 50 this.title.setText(title); 51 container.getChildren().addAll(content); 52 } 53 }