Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.swing / org.gvsig.raster.swing.api / src / main / java / org / gvsig / raster / swing / RasterSwingManager.java @ 1317

History | View | Annotate | Download (5.42 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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 2
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
 */
22
package org.gvsig.raster.swing;
23

    
24
import java.awt.Color;
25
import java.util.ArrayList;
26
import java.util.HashMap;
27

    
28
import javax.swing.ImageIcon;
29
import javax.swing.JPanel;
30

    
31
import org.gvsig.raster.swing.buttonbar.ButtonBar;
32
import org.gvsig.raster.swing.gcanvas.GCanvas;
33
import org.gvsig.raster.swing.infobypoint.MainInfoByPointPanel;
34
import org.gvsig.raster.swing.newlayer.CreateNewLayerPanel;
35
import org.gvsig.raster.swing.newlayer.FileNameManagement;
36
import org.gvsig.raster.swing.openfile.OpenFileContainer;
37
import org.gvsig.raster.swing.preview.DataSourcePreview;
38
import org.gvsig.raster.swing.preview.PreviewPanel;
39
import org.gvsig.raster.swing.preview.PreviewRenderProcess;
40
import org.gvsig.raster.swing.roi.ROIPanel;
41

    
42

    
43
/**
44
 * This class is responsible of the management of the library's swing user
45
 * interface. It is the swing library's main entry point, and provides all the
46
 * services to manage library swing components.
47
 * 
48
 * @see RasterWindowManager
49
 * @see JValidationServicePanel
50
 * @author gvSIG team
51
 * @version $Id$
52
 */
53
public interface RasterSwingManager {
54

    
55
    /**
56
     * Returns the translation of a string.
57
     * 
58
     * @param key
59
     *            String to translate
60
     * @return a String with the translation of the string passed by parameter
61
     */
62
    public String getTranslation(String key);
63

    
64
    /**
65
     * Registers a new instance of a WindowManager which provides services to
66
     * the management of the application windows.
67
     * 
68
     * @param manager
69
     *            {@link RasterWindowManager} to register in the
70
     *            ScriptingUIManager.
71
     * @see RasterWindowManager
72
     */
73
    public void registerWindowManager(RasterWindowManager manager);
74

    
75
    /**
76
     * Returns the {@link RasterWindowManager}.
77
     * 
78
     * @return {@link RasterWindowManager}
79
     * @see {@link RasterWindowManager}
80
     */
81
    public RasterWindowManager getWindowManager();
82
    
83
    public BasePanel createGenericBasePanel();
84
 
85
    /**
86
     * Creates a canvas to draw graphic layers.
87
     * @param backgroundColor
88
     * @return
89
     */
90
    public GCanvas createGraphicCanvas(Color backgroundColor);
91
    
92
    /**
93
     * Creates a preview panel using a data source, a render process and a list
94
     * of panels
95
     * @param buttons
96
     * @param list
97
     * @param generalPanel
98
     * @param downPreviewPanel
99
     * @param renderProcess
100
     * @param dataSource
101
     * @return
102
     */
103
    @SuppressWarnings("unchecked")
104
        public PreviewPanel createPreviewPanel(int buttons, 
105
                    ArrayList list,
106
                    JPanel generalPanel,
107
                    JPanel downPreviewPanel,
108
                    PreviewRenderProcess renderProcess,
109
                    DataSourcePreview dataSource);
110
    
111
    /**
112
     * Creates a preview panel using a data source, a render process and a list
113
     * of panels
114
     * @param buttons
115
     * @param list
116
     * @param generalPanel
117
     * @param downPreviewPanel
118
     * @param renderProcess
119
     * @param dataSource
120
     * @deprecated Use createSinglePreviewPanel without {@link PreviewRenderProcess} parameter.
121
     * @return
122
     */
123
        public PreviewPanel createSinglePreviewPanel( 
124
                    PreviewRenderProcess renderProcess,
125
                    DataSourcePreview dataSource);
126
        
127
    /**
128
     * Creates a preview panel using a render process. After the creation the function
129
     * setLayer in {@link PreviewPanel} should be invoked.
130
     * @param buttons
131
     * @param list
132
     * @param generalPanel
133
     * @param downPreviewPanel
134
     * @param renderProcess
135
     * @param dataSource
136
     * @return
137
     */
138
        public PreviewPanel createSinglePreviewPanel( 
139
                    PreviewRenderProcess renderProcess);
140
    
141
    /**
142
     * Creates the information by point panel
143
     * @param translations
144
     * @param extended
145
     * @return
146
     */
147
    public MainInfoByPointPanel createInfoByPointPanel(
148
                    HashMap<String, String> translations, 
149
                    HashMap<String, ImageIcon> icons, 
150
                    JPanel extended);
151
    
152
    /**
153
     * Creates a button bar component
154
     * @return
155
     */
156
    public ButtonBar createButtonBar();
157

    
158
    /**
159
     * Creates a panel to build a new layer
160
     * @param fileNameManagement
161
     * @param extList
162
     *                         List of file extensions to accept
163
     * @return
164
     */
165
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement);
166
    
167
    /**
168
     * Creates a panel to open files
169
     * @param showBorder
170
     * @param fileFilter
171
     * @return
172
     */
173
    public OpenFileContainer createOpenFileContainer(boolean showBorder, String[] fileFilter, String defaultPath);
174
    
175
    /**
176
     * Creates a panel for manage ROIs of raster
177
     * @return
178
     */
179
    public ROIPanel createROIPanel();
180
}