svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / ViewPropertiesExtension.java @ 3718
History | View | Annotate | Download (3.74 KB)
1 | 2523 | caballero | /* 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.cit.gvsig; |
||
82 | |||
83 | import com.iver.andami.PluginServices; |
||
84 | import com.iver.andami.plugins.Extension; |
||
85 | import com.iver.cit.gvsig.gui.View; |
||
86 | import com.iver.cit.gvsig.gui.project.ViewProperties; |
||
87 | import com.iver.cit.gvsig.project.ProjectView; |
||
88 | |||
89 | |||
90 | /**
|
||
91 | * DOCUMENT ME!
|
||
92 | *
|
||
93 | * @author Vicente Caballero Navarro
|
||
94 | */
|
||
95 | public class ViewPropertiesExtension implements Extension { |
||
96 | /**
|
||
97 | * DOCUMENT ME!
|
||
98 | */
|
||
99 | public void inicializar() { |
||
100 | } |
||
101 | |||
102 | /**
|
||
103 | * DOCUMENT ME!
|
||
104 | *
|
||
105 | * @param s DOCUMENT ME!
|
||
106 | */
|
||
107 | public void execute(String s) { |
||
108 | View vista = (View) PluginServices.getMDIManager().getActiveView(); |
||
109 | ProjectView model = vista.getModel(); |
||
110 | |||
111 | if (s.compareTo("PROPERTIES") == 0) { |
||
112 | ViewProperties viewProperties = new ViewProperties(model);
|
||
113 | PluginServices.getMDIManager().addView(viewProperties); |
||
114 | } |
||
115 | } |
||
116 | |||
117 | /**
|
||
118 | * DOCUMENT ME!
|
||
119 | *
|
||
120 | * @return DOCUMENT ME!
|
||
121 | */
|
||
122 | public boolean isEnabled() { |
||
123 | return true; |
||
124 | } |
||
125 | |||
126 | /**
|
||
127 | * DOCUMENT ME!
|
||
128 | *
|
||
129 | * @return DOCUMENT ME!
|
||
130 | */
|
||
131 | public boolean isVisible() { |
||
132 | com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager() |
||
133 | .getActiveView(); |
||
134 | if (f == null) { |
||
135 | return false; |
||
136 | } |
||
137 | return (f.getClass() == View.class); |
||
138 | } |
||
139 | } |