source: josm/trunk/src/org/openstreetmap/josm/gui/layer/SaveToFile.java@ 13674

Last change on this file since 13674 was 9751, checked in by Don-vip, 8 years ago

see #12462 - Extend Save Layers dialog for more layer types (patch by holgermappt, modified for checkstyle compliance)

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.layer;
3
4/**
5 * Interface for layers that can save data to a file.
6 * @since 9751
7 */
8public interface SaveToFile {
9
10 /**
11 * Replies the savable state of the layer (i.e. if it can be saved through
12 * a "File->Save" dialog). A layer that implements the
13 * {@code SaveToFile} interface must return {@code true}.
14 *
15 * @return {@code true} if the layer can be saved to a file; {@code false}, otherwise
16 */
17 boolean isSavable();
18
19 /**
20 * Determines if the data managed by this layer needs to be saved to
21 * a file. Only replies true if a file is assigned to this layer and
22 * if the data managed by this layer has been modified since the last
23 * save operation to the file.
24 *
25 * @return {@code true} if the data managed by this layer needs to be saved to a file; {@code false}, otherwise
26 */
27 boolean requiresSaveToFile();
28
29 /**
30 * Initializes the layer after a successful save of data to a file.
31 */
32 void onPostSaveToFile();
33}
Note: See TracBrowser for help on using the repository browser.