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

History | View | Annotate | Download (5.25 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.pagedtable.ModelLoader;
38
import org.gvsig.raster.swing.pagedtable.PagedTable;
39
import org.gvsig.raster.swing.preview.DataSourcePreview;
40
import org.gvsig.raster.swing.preview.PreviewPanel;
41
import org.gvsig.raster.swing.preview.PreviewRenderProcess;
42
import org.gvsig.raster.swing.roi.ROIPanel;
43

    
44

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

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

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

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

    
143
    /**
144
     * Creates a panel to build a new layer
145
     * @param fileNameManagement
146
     * @param extList
147
     *                         List of file extensions to accept
148
     * @return
149
     */
150
    public CreateNewLayerPanel createNewLayerPanel(FileNameManagement fileNameManagement);
151
    
152
    /**
153
     * Creates a panel to open files
154
     * @param showBorder
155
     * @param fileFilter
156
     * @return
157
     */
158
    public OpenFileContainer createOpenFileContainer(boolean showBorder, String[] fileFilter, String defaultPath);
159
    
160
    /**
161
     * Creates a panel for manage ROIs of raster
162
     * @return
163
     */
164
    public ROIPanel createROIPanel();
165
    
166
    /**
167
     * Creates a paged table component
168
     * @param modelLoader
169
     * @return
170
     */
171
    public PagedTable createPagedTable(ModelLoader modelLoader);
172
}