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

History | View | Annotate | Download (6.29 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
    @SuppressWarnings("unchecked")
112
        public PreviewPanel createPreviewPanel(int buttons, 
113
                    ArrayList list,
114
                    JPanel generalPanel,
115
                    JPanel downPreviewPanel,
116
                    PreviewRenderProcess renderProcess,
117
                    DataSourcePreview dataSource);
118
    
119
    /**
120
     * Creates a preview panel using a data source and a render process. After 
121
     * the creation the function previewInitializeSizes in {@link PreviewPanel} 
122
     * should be invoked.
123
     * @param renderProcess {@link PreviewRenderProcess}
124
     * @param dataSource {@link DataSourcePreview}
125
     * @return {@link PreviewPanel} 
126
     */
127
        public PreviewPanel createSinglePreviewPanel( 
128
                    PreviewRenderProcess renderProcess,
129
                    DataSourcePreview dataSource);
130
        
131
    
132
    /**
133
     * Creates the information by point panel
134
     * @param translations
135
     * @param extended
136
     * @return
137
     */
138
    public MainInfoByPointPanel createInfoByPointPanel(
139
                    HashMap<String, String> translations, 
140
                    HashMap<String, ImageIcon> icons, 
141
                    JPanel extended);
142
    
143
    /**
144
     * Creates a button bar component
145
     * @return
146
     */
147
    public ButtonBar createButtonBar();
148

    
149
    /**
150
     * Creates a panel to build a new layer
151
     * @param fileNameManagement
152
     * @param extList
153
     *                         List of file extensions to accept
154
     * @return
155
     */
156
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement);
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
     * @param tittle
164
     *          Tittle for the window
165
     * @return
166
     */
167
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement, String tittle);
168
    
169
    
170
    /**
171
     * Creates a panel to open files
172
     * @param showBorder
173
     * @param fileFilter
174
     * @return
175
     */
176
    public OpenFileContainer createOpenFileContainer(boolean showBorder, String[] fileFilter, String defaultPath);
177
    
178
    /**
179
     * Creates a panel for manage ROIs of raster
180
     * @return
181
     */
182
    public ROIPanel createROIPanel();
183
    
184
    /**
185
     * Creates a paged table component
186
     * @param modelLoader
187
     * @return
188
     */
189
    public PagedTable createPagedTable(ModelLoader modelLoader);
190
    
191
    /**
192
     * Creates a model loader for a paged table
193
     * @return
194
     */
195
    public ModelLoader createModelLoader(TableModel tableModel);
196
    
197
    /**
198
     * Creates a buttons panel
199
     * @param parent
200
     * @return
201
     */
202
    public IButtonsPanel createButtonsPanel(int buttons, JComponent parent);
203
    
204
    /**
205
     * Creates a slider with a text box
206
     * @return
207
     */
208
    public SliderText getSliderText(int min, int max, int defaultValue, boolean border);
209
    
210
}