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 @ 44644

History | View | Annotate | Download (4.19 KB)

1 40558 jjdelcerro
/**
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 40435 jjdelcerro
package org.gvsig.app.project.documents;
25
26
import java.beans.PropertyChangeListener;
27 41248 jjdelcerro
import javax.swing.JComponent;
28 40435 jjdelcerro
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
34
public interface Document extends Persistent {
35
36 42873 jjdelcerro
        public static final String ACCESS_DOCUMENT_AUTHORIZATION = "project-document-access";
37
38 40435 jjdelcerro
        /**
39
         * Obtiene el nombre del elemento
40
         *
41
         * @return
42
         */
43
        public String getName();
44
45
        /**
46
         * Establece el nombre del elemento
47
         *
48
         * @param string
49
         */
50
        public void setName(String string);
51
52
        /**
53
         * Obtiene la fecha de creaci?n del elemento
54
         *
55
         * @return
56
         */
57
        public String getCreationDate();
58
59
        /**
60
         * Obtiene el propietario del elemento
61
         *
62
         * @return
63
         */
64
        public String getOwner();
65
66
        public String getTypeName();
67 42088 fdiaz
68 40435 jjdelcerro
        /**
69
         * Establece la fecha de creaci?n del elemento.
70
         *
71
         * @param string
72
         */
73
        public void setCreationDate(String string);
74
75
        /**
76
         * Establece el propietario del elemento
77
         *
78
         * @param string
79
         */
80
        public void setOwner(String string);
81
82
        /**
83
         * Obtiene los comentarios del proyecto
84
         *
85
         * @return
86
         */
87
        public String getComment();
88
89
        /**
90
         * Establece los comentarios del proyecto
91
         *
92
         * @param string
93
         */
94
        public void setComment(String string);
95
96
        public Project getProject();
97
98
        public void setProject(Project project);
99 42088 fdiaz
100 40435 jjdelcerro
        /**
101
         * Locks this project element protecting it from deleting from the project.
102
         */
103
        public abstract void lock();
104
105
        /**
106
         * Unlocks this element. So, from now on, it can be removed from the project.
107
         */
108
        public abstract void unlock();
109
110
        /**
111
         * Tells whether if this project's element is locked/protected or not. A protected
112
         * element cannot be removed from the current project.
113
         *
114
         * @see <b>lock()</b> and <b>unlock()</b> methods.
115
         *
116
         * @return true if it is locked, false otherwise
117
         */
118
        public abstract boolean isLocked();
119
120
        public DocumentManager getFactory();
121
122
        public boolean isModified();
123
124
        public void setModified(boolean modified);
125
126
        /**
127
         * Register a  ProjectDocumentListener.
128
         * @param  listener  ProjectDocumentListener
129
         */
130
        public void addListener(ProjectDocumentListener listener);
131
132
        /**
133
         * A?ade un listener para los cambios en las bounded properties
134
         *
135
         * @param listener
136
         */
137
        public void addPropertyChangeListener(
138
                        PropertyChangeListener listener);
139
140
        public void afterRemove();
141
142
        public void afterAdd();
143
144
        public WindowLayout getWindowLayout();
145 42088 fdiaz
146 40435 jjdelcerro
        public void setWindowLayout(WindowLayout layout) ;
147 42088 fdiaz
148 40435 jjdelcerro
        public IWindow getPropertiesWindow();
149 42088 fdiaz
150 41248 jjdelcerro
        /**
151
         * Return the main window associated to this document.
152
         * Is a tutility method, is equivalent to:
153
         * <code>this.getFactory().getMainWindow(doc)</code>
154 42088 fdiaz
         *
155 41248 jjdelcerro
         * @return the IWindow associated to this document
156
         */
157 40435 jjdelcerro
        public IWindow getMainWindow();
158 42088 fdiaz
159 41248 jjdelcerro
        /**
160
         * Return the main JComponent associated to this document.
161
         * Is a tutility method, is equivalent to:
162
         * <code>this.getFactory().getMainComponent(doc)</code>
163 42088 fdiaz
         *
164 41248 jjdelcerro
         * @return the JComponent associated to this document
165
         */
166
        public JComponent getMainComponent();
167 42088 fdiaz
168
    public boolean isTemporary();
169
170
    public boolean isAvailable();
171 44279 jjdelcerro
172
    public boolean getOpenWhenTheUserCreates();
173 42088 fdiaz
174 40435 jjdelcerro
}