Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / documents / Document.java @ 47050

History | View | Annotate | Download (4.33 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.app.project.documents;
25

    
26
import java.beans.PropertyChangeListener;
27
import javax.swing.JComponent;
28

    
29
import org.gvsig.andami.ui.mdiManager.IWindow;
30
import org.gvsig.app.project.Project;
31
import org.gvsig.app.project.documents.gui.WindowLayout;
32
import org.gvsig.tools.persistence.Persistent;
33
import org.gvsig.tools.util.Contains;
34
import org.gvsig.tools.util.PropertiesSupport;
35

    
36
public interface Document extends Persistent, Contains, PropertiesSupport {
37

    
38
        public static final String ACCESS_DOCUMENT_AUTHORIZATION = "project-document-access";
39

    
40
        /**
41
         * Obtiene el nombre del elemento
42
         *
43
         * @return
44
         */
45
        public String getName();
46

    
47
        /**
48
         * Establece el nombre del elemento
49
         *
50
         * @param string
51
         */
52
        public void setName(String string);
53

    
54
        /**
55
         * Obtiene la fecha de creaci?n del elemento
56
         *
57
         * @return
58
         */
59
        public String getCreationDate();
60

    
61
        /**
62
         * Obtiene el propietario del elemento
63
         *
64
         * @return
65
         */
66
        public String getOwner();
67

    
68
        public String getTypeName();
69

    
70
        /**
71
         * Establece la fecha de creaci?n del elemento.
72
         *
73
         * @param string
74
         */
75
        public void setCreationDate(String string);
76

    
77
        /**
78
         * Establece el propietario del elemento
79
         *
80
         * @param string
81
         */
82
        public void setOwner(String string);
83

    
84
        /**
85
         * Obtiene los comentarios del proyecto
86
         *
87
         * @return
88
         */
89
        public String getComment();
90

    
91
        /**
92
         * Establece los comentarios del proyecto
93
         *
94
         * @param string
95
         */
96
        public void setComment(String string);
97

    
98
        public Project getProject();
99

    
100
        public void setProject(Project project);
101

    
102
        /**
103
         * Locks this project element protecting it from deleting from the project.
104
         */
105
        public abstract void lock();
106

    
107
        /**
108
         * Unlocks this element. So, from now on, it can be removed from the project.
109
         */
110
        public abstract void unlock();
111

    
112
        /**
113
         * Tells whether if this project's element is locked/protected or not. A protected
114
         * element cannot be removed from the current project.
115
         *
116
         * @see <b>lock()</b> and <b>unlock()</b> methods.
117
         *
118
         * @return true if it is locked, false otherwise
119
         */
120
        public abstract boolean isLocked();
121

    
122
        public DocumentManager getFactory();
123

    
124
        public boolean isModified();
125

    
126
        public void setModified(boolean modified);
127

    
128
        /**
129
         * Register a  ProjectDocumentListener.
130
         * @param  listener  ProjectDocumentListener
131
         */
132
        public void addListener(ProjectDocumentListener listener);
133

    
134
        /**
135
         * A?ade un listener para los cambios en las bounded properties
136
         *
137
         * @param listener
138
         */
139
        public void addPropertyChangeListener(
140
                        PropertyChangeListener listener);
141

    
142
        public void afterRemove();
143

    
144
        public void afterAdd();
145

    
146
        public WindowLayout getWindowLayout();
147

    
148
        public void setWindowLayout(WindowLayout layout) ;
149

    
150
        public IWindow getPropertiesWindow();
151

    
152
        /**
153
         * Return the main window associated to this document.
154
         * Is a tutility method, is equivalent to:
155
         * <code>this.getFactory().getMainWindow(doc)</code>
156
         *
157
         * @return the IWindow associated to this document
158
         */
159
        public IWindow getMainWindow();
160

    
161
        /**
162
         * Return the main JComponent associated to this document.
163
         * Is a tutility method, is equivalent to:
164
         * <code>this.getFactory().getMainComponent(doc)</code>
165
         *
166
         * @return the JComponent associated to this document
167
         */
168
        public JComponent getMainComponent();
169

    
170
    public boolean isTemporary();
171

    
172
    public boolean isAvailable();
173
    
174
    public boolean getOpenWhenTheUserCreates();
175
    
176
    public void refresh();
177

    
178
}