Statistics
| Revision:

root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / DocumentManager.java @ 38601

History | View | Annotate | Download (2.79 KB)

1 31496 jjdelcerro
package org.gvsig.app.project.documents;
2
3 36631 cordinyana
import java.util.Iterator;
4
5 31496 jjdelcerro
import javax.swing.ImageIcon;
6
7
import org.gvsig.andami.ui.mdiManager.IWindow;
8
import org.gvsig.app.project.Project;
9 35193 jjdelcerro
import org.gvsig.app.project.documents.gui.IDocumentWindow;
10 31496 jjdelcerro
import org.gvsig.app.project.documents.gui.WindowLayout;
11 33659 fdiaz
import org.gvsig.tools.extensionpoint.ExtensionBuilder;
12
import org.gvsig.tools.persistence.PersistenceFactory;
13 31496 jjdelcerro
14 33659 fdiaz
public interface DocumentManager extends ExtensionBuilder, PersistenceFactory{
15 31496 jjdelcerro
16
        /**
17
         * Returns the type of document priority.
18
         *
19
         * @return Priority.
20
         */
21
        public int getPriority();
22
23
        /**
24 35193 jjdelcerro
         * Returns tdocumenthe icon for the type of document.
25 31496 jjdelcerro
         *
26
         * @return Image.
27
         */
28
        public ImageIcon getIcon();
29
30
        /**
31
         * Returns the icon for the type of document when is selected
32
         *
33
         * @return Image.
34
         */
35
        public ImageIcon getIconSelected();
36
37
        /**
38
         * Create a new ProjectDocument.
39
         *
40
         * @param project Opened project.
41
         *
42
         * @return ProjectDocument.
43
         */
44
        public AbstractDocument createDocument();
45
46 36631 cordinyana
                /**
47
     * Uses a gui to be able from the characteristics that we want a
48
     * ProjectDocument
49
     *
50
     * @return a new Document
51
     *
52
     * @deprecated user {@link #createDocumentsByUser()} instead
53
     */
54 31496 jjdelcerro
        public AbstractDocument createDocumentByUser();
55
56 36631 cordinyana
    /**
57
     * Uses a gui to be able from the characteristics that we want a
58
     * ProjectDocument
59
     *
60
     * @return the created documents
61
     */
62
    public Iterator<? extends Document> createDocumentsByUser();
63
64 31496 jjdelcerro
        /**
65
         * Returns the title of type of document.
66
         *
67
         * @return String title for type of document
68
         */
69
        public String getTitle();
70
71
        /**
72
         * Returns the type name of the document factory.
73
         *
74
         * @return Name of registration
75
         */
76
        public String getTypeName();
77
78
        /**
79 35193 jjdelcerro
         * Return the main window asociated to the passed document.
80
         * If the window alreade exists return it. If not, a new
81
         * window is created.
82 31496 jjdelcerro
         *
83
         * @param doc
84
         * @return Window asociated to document
85
         */
86
        public IWindow getMainWindow(Document doc) ;
87
88
        /**
89
         * Return the main window asociated to the document.
90
         *
91
         * @param doc, layout
92
         * @return Window asociated to document
93
         */
94
        public IWindow getMainWindow(Document doc, WindowLayout layout) ;
95
96
        /**
97
         * Return the windows properties asociated to the document.
98
         * @param doc
99
         * @return
100
         */
101
        public IWindow getPropertiesWindow(Document doc) ;
102
103
        /**
104
         * Return true if the name exists to another document.
105
         *
106
         * @param project
107
         * @param documentName
108
         *
109
         * @return True if the name exists.
110
         * @deprecated use instead  project.getDocument
111
         */
112
        public boolean existName(Project project, String documentName);
113 35193 jjdelcerro
114
        /**
115
         * Return the class that implement the main window for this type of
116
         * documents.
117
         *
118
         * @return the class of main window
119
         */
120 36443 cordinyana
    public Class<? extends IDocumentWindow> getMainWindowClass();
121 31496 jjdelcerro
122
}