View Javadoc
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.other;
21  
22  import javafx.beans.property.ReadOnlyBooleanProperty;
23  import javafx.beans.property.ReadOnlyObjectProperty;
24  import java.io.File;
25  
26  /**
27   * Rozhraní definující záložku (nebo jinou komponentu), jejíž obsah lze uložit
28   * do konkrétního souboru a disponuje sledováním změn.
29   *
30   * @author Jan Smucr
31   * @author Klara Hlavacova
32   * @author Petr Vcelak (vcelak@kiv.zcu.cz)
33   */
34  public interface SaverTab {
35  
36      /**
37       * @return Atribut s se souborem.
38       */
39      ReadOnlyObjectProperty<File> fileProperty();
40  
41      /**
42       * @return Flag hlásící změny v obsahu komponenty.
43       */
44      ReadOnlyBooleanProperty hasChangesProperty();
45  
46      /**
47       * Uloží obsah do přiřazeného souboru nebo se uživatele dotáže na jeho
48       * výběr.
49       *
50       * @return <code>true</code>, pokud k uložení došlo.
51       */
52      boolean save();
53  
54      /**
55       * Dotáže se uživatele na výběr souboru, kam posléze uloží obsah.
56       *
57       * @return <code>true</code>, pokud k uložení došlo.
58       */
59      boolean saveAs();
60  }