gvsig-3d / 2.1 / branches / org.gvsig.view3d_vector_and_extrusion_2.3 / org.gvsig.view3d / org.gvsig.view3d / org.gvsig.view3d.swing / org.gvsig.view3d.swing.api / src / main / java / org / gvsig / view3d / swing / api / View3DSwingManager.java @ 708
History | View | Annotate | Download (8.42 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright � 2007-2015 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 |
|
25 |
package org.gvsig.view3d.swing.api; |
26 |
|
27 |
import java.util.List; |
28 |
|
29 |
import org.gvsig.fmap.mapcontext.MapContext; |
30 |
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport; |
31 |
import org.gvsig.view3d.lib.api.properties.LayerProperties3D; |
32 |
import org.gvsig.view3d.swing.api.properties.GeneralProperties3D; |
33 |
import org.gvsig.view3d.swing.api.properties.GeneralProperties3DPanel; |
34 |
import org.gvsig.view3d.swing.api.properties.ILayerProperties3DPanel; |
35 |
import org.gvsig.view3d.swing.api.properties.MapControlProperties3D; |
36 |
import org.gvsig.view3d.swing.api.properties.ViewProperties3DPanel; |
37 |
|
38 |
/**
|
39 |
* This class is responsible of the management of the library's swing user
|
40 |
* interface. It is the swing library's main entry point, and provides all the
|
41 |
* services to manage library swing components.
|
42 |
*
|
43 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
|
44 |
*
|
45 |
*/
|
46 |
public interface View3DSwingManager { |
47 |
|
48 |
public enum TYPE { |
49 |
SPHERE, FLAT |
50 |
} |
51 |
|
52 |
/**
|
53 |
* Creates the general 3D properties panel. General 3D properties is used to
|
54 |
* show and change General 3D properties in a graphical way. See
|
55 |
* {@link GeneralProperties3D}.
|
56 |
*
|
57 |
* @param properties
|
58 |
* Model of general 3D properties panel.
|
59 |
* @return general 3D properties panel.
|
60 |
*/
|
61 |
public GeneralProperties3DPanel createGeneralProperties3DPanel(GeneralProperties3D properties);
|
62 |
|
63 |
/**
|
64 |
* Creates the layer 3D properties panel. Layer 3D properties panel is used
|
65 |
* to show and change layer 3D properties in a graphical way. See
|
66 |
* {@link LayerProperties3D}.
|
67 |
*
|
68 |
* @param name
|
69 |
* the name/type of the panel to create. Needs to be one of the registered.
|
70 |
* @return layer 3D properties panel.
|
71 |
*/
|
72 |
public ILayerProperties3DPanel createLayerProperties3DPanel(String name); |
73 |
|
74 |
/**
|
75 |
* Registers and creatres a <code>MapControl3D</code> as from
|
76 |
* {@link MapContext} {@link TYPE}. When an {@link MapControl3D} is created,
|
77 |
* it automatically adds all available and visible layers of
|
78 |
* <code>MapControl</code>.
|
79 |
*
|
80 |
* @param theMapContext
|
81 |
* associated <code>MapContext</code> of
|
82 |
* <code>MapControl3D</code>
|
83 |
* @param type
|
84 |
* Type of <code>MapControl3D</code>. See {@link TYPE}.
|
85 |
* @param viewProperties
|
86 |
* View properties to register this <code>MapControl3D</code>
|
87 |
* @see View3DSwingManager#createView3DPanel(MapControl3D, String)
|
88 |
* @see View3DSwingManager#createViewProperties3DPanel(MapControlProperties3D)
|
89 |
* @return an instance of <code>MapControl3D</code> ready to be shown.
|
90 |
*/
|
91 |
public MapControl3D createMapControl3D(MapContext theMapContext, TYPE type,
|
92 |
ExtendedPropertiesSupport viewProperties); |
93 |
|
94 |
/**
|
95 |
* Creates a <code>View3DPanel</code> with a {@link MapControl3D}.
|
96 |
*
|
97 |
* @param theMapContext
|
98 |
* associated <code>MapContext</code> of
|
99 |
* <code>MapControl3D</code>
|
100 |
* @param title
|
101 |
* Title of window
|
102 |
* @param type
|
103 |
* Type of <code>MapControl3D</code>. See {@link TYPE}.
|
104 |
* @param viewProperties
|
105 |
* View properties to register this <code>MapControl3D</code>
|
106 |
* @see View3DSwingManager#createMapControl3D(MapContext, TYPE)
|
107 |
* @see View3DSwingManager#createView3DPanel(MapControl3D, String)
|
108 |
* @return
|
109 |
*/
|
110 |
public View3DPanel createView3DPanel(MapContext theMapContext, String title, TYPE type, |
111 |
ExtendedPropertiesSupport viewProperties); |
112 |
|
113 |
/**
|
114 |
* Creates a <code>View3DPanel</code> with a {@link MapControl3D}.
|
115 |
*
|
116 |
* @param mapControl3D
|
117 |
* Model of the <code>View3DPanel</code>.
|
118 |
* @param title
|
119 |
* Title of panel.
|
120 |
* @see View3DSwingManager#createView3DPanel(MapContext, String, TYPE,
|
121 |
* ExtendedPropertiesSupport)
|
122 |
* @see View3DSwingManager#createMapControl3D(MapContext, TYPE,
|
123 |
* ExtendedPropertiesSupport)
|
124 |
* @return The <code>View3DPanel</code>.
|
125 |
*/
|
126 |
public View3DPanel createView3DPanel(MapControl3D mapControl3D, String title); |
127 |
|
128 |
/**
|
129 |
* Creates the view 3D properties panel. View 3D properties panel is used to
|
130 |
* show and change MapControl 3D properties in a graphical way. See
|
131 |
* {@link MapControlProperties3D}.
|
132 |
*
|
133 |
* @param properties
|
134 |
* Model of view 3D properties panel.
|
135 |
* @return view 3D properites panel.
|
136 |
*/
|
137 |
public ViewProperties3DPanel createViewProperties3DPanel(MapControlProperties3D properties);
|
138 |
|
139 |
/**
|
140 |
* Gets <code>GeneralProperties3D<code> of 3D library.
|
141 |
*
|
142 |
* @see View3DSwingManager#setGeneral3DProperties(GeneralProperties3D)
|
143 |
* @return
|
144 |
*/
|
145 |
public GeneralProperties3D getGeneral3DProperties();
|
146 |
|
147 |
/**
|
148 |
* Gets the {@link MapControl3D} associated with view properties
|
149 |
* {@link ExtendedPropertiesSupport}. If there are not indicated type of
|
150 |
* <code>MapControl3D</code> associated with view properties, it will return
|
151 |
* an empty list.
|
152 |
*
|
153 |
* @param viewProperties
|
154 |
* @see View3DSwingManager#getMapControl3D(ExtendedPropertiesSupport, TYPE)
|
155 |
* @return List of <code>MapControl3D</code> associated with the view
|
156 |
* propoerties.
|
157 |
*/
|
158 |
public List<MapControl3D> getMapControl3D(ExtendedPropertiesSupport viewProperties); |
159 |
|
160 |
/**
|
161 |
* Gets the {@link MapControl3D} associated with view properties
|
162 |
* {@link ExtendedPropertiesSupport}. Returns <code>null</code>, if there
|
163 |
* are
|
164 |
* not indicated type of <code>MapControl3D</code> registered at view
|
165 |
* properties.
|
166 |
*
|
167 |
* @param viewProperties
|
168 |
* @param type
|
169 |
* Type of <code>MapControl3D</code>
|
170 |
* @see View3DSwingManager#getMapControl3D(ExtendedPropertiesSupport)
|
171 |
* @return
|
172 |
*/
|
173 |
public MapControl3D getMapControl3D(ExtendedPropertiesSupport viewProperties, TYPE type);
|
174 |
|
175 |
/**
|
176 |
* Gets <code>MapControlProperties3D</code> linked with the view properties.
|
177 |
*
|
178 |
* @param viewProperties
|
179 |
* View properties to get the <code>MapControlProperties3D</code>
|
180 |
* associated.
|
181 |
* @see View3DSwingManager#setMapControlProperties3D(ExtendedPropertiesSupport,
|
182 |
* MapControlProperties3D)
|
183 |
* @return
|
184 |
*/
|
185 |
public MapControlProperties3D getMapControl3DProperties(ExtendedPropertiesSupport viewProperties);
|
186 |
|
187 |
/**
|
188 |
* Sets <code>GeneralProperties3D</code> to 3D library.
|
189 |
*
|
190 |
* @param properties
|
191 |
* General 3D properties.
|
192 |
* @see View3DSwingManager#getGeneral3DProperties()
|
193 |
*/
|
194 |
public void setGeneral3DProperties(GeneralProperties3D properties); |
195 |
|
196 |
/**
|
197 |
* Sets <code>MapControlProperties3D</code> to view properties.
|
198 |
*
|
199 |
* @param viewProperties
|
200 |
* View properties to link the
|
201 |
* <code>MapControlProperties3D</code>.
|
202 |
* @param mapControl3DProperties
|
203 |
* The {@link MapControlProperties3D} to be linked.
|
204 |
* @see View3DSwingManager#getMapControl3DProperties(ExtendedPropertiesSupport)
|
205 |
*/
|
206 |
public void setMapControlProperties3D(ExtendedPropertiesSupport viewProperties, |
207 |
MapControlProperties3D mapControl3DProperties); |
208 |
|
209 |
/**
|
210 |
* Register a properties panel.
|
211 |
*
|
212 |
* @param propertiesPanel the panel.
|
213 |
*/
|
214 |
public void registerPropertiesPanel(ILayerProperties3DPanel propertiesPanel); |
215 |
|
216 |
/**
|
217 |
* Get a properties panel by name.
|
218 |
*
|
219 |
* @param name the name of the panel.
|
220 |
* @return the panel or <code>null</code>.
|
221 |
*/
|
222 |
public ILayerProperties3DPanel getPropertiesPanelByName(String name); |
223 |
} |