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

History | View | Annotate | Download (6.77 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2012 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 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
 * 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.raster.swing;
25

    
26
import java.awt.Color;
27
import java.util.ArrayList;
28
import java.util.HashMap;
29

    
30
import javax.swing.ImageIcon;
31
import javax.swing.JComponent;
32
import javax.swing.JPanel;
33

    
34
import org.gvsig.raster.swing.basepanel.IButtonsPanel;
35
import org.gvsig.raster.swing.buttonbar.ButtonBar;
36
import org.gvsig.raster.swing.gcanvas.GCanvas;
37
import org.gvsig.raster.swing.infobypoint.MainInfoByPointPanel;
38
import org.gvsig.raster.swing.newlayer.CreateNewLayerPanel;
39
import org.gvsig.raster.swing.newlayer.FileNameManagement;
40
import org.gvsig.raster.swing.openfile.OpenFileContainer;
41
import org.gvsig.raster.swing.pagedtable.ModelLoader;
42
import org.gvsig.raster.swing.pagedtable.PagedTable;
43
import org.gvsig.raster.swing.pagedtable.TableModel;
44
import org.gvsig.raster.swing.preview.DataSourcePreview;
45
import org.gvsig.raster.swing.preview.PreviewPanel;
46
import org.gvsig.raster.swing.preview.PreviewRenderProcess;
47
import org.gvsig.raster.swing.roi.ROIPanel;
48
import org.gvsig.raster.swing.slider.SliderText;
49

    
50

    
51
/**
52
 * This class is responsible of the management of the library's swing user
53
 * interface. It is the swing library's main entry point, and provides all the
54
 * services to manage library swing components.
55
 * 
56
 * @see RasterWindowManager
57
 * @see JValidationServicePanel
58
 * @author gvSIG team
59
 * @version $Id$
60
 */
61
public interface RasterSwingManager {
62

    
63
    /**
64
     * Returns the translation of a string.
65
     * 
66
     * @param key
67
     *            String to translate
68
     * @return a String with the translation of the string passed by parameter
69
     */
70
    public String getTranslation(String key);
71

    
72
    /**
73
     * Registers a new instance of a WindowManager which provides services to
74
     * the management of the application windows.
75
     * 
76
     * @param manager
77
     *            {@link RasterWindowManager} to register in the
78
     *            ScriptingUIManager.
79
     * @see RasterWindowManager
80
     */
81
    public void registerWindowManager(RasterWindowManager manager);
82

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

    
148
    /**
149
     * Creates a panel to build a new layer
150
     * @param fileNameManagement
151
     * @param extList
152
     *                         List of file extensions to accept
153
     * @return
154
     * @deprecated Uses createNewLayerPanel without parameters. The FileNameManagement should be built internally
155
     */
156
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement);
157
    public CreateNewLayerPanel createNewLayerPanel();
158
    
159
    /**
160
     * Creates a panel to build a new layer
161
     * @param fileNameManagement
162
     * @param extList
163
     *                         List of file extensions to accept
164
     * @param tittle
165
     *          Tittle for the window
166
     * @return
167
     * @deprecated Uses createNewLayerPanel with the title as parameter. The FileNameManagement should be built internally
168
     */
169
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement, String title);
170
    public CreateNewLayerPanel createNewLayerPanel(String title);
171
    
172
    /**
173
     * Creates a panel to open files
174
     * @param showBorder
175
     * @param fileFilter
176
     * @return
177
     */
178
    public OpenFileContainer createOpenFileContainer(boolean showBorder, String[] fileFilter, String defaultPath);
179
    
180
    /**
181
     * Creates a panel for manage ROIs of raster
182
     * @return
183
     */
184
    public ROIPanel createROIPanel();
185
    
186
    /**
187
     * Creates a paged table component
188
     * @param modelLoader
189
     * @return
190
     */
191
    public PagedTable createPagedTable(ModelLoader modelLoader);
192
    
193
    /**
194
     * Creates a model loader for a paged table
195
     * @return
196
     */
197
    public ModelLoader createModelLoader(TableModel tableModel);
198
    
199
    /**
200
     * Creates a buttons panel
201
     * @param parent
202
     * @return
203
     */
204
    public IButtonsPanel createButtonsPanel(int buttons, JComponent parent);
205
    
206
    /**
207
     * Creates a slider with a text box
208
     * @return
209
     */
210
    public SliderText createSliderText(int min, int max, int defaultValue, boolean border);
211
    
212
    /**
213
     * Shows the summary of a process
214
     * @param fileName
215
     * @param time
216
     */
217
    public void showSummaryProcessDialog(String fileName, long time);
218
}