Revision 14951
import/ext3D/trunk/ext3D/config/config.xml | ||
---|---|---|
22 | 22 |
<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" /> |
23 | 23 |
</tool-bar> |
24 | 24 |
</extension> |
25 |
|
|
26 |
|
|
25 |
<extension class-name="com.iver.ai2.gvsig3d.gui.ViewPropertiesExtension3D" |
|
26 |
description="Extensi?n encargada de gestionar el di?logo de propiedades de la vista 3D." |
|
27 |
active="true"> |
|
28 |
<menu text="Vista/propiedades" action-command="PROPERTIES"/> |
|
29 |
</extension> |
|
27 | 30 |
</extensions> |
28 | 31 |
</plugin-config> |
import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/gui/ViewPropertiesExtension3D.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
42 |
* |
|
43 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
44 |
* |
|
45 |
* This program is free software; you can redistribute it and/or |
|
46 |
* modify it under the terms of the GNU General Public License |
|
47 |
* as published by the Free Software Foundation; either version 2 |
|
48 |
* of the License, or (at your option) any later version. |
|
49 |
* |
|
50 |
* This program is distributed in the hope that it will be useful, |
|
51 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
52 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
53 |
* GNU General Public License for more details. |
|
54 |
* |
|
55 |
* You should have received a copy of the GNU General Public License |
|
56 |
* along with this program; if not, write to the Free Software |
|
57 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
58 |
* |
|
59 |
* For more information, contact: |
|
60 |
* |
|
61 |
* Generalitat Valenciana |
|
62 |
* Conselleria d'Infraestructures i Transport |
|
63 |
* Av. Blasco Ib??ez, 50 |
|
64 |
* 46010 VALENCIA |
|
65 |
* SPAIN |
|
66 |
* |
|
67 |
* +34 963862235 |
|
68 |
* gvsig@gva.es |
|
69 |
* www.gvsig.gva.es |
|
70 |
* |
|
71 |
* or |
|
72 |
* |
|
73 |
* IVER T.I. S.A |
|
74 |
* Salamanca 50 |
|
75 |
* 46005 Valencia |
|
76 |
* Spain |
|
77 |
* |
|
78 |
* +34 963163400 |
|
79 |
* dac@iver.es |
|
80 |
*/ |
|
81 |
package com.iver.ai2.gvsig3d.gui; |
|
82 |
|
|
83 |
import javax.swing.JFrame; |
|
84 |
import javax.swing.JPanel; |
|
85 |
|
|
86 |
import com.iver.ai2.gvsig3d.gui.ViewProperties3D; |
|
87 |
import com.iver.andami.PluginServices; |
|
88 |
import com.iver.andami.plugins.Extension; |
|
89 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
90 |
import com.iver.cit.gvsig.project.documents.gui.FOpenDialog; |
|
91 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
|
92 |
import com.iver.cit.gvsig.project.documents.view.ProjectView; |
|
93 |
import com.iver.cit.gvsig.project.documents.view.ProjectViewBase; |
|
94 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
|
95 |
|
|
96 |
/** |
|
97 |
* DOCUMENT ME! |
|
98 |
* |
|
99 |
* @author Vicente Caballero Navarro |
|
100 |
*/ |
|
101 |
public class ViewPropertiesExtension3D extends Extension { |
|
102 |
/** |
|
103 |
* DOCUMENT ME! |
|
104 |
*/ |
|
105 |
public void initialize() { |
|
106 |
} |
|
107 |
|
|
108 |
/** |
|
109 |
* DOCUMENT ME! |
|
110 |
* |
|
111 |
* @param s |
|
112 |
* DOCUMENT ME! |
|
113 |
*/ |
|
114 |
public void execute(String s) { |
|
115 |
com.iver.andami.ui.mdiManager.IWindow view = PluginServices |
|
116 |
.getMDIManager().getActiveWindow(); |
|
117 |
if (!(view instanceof View3D)) |
|
118 |
return; |
|
119 |
System.out.println("RECUPERADA LA VISTA 3D"); |
|
120 |
View3D vista3D = (View3D) view; |
|
121 |
IProjectView model = vista3D.getModel(); |
|
122 |
|
|
123 |
if (s.equals("PROPERTIES")) { |
|
124 |
// FOpenDialog fopen = new FOpenDialog(); |
|
125 |
// // Create a child container which is to be associated with a tab |
|
126 |
// JPanel panel = new JPanel(); |
|
127 |
// |
|
128 |
// // Add a tab |
|
129 |
// String label = "Tab Label"; |
|
130 |
// fopen.addTab(label, panel); |
|
131 |
// PluginServices.getMDIManager().addWindow(fopen); |
|
132 |
//View3D viewModel = (View3D) model; |
|
133 |
ViewProperties3D viewProperties = new ViewProperties3D(null); |
|
134 |
PluginServices.getMDIManager().addWindow(viewProperties); |
|
135 |
} |
|
136 |
} |
|
137 |
|
|
138 |
/** |
|
139 |
* DOCUMENT ME! |
|
140 |
* |
|
141 |
* @return DOCUMENT ME! |
|
142 |
*/ |
|
143 |
public boolean isEnabled() { |
|
144 |
return true; |
|
145 |
} |
|
146 |
|
|
147 |
/** |
|
148 |
* DOCUMENT ME! |
|
149 |
* |
|
150 |
* @return DOCUMENT ME! |
|
151 |
*/ |
|
152 |
public boolean isVisible() { |
|
153 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices |
|
154 |
.getMDIManager().getActiveWindow(); |
|
155 |
if (f == null) { |
|
156 |
return false; |
|
157 |
} |
|
158 |
return (f instanceof View3D); |
|
159 |
} |
|
160 |
} |
import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/gui/ViewProperties3D.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package com.iver.ai2.gvsig3d.gui; |
|
42 |
|
|
43 |
|
|
44 |
import javax.swing.JPanel; |
|
45 |
|
|
46 |
import com.iver.andami.PluginServices; |
|
47 |
import com.iver.andami.ui.mdiManager.SingletonWindow; |
|
48 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
|
49 |
import com.iver.cit.gvsig.project.documents.view.ProjectViewBase; |
|
50 |
/** |
|
51 |
* Dialogo donde se muestran las propiedades de una vista |
|
52 |
* |
|
53 |
* @author Fernando Gonz?lez Cort?s |
|
54 |
*/ |
|
55 |
public class ViewProperties3D extends JPanel implements SingletonWindow{ |
|
56 |
private View3D view3D=null; |
|
57 |
/** |
|
58 |
* This is the default constructor |
|
59 |
* |
|
60 |
* @param f Frame padre del dialogo |
|
61 |
* @param v Vista que se representa |
|
62 |
*/ |
|
63 |
public ViewProperties3D(View3D v) { |
|
64 |
view3D = v; |
|
65 |
initialize(); |
|
66 |
} |
|
67 |
|
|
68 |
/** |
|
69 |
* This method initializes this |
|
70 |
*/ |
|
71 |
private void initialize() { |
|
72 |
this.setSize(378, 358); |
|
73 |
// java.awt.FlowLayout layFlowLayout3 = new java.awt.FlowLayout(); |
|
74 |
// layFlowLayout3.setHgap(0); |
|
75 |
// setLayout(layFlowLayout3); |
|
76 |
this.setPreferredSize(new java.awt.Dimension(100,100)); |
|
77 |
|
|
78 |
|
|
79 |
add(new javax.swing.JPanel(), null); |
|
80 |
this.setName("dialogo de propiedades"); |
|
81 |
} |
|
82 |
|
|
83 |
public Object getWindowModel() { |
|
84 |
// TODO Auto-generated method stub |
|
85 |
return view3D; |
|
86 |
} |
|
87 |
|
|
88 |
public WindowInfo getWindowInfo() { |
|
89 |
WindowInfo m_viewinfo=new WindowInfo(); |
|
90 |
m_viewinfo.setTitle("propiedades_vista_3D"); |
|
91 |
m_viewinfo.setHeight(100); |
|
92 |
return m_viewinfo; |
|
93 |
} |
|
94 |
|
|
95 |
|
|
96 |
} |
Also available in: Unified diff