Revision 38813
tags/v2_0_0_Build_2052/frameworks/_fwAndami/gpl.txt | ||
---|---|---|
1 |
GNU GENERAL PUBLIC LICENSE |
|
2 |
Version 2, June 1991 |
|
3 |
|
|
4 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
|
5 |
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
6 |
Everyone is permitted to copy and distribute verbatim copies |
|
7 |
of this license document, but changing it is not allowed. |
|
8 |
|
|
9 |
Preamble |
|
10 |
|
|
11 |
The licenses for most software are designed to take away your |
|
12 |
freedom to share and change it. By contrast, the GNU General Public |
|
13 |
License is intended to guarantee your freedom to share and change free |
|
14 |
software--to make sure the software is free for all its users. This |
|
15 |
General Public License applies to most of the Free Software |
|
16 |
Foundation's software and to any other program whose authors commit to |
|
17 |
using it. (Some other Free Software Foundation software is covered by |
|
18 |
the GNU Library General Public License instead.) You can apply it to |
|
19 |
your programs, too. |
|
20 |
|
|
21 |
When we speak of free software, we are referring to freedom, not |
|
22 |
price. Our General Public Licenses are designed to make sure that you |
|
23 |
have the freedom to distribute copies of free software (and charge for |
|
24 |
this service if you wish), that you receive source code or can get it |
|
25 |
if you want it, that you can change the software or use pieces of it |
|
26 |
in new free programs; and that you know you can do these things. |
|
27 |
|
|
28 |
To protect your rights, we need to make restrictions that forbid |
|
29 |
anyone to deny you these rights or to ask you to surrender the rights. |
|
30 |
These restrictions translate to certain responsibilities for you if you |
|
31 |
distribute copies of the software, or if you modify it. |
|
32 |
|
|
33 |
For example, if you distribute copies of such a program, whether |
|
34 |
gratis or for a fee, you must give the recipients all the rights that |
|
35 |
you have. You must make sure that they, too, receive or can get the |
|
36 |
source code. And you must show them these terms so they know their |
|
37 |
rights. |
|
38 |
|
|
39 |
We protect your rights with two steps: (1) copyright the software, and |
|
40 |
(2) offer you this license which gives you legal permission to copy, |
|
41 |
distribute and/or modify the software. |
|
42 |
|
|
43 |
Also, for each author's protection and ours, we want to make certain |
|
44 |
that everyone understands that there is no warranty for this free |
|
45 |
software. If the software is modified by someone else and passed on, we |
|
46 |
want its recipients to know that what they have is not the original, so |
|
47 |
that any problems introduced by others will not reflect on the original |
|
48 |
authors' reputations. |
|
49 |
|
|
50 |
Finally, any free program is threatened constantly by software |
|
51 |
patents. We wish to avoid the danger that redistributors of a free |
|
52 |
program will individually obtain patent licenses, in effect making the |
|
53 |
program proprietary. To prevent this, we have made it clear that any |
|
54 |
patent must be licensed for everyone's free use or not licensed at all. |
|
55 |
|
|
56 |
The precise terms and conditions for copying, distribution and |
|
57 |
modification follow. |
|
58 |
|
|
59 |
GNU GENERAL PUBLIC LICENSE |
|
60 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
|
61 |
|
|
62 |
0. This License applies to any program or other work which contains |
|
63 |
a notice placed by the copyright holder saying it may be distributed |
|
64 |
under the terms of this General Public License. The "Program", below, |
|
65 |
refers to any such program or work, and a "work based on the Program" |
|
66 |
means either the Program or any derivative work under copyright law: |
|
67 |
that is to say, a work containing the Program or a portion of it, |
|
68 |
either verbatim or with modifications and/or translated into another |
|
69 |
language. (Hereinafter, translation is included without limitation in |
|
70 |
the term "modification".) Each licensee is addressed as "you". |
|
71 |
|
|
72 |
Activities other than copying, distribution and modification are not |
|
73 |
covered by this License; they are outside its scope. The act of |
|
74 |
running the Program is not restricted, and the output from the Program |
|
75 |
is covered only if its contents constitute a work based on the |
|
76 |
Program (independent of having been made by running the Program). |
|
77 |
Whether that is true depends on what the Program does. |
|
78 |
|
|
79 |
1. You may copy and distribute verbatim copies of the Program's |
|
80 |
source code as you receive it, in any medium, provided that you |
|
81 |
conspicuously and appropriately publish on each copy an appropriate |
|
82 |
copyright notice and disclaimer of warranty; keep intact all the |
|
83 |
notices that refer to this License and to the absence of any warranty; |
|
84 |
and give any other recipients of the Program a copy of this License |
|
85 |
along with the Program. |
|
86 |
|
|
87 |
You may charge a fee for the physical act of transferring a copy, and |
|
88 |
you may at your option offer warranty protection in exchange for a fee. |
|
89 |
|
|
90 |
2. You may modify your copy or copies of the Program or any portion |
|
91 |
of it, thus forming a work based on the Program, and copy and |
|
92 |
distribute such modifications or work under the terms of Section 1 |
|
93 |
above, provided that you also meet all of these conditions: |
|
94 |
|
|
95 |
a) You must cause the modified files to carry prominent notices |
|
96 |
stating that you changed the files and the date of any change. |
|
97 |
|
|
98 |
b) You must cause any work that you distribute or publish, that in |
|
99 |
whole or in part contains or is derived from the Program or any |
|
100 |
part thereof, to be licensed as a whole at no charge to all third |
|
101 |
parties under the terms of this License. |
|
102 |
|
|
103 |
c) If the modified program normally reads commands interactively |
|
104 |
when run, you must cause it, when started running for such |
|
105 |
interactive use in the most ordinary way, to print or display an |
|
106 |
announcement including an appropriate copyright notice and a |
|
107 |
notice that there is no warranty (or else, saying that you provide |
|
108 |
a warranty) and that users may redistribute the program under |
|
109 |
these conditions, and telling the user how to view a copy of this |
|
110 |
License. (Exception: if the Program itself is interactive but |
|
111 |
does not normally print such an announcement, your work based on |
|
112 |
the Program is not required to print an announcement.) |
|
113 |
|
|
114 |
These requirements apply to the modified work as a whole. If |
|
115 |
identifiable sections of that work are not derived from the Program, |
|
116 |
and can be reasonably considered independent and separate works in |
|
117 |
themselves, then this License, and its terms, do not apply to those |
|
118 |
sections when you distribute them as separate works. But when you |
|
119 |
distribute the same sections as part of a whole which is a work based |
|
120 |
on the Program, the distribution of the whole must be on the terms of |
|
121 |
this License, whose permissions for other licensees extend to the |
|
122 |
entire whole, and thus to each and every part regardless of who wrote it. |
|
123 |
|
|
124 |
Thus, it is not the intent of this section to claim rights or contest |
|
125 |
your rights to work written entirely by you; rather, the intent is to |
|
126 |
exercise the right to control the distribution of derivative or |
|
127 |
collective works based on the Program. |
|
128 |
|
|
129 |
In addition, mere aggregation of another work not based on the Program |
|
130 |
with the Program (or with a work based on the Program) on a volume of |
|
131 |
a storage or distribution medium does not bring the other work under |
|
132 |
the scope of this License. |
|
133 |
|
|
134 |
3. You may copy and distribute the Program (or a work based on it, |
|
135 |
under Section 2) in object code or executable form under the terms of |
|
136 |
Sections 1 and 2 above provided that you also do one of the following: |
|
137 |
|
|
138 |
a) Accompany it with the complete corresponding machine-readable |
|
139 |
source code, which must be distributed under the terms of Sections |
|
140 |
1 and 2 above on a medium customarily used for software interchange; or, |
|
141 |
|
|
142 |
b) Accompany it with a written offer, valid for at least three |
|
143 |
years, to give any third party, for a charge no more than your |
|
144 |
cost of physically performing source distribution, a complete |
|
145 |
machine-readable copy of the corresponding source code, to be |
|
146 |
distributed under the terms of Sections 1 and 2 above on a medium |
|
147 |
customarily used for software interchange; or, |
|
148 |
|
|
149 |
c) Accompany it with the information you received as to the offer |
|
150 |
to distribute corresponding source code. (This alternative is |
|
151 |
allowed only for noncommercial distribution and only if you |
|
152 |
received the program in object code or executable form with such |
|
153 |
an offer, in accord with Subsection b above.) |
|
154 |
|
|
155 |
The source code for a work means the preferred form of the work for |
|
156 |
making modifications to it. For an executable work, complete source |
|
157 |
code means all the source code for all modules it contains, plus any |
|
158 |
associated interface definition files, plus the scripts used to |
|
159 |
control compilation and installation of the executable. However, as a |
|
160 |
special exception, the source code distributed need not include |
|
161 |
anything that is normally distributed (in either source or binary |
|
162 |
form) with the major components (compiler, kernel, and so on) of the |
|
163 |
operating system on which the executable runs, unless that component |
|
164 |
itself accompanies the executable. |
|
165 |
|
|
166 |
If distribution of executable or object code is made by offering |
|
167 |
access to copy from a designated place, then offering equivalent |
|
168 |
access to copy the source code from the same place counts as |
|
169 |
distribution of the source code, even though third parties are not |
|
170 |
compelled to copy the source along with the object code. |
|
171 |
|
|
172 |
4. You may not copy, modify, sublicense, or distribute the Program |
|
173 |
except as expressly provided under this License. Any attempt |
|
174 |
otherwise to copy, modify, sublicense or distribute the Program is |
|
175 |
void, and will automatically terminate your rights under this License. |
|
176 |
However, parties who have received copies, or rights, from you under |
|
177 |
this License will not have their licenses terminated so long as such |
|
178 |
parties remain in full compliance. |
|
179 |
|
|
180 |
5. You are not required to accept this License, since you have not |
|
181 |
signed it. However, nothing else grants you permission to modify or |
|
182 |
distribute the Program or its derivative works. These actions are |
|
183 |
prohibited by law if you do not accept this License. Therefore, by |
|
184 |
modifying or distributing the Program (or any work based on the |
|
185 |
Program), you indicate your acceptance of this License to do so, and |
|
186 |
all its terms and conditions for copying, distributing or modifying |
|
187 |
the Program or works based on it. |
|
188 |
|
|
189 |
6. Each time you redistribute the Program (or any work based on the |
|
190 |
Program), the recipient automatically receives a license from the |
|
191 |
original licensor to copy, distribute or modify the Program subject to |
|
192 |
these terms and conditions. You may not impose any further |
|
193 |
restrictions on the recipients' exercise of the rights granted herein. |
|
194 |
You are not responsible for enforcing compliance by third parties to |
|
195 |
this License. |
|
196 |
|
|
197 |
7. If, as a consequence of a court judgment or allegation of patent |
|
198 |
infringement or for any other reason (not limited to patent issues), |
|
199 |
conditions are imposed on you (whether by court order, agreement or |
|
200 |
otherwise) that contradict the conditions of this License, they do not |
|
201 |
excuse you from the conditions of this License. If you cannot |
|
202 |
distribute so as to satisfy simultaneously your obligations under this |
|
203 |
License and any other pertinent obligations, then as a consequence you |
|
204 |
may not distribute the Program at all. For example, if a patent |
|
205 |
license would not permit royalty-free redistribution of the Program by |
|
206 |
all those who receive copies directly or indirectly through you, then |
|
207 |
the only way you could satisfy both it and this License would be to |
|
208 |
refrain entirely from distribution of the Program. |
|
209 |
|
|
210 |
If any portion of this section is held invalid or unenforceable under |
|
211 |
any particular circumstance, the balance of the section is intended to |
|
212 |
apply and the section as a whole is intended to apply in other |
|
213 |
circumstances. |
|
214 |
|
|
215 |
It is not the purpose of this section to induce you to infringe any |
|
216 |
patents or other property right claims or to contest validity of any |
|
217 |
such claims; this section has the sole purpose of protecting the |
|
218 |
integrity of the free software distribution system, which is |
|
219 |
implemented by public license practices. Many people have made |
|
220 |
generous contributions to the wide range of software distributed |
|
221 |
through that system in reliance on consistent application of that |
|
222 |
system; it is up to the author/donor to decide if he or she is willing |
|
223 |
to distribute software through any other system and a licensee cannot |
|
224 |
impose that choice. |
|
225 |
|
|
226 |
This section is intended to make thoroughly clear what is believed to |
|
227 |
be a consequence of the rest of this License. |
|
228 |
|
|
229 |
8. If the distribution and/or use of the Program is restricted in |
|
230 |
certain countries either by patents or by copyrighted interfaces, the |
|
231 |
original copyright holder who places the Program under this License |
|
232 |
may add an explicit geographical distribution limitation excluding |
|
233 |
those countries, so that distribution is permitted only in or among |
|
234 |
countries not thus excluded. In such case, this License incorporates |
|
235 |
the limitation as if written in the body of this License. |
|
236 |
|
|
237 |
9. The Free Software Foundation may publish revised and/or new versions |
|
238 |
of the General Public License from time to time. Such new versions will |
|
239 |
be similar in spirit to the present version, but may differ in detail to |
|
240 |
address new problems or concerns. |
|
241 |
|
|
242 |
Each version is given a distinguishing version number. If the Program |
|
243 |
specifies a version number of this License which applies to it and "any |
|
244 |
later version", you have the option of following the terms and conditions |
|
245 |
either of that version or of any later version published by the Free |
|
246 |
Software Foundation. If the Program does not specify a version number of |
|
247 |
this License, you may choose any version ever published by the Free Software |
|
248 |
Foundation. |
|
249 |
|
|
250 |
10. If you wish to incorporate parts of the Program into other free |
|
251 |
programs whose distribution conditions are different, write to the author |
|
252 |
to ask for permission. For software which is copyrighted by the Free |
|
253 |
Software Foundation, write to the Free Software Foundation; we sometimes |
|
254 |
make exceptions for this. Our decision will be guided by the two goals |
|
255 |
of preserving the free status of all derivatives of our free software and |
|
256 |
of promoting the sharing and reuse of software generally. |
|
257 |
|
|
258 |
NO WARRANTY |
|
259 |
|
|
260 |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
|
261 |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
|
262 |
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
|
263 |
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
|
264 |
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
265 |
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
|
266 |
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
|
267 |
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
|
268 |
REPAIR OR CORRECTION. |
|
269 |
|
|
270 |
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
|
271 |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
|
272 |
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
|
273 |
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
|
274 |
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
|
275 |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
|
276 |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
|
277 |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
|
278 |
POSSIBILITY OF SUCH DAMAGES. |
|
279 |
|
|
280 |
END OF TERMS AND CONDITIONS |
|
281 |
|
|
282 |
How to Apply These Terms to Your New Programs |
|
283 |
|
|
284 |
If you develop a new program, and you want it to be of the greatest |
|
285 |
possible use to the public, the best way to achieve this is to make it |
|
286 |
free software which everyone can redistribute and change under these terms. |
|
287 |
|
|
288 |
To do so, attach the following notices to the program. It is safest |
|
289 |
to attach them to the start of each source file to most effectively |
|
290 |
convey the exclusion of warranty; and each file should have at least |
|
291 |
the "copyright" line and a pointer to where the full notice is found. |
|
292 |
|
|
293 |
<one line to give the program's name and a brief idea of what it does.> |
|
294 |
Copyright (C) <year> <name of author> |
|
295 |
|
|
296 |
This program is free software; you can redistribute it and/or modify |
|
297 |
it under the terms of the GNU General Public License as published by |
|
298 |
the Free Software Foundation; either version 2 of the License, or |
|
299 |
(at your option) any later version. |
|
300 |
|
|
301 |
This program is distributed in the hope that it will be useful, |
|
302 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
303 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
304 |
GNU General Public License for more details. |
|
305 |
|
|
306 |
You should have received a copy of the GNU General Public License |
|
307 |
along with this program; if not, write to the Free Software |
|
308 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
309 |
|
|
310 |
|
|
311 |
Also add information on how to contact you by electronic and paper mail. |
|
312 |
|
|
313 |
If the program is interactive, make it output a short notice like this |
|
314 |
when it starts in an interactive mode: |
|
315 |
|
|
316 |
Gnomovision version 69, Copyright (C) year name of author |
|
317 |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
|
318 |
This is free software, and you are welcome to redistribute it |
|
319 |
under certain conditions; type `show c' for details. |
|
320 |
|
|
321 |
The hypothetical commands `show w' and `show c' should show the appropriate |
|
322 |
parts of the General Public License. Of course, the commands you use may |
|
323 |
be called something other than `show w' and `show c'; they could even be |
|
324 |
mouse-clicks or menu items--whatever suits your program. |
|
325 |
|
|
326 |
You should also get your employer (if you work as a programmer) or your |
|
327 |
school, if any, to sign a "copyright disclaimer" for the program, if |
|
328 |
necessary. Here is a sample; alter the names: |
|
329 |
|
|
330 |
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
|
331 |
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
|
332 |
|
|
333 |
<signature of Ty Coon>, 1 April 1989 |
|
334 |
Ty Coon, President of Vice |
|
335 |
|
|
336 |
This General Public License does not permit incorporating your program into |
|
337 |
proprietary programs. If your program is a subroutine library, you may |
|
338 |
consider it more useful to permit linking proprietary applications with the |
|
339 |
library. If this is what you want to do, use the GNU Library General |
|
340 |
Public License instead of this License. |
|
0 | 341 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/theme/andami-theme.xml | ||
---|---|---|
1 |
<AndamiProperties> |
|
2 |
<ApplicationImages> |
|
3 |
<SplashImages> |
|
4 |
<Splash |
|
5 |
path="splash.png" |
|
6 |
timer="10000" |
|
7 |
x="270" y="240" |
|
8 |
fontsize="18" color="80,170,240" |
|
9 |
version="2.0.0"/> |
|
10 |
</SplashImages> |
|
11 |
<!-- |
|
12 |
<BackgroundImage path="gvsig-icon16x16.png"/> |
|
13 |
--> |
|
14 |
<WallpaperType value="CENTERED"/> |
|
15 |
<Icon path="gvsig-icon16x16.png"/> |
|
16 |
</ApplicationImages> |
|
17 |
<ApplicationName value="Andami 2.0.0"/> |
|
18 |
</AndamiProperties> |
|
0 | 19 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/theme/README.txt | ||
---|---|---|
1 |
Use those files as a template for your own andami theme. |
|
2 |
|
|
3 |
If none provided by any plugin, this theme will be used as the default one. |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/schemas/sample-plugins-persistence.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugins-status> |
|
3 |
<plugin name="gvsig" lastUpdate="237628686"> |
|
4 |
<xml-entity name="config"> |
|
5 |
<property name="dataDirectory" value="c:\"/> |
|
6 |
<xml-entity> |
|
7 |
<property name="dataDirectory" value="c:\"/> |
|
8 |
<property name="dataDirectory" value="c:\"/> |
|
9 |
<property name="dataDirectory" value="c:\"/> |
|
10 |
</xml-entity> |
|
11 |
</xml-entity> |
|
12 |
<bookmarks> |
|
13 |
<bookmark text="Recientes/raster"> |
|
14 |
<xml-entity> |
|
15 |
<property name="projection" value="EPSG:3403"/> |
|
16 |
<property name="boundinBox" value="12,12,115,115"/> |
|
17 |
</xml-entity> |
|
18 |
</bookmark> |
|
19 |
</bookmarks> |
|
20 |
<windows> |
|
21 |
<window id="0" rectangle="0,0,150,150"/> |
|
22 |
<window id="2" rectangle="50,50,150,150"/> |
|
23 |
<window id="8" rectangle="100,100,150,150"/> |
|
24 |
<window id="12" rectangle="150,150,150,150"/> |
|
25 |
</windows> |
|
26 |
</plugin> |
|
27 |
<tool-bars> |
|
28 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="1"/> |
|
29 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="0"/> |
|
30 |
</tool-bars> |
|
31 |
</plugins-status> |
|
0 | 32 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/schemas/sample-config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<icon src="images/logoGVA.gif" text="gvSIG"/> |
|
4 |
<resourceBundle name="text"/> |
|
5 |
<import plugin-name="com.iver.cit.gvsig" /> |
|
6 |
<labelSet class="com.iver.cit.gvsig.gui.View"> |
|
7 |
<label id="1" size="100"/> |
|
8 |
<label id="2" size="230"/> |
|
9 |
</labelSet> |
|
10 |
<libraries> |
|
11 |
<library file="com.iver.cit.gvsig.jar"/> |
|
12 |
<library file="wmsclient.jar"/> |
|
13 |
</libraries> |
|
14 |
<extensions> |
|
15 |
<extension> |
|
16 |
<class name="com.iver.cit.gvsig.ProjectExtension"/> |
|
17 |
<menu text="Archivo/nuevo_proyecto" |
|
18 |
key="n" mnemonic="n" |
|
19 |
tooltip="nuevo_tooltip" |
|
20 |
action-command="NUEVO" icon="images/new.png"/> |
|
21 |
<menu text="Archivo/abrir_proyecto" |
|
22 |
key="a" mnemonic="a" |
|
23 |
tooltip="abrir_tooltip" |
|
24 |
action-command="ABRIR" icon="images/open.png"/> |
|
25 |
<menu text="Archivo/guardar_proyecto" |
|
26 |
key="g" mnemonic="g" |
|
27 |
tooltip="guardar_tooltip" |
|
28 |
action-command="GUARDAR" icon="images/save.png"/> |
|
29 |
|
|
30 |
<toolBar> |
|
31 |
<tool icon="images/new.png" tooltip="nuevo_tooltip" |
|
32 |
action-command="NUEVO"/> |
|
33 |
<tool icon="images/open.png" tooltip="abrir_tooltip" |
|
34 |
action-command="ABRIR"/> |
|
35 |
<tool icon="images/save.png" tooltip="guardar_tooltip" |
|
36 |
action-command="GUARDAR"/> |
|
37 |
|
|
38 |
<!-- these will be added to the containing toolbar --> |
|
39 |
<combo-scale |
|
40 |
name="JPEG Quality" |
|
41 |
elements="15;30;60;70;80;90;100" |
|
42 |
value="80" |
|
43 |
action-command="JPEG_QUALITY" /> |
|
44 |
|
|
45 |
<combo-button |
|
46 |
name="Copy/paste tools"> |
|
47 |
<combo-button-element icon="images/scissor.png" action-command="CUT" /> |
|
48 |
<combo-button-element icon="images/paste.png" action-command="PASTE" /> |
|
49 |
<combo-button-element icon="images/copy.png" action-command="COPY" /> |
|
50 |
</combo-button> |
|
51 |
</toolBar> |
|
52 |
|
|
53 |
</extension> |
|
54 |
|
|
55 |
<extension> |
|
56 |
<class name="com.iver.cit.gvsig.ZoomPrev"/> |
|
57 |
<menu text="Vista/Zoom_Previo" icon="images/ZoomPrevio.png"/> |
|
58 |
<tool-bar name="Herramientas"> |
|
59 |
<action-tool icon="images/ZoomPrevio.png" action-command="ZOOM_PREV" tooltip="Zoom_Previo" position="11"/> |
|
60 |
</tool-bar> |
|
61 |
|
|
62 |
<!-- these will be added to the status-bar (because they are not contained in any toolbar) --> |
|
63 |
<combo-scale |
|
64 |
name="Scale" |
|
65 |
label="Scale:" |
|
66 |
elements="1000;2000;5000;10000;25000;50000;100000;200000;500000;1000000;2000000;5000000" |
|
67 |
value="10000" |
|
68 |
action-command="CHANGE_SCALE" /> |
|
69 |
|
|
70 |
<combo-button |
|
71 |
name="Tool Mode"> |
|
72 |
<combo-button-element icon="images/once.png" action-command="USE_ONCE" /> |
|
73 |
<combo-button-element icon="images/sticky-tool.png" action-command="UNTIL_CHANGED" /> |
|
74 |
</combo-button> |
|
75 |
</extension> |
|
76 |
<extension processing-position="2"> |
|
77 |
<class name="com.iver.cit.gvsig.ViewControls"/> |
|
78 |
<menus> |
|
79 |
<menu text="Vista/Zoom_Completo" action-command="FULL" icon="images/MapContents.png" tooltip="Zoom completo a la v?sta"/> |
|
80 |
<menu text="Vista/Zoom_Select" action-command="ZOOM_SELECT" icon="image/Select.png"/> |
|
81 |
<menu text="Vista/Encuadre" action-command="ENCUADRE" icon="images/encuadre.png"/> |
|
82 |
<menu text="Vista/Seleccion_por_tema" action-command="SELECTIONBYSHAPE"/> |
|
83 |
<menu text="Vista/configurar_localizador" action-command="CONFIG_LOCATOR"/> |
|
84 |
<menu text="Vista/propiedades" action-command="PROPERTIES"/> |
|
85 |
</menus> |
|
86 |
<tool-bar name="Herramientas" y-position="1"> |
|
87 |
<action-tool icon="images/MapContents.png" action-command="FULL" tooltip="Zoom_Completo" position="1"/> |
|
88 |
<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" last="true" position="2"/> |
|
89 |
<selectable-tool group="grupo1" default="true" icon="images/ZoomIn.png" action-command="ZOOM_IN" tooltip="Zoom_M?s" position="3"/> |
|
90 |
<selectable-tool group="grupo1" icon="images/ZoomOut.png" action-command="ZOOM_OUT" position="4"/> |
|
91 |
<selectable-tool group="grupo1" icon="images/Pan.png" action-command="PAN" tooltip="Encuadre" position="5"/> |
|
92 |
<selectable-tool group="grupo1" icon="images/Identify.png" action-command="INFO" tooltip="informacion" position="6" /> |
|
93 |
<selectable-tool group="grupo2" icon="images/Distancia.png" action-command="MEDICION" tooltip="medir_distancias" position="7"/> |
|
94 |
<selectable-tool group="grupo2" icon="images/Poligono16.png" action-command="AREA" tooltip="medir_area" position="8"/> |
|
95 |
<selectable-tool group="grupo2" default="true" icon="images/Select.png" action-command="SELPOINT" tooltip="seleccionar_por_punto" position="9"/> |
|
96 |
<selectable-tool group="grupo2" icon="images/SelEspacial2b.png" action-command="SELRECT" tooltip="seleccionar_por_rectangulo" position="10"/> |
|
97 |
</tool-bar> |
|
98 |
</extension> |
|
99 |
<extension> |
|
100 |
<class name="com.iver.cit.gvsig.ThemeControls"/> |
|
101 |
<menu text="Tema/propiedades"/> |
|
102 |
</extension> |
|
103 |
</extensions> |
|
104 |
|
|
105 |
<file-extensions> |
|
106 |
<file-extension description="DGNfiles" ends-with="dgn" dialog="openLayer"> |
|
107 |
<class name="com.iver.cit.gvsig.DGNFileExtension"/> |
|
108 |
</file-extension> |
|
109 |
<file-extension description="Rasterfiles" ends-with="ecw,tif,tiff,jpg,png" dialog="openLayer"> |
|
110 |
<class name="com.iver.cit.gvsig.RasterFileExtension"/> |
|
111 |
</file-extension> |
|
112 |
</file-extensions> |
|
113 |
</plugin-config> |
|
0 | 114 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/schemas/andami-config.xml | ||
---|---|---|
1 |
<andami-config locale-language="es" locale-country="ES" locale-variant="es" pluginsDirectory="c:\tirar"> |
|
2 |
<andami update="yes"/> |
|
3 |
<plugin name="com.iver.cit.gvsig" update="yes"/> |
|
4 |
<plugin name="com.iver.core" update="no"/> |
|
5 |
<andami-options> |
|
6 |
<option name="CustomOption1" value="customValue1"/> |
|
7 |
<icon-theme name="DefaultTheme" resource="iconThemes/default" basedir="iconThemes" /> |
|
8 |
</andami-options> |
|
9 |
</andami-config> |
|
0 | 10 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src-test/org/gvsig/andami/AllTests.java | ||
---|---|---|
1 |
package org.gvsig.andami; |
|
2 |
|
|
3 |
import junit.framework.Test; |
|
4 |
import junit.framework.TestSuite; |
|
5 |
|
|
6 |
public class AllTests { |
|
7 |
|
|
8 |
public static Test suite() { |
|
9 |
TestSuite suite = new TestSuite("Test for com.iver.andami"); |
|
10 |
//$JUnit-BEGIN$ |
|
11 |
|
|
12 |
//$JUnit-END$ |
|
13 |
return suite; |
|
14 |
} |
|
15 |
|
|
16 |
} |
|
0 | 17 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/castor.properties | ||
---|---|---|
1 |
org.exolab.castor.indent=true |
|
0 | 2 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/compile-classpath.xml | ||
---|---|---|
1 |
<project name="_fwAndami.compile-classpath" basedir="."> |
|
2 |
<!-- defines the classpath to be used for batch-compilation --> |
|
3 |
<property name="andami" location="../_fwAndami"/> |
|
4 |
<property name="andamiLibs" location="${andami}/lib"/> |
|
5 |
<path id="_fwAndami.compile-classpath"> |
|
6 |
<pathelement location="${andamiLibs}/beans.jar"/> |
|
7 |
<pathelement location="${andamiLibs}/castor-0.9.5.3-xml.jar"/> |
|
8 |
<pathelement location="${andamiLibs}/gvsig-i18n.jar"/> |
|
9 |
<pathelement location="${andamiLibs}/iver-utiles.jar"/> |
|
10 |
<pathelement location="${andamiLibs}/javaws.jar"/> |
|
11 |
<pathelement location="${andamiLibs}/JWizardComponent.jar"/> |
|
12 |
<pathelement location="${andamiLibs}/log4j-1.2.8.jar"/> |
|
13 |
<pathelement location="${andamiLibs}/tempFileManager.jar"/> |
|
14 |
<pathelement location="${andamiLibs}/xercesImpl.jar"/> |
|
15 |
<pathelement location="${andamiLibs}/xml-apis.jar"/> |
|
16 |
<pathelement location="${andamiLibs}/kxml2.jar"/> |
|
17 |
<pathelement location="${andamiLibs}/jcalendar.jar"/> |
|
18 |
</path> |
|
19 |
</project> |
|
0 | 20 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/PluginsLibrary.java | ||
---|---|---|
1 |
package org.gvsig.andami; |
|
2 |
|
|
3 |
import org.gvsig.andami.actioninfo.impl.DefaultActionInfoManager; |
|
4 |
import org.gvsig.andami.impl.DefaultPluginsManager; |
|
5 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
6 |
import org.gvsig.tools.library.AbstractLibrary; |
|
7 |
import org.gvsig.tools.library.LibraryException; |
|
8 |
import org.gvsig.tools.util.Caller; |
|
9 |
import org.gvsig.tools.util.impl.DefaultCaller; |
|
10 |
|
|
11 |
|
|
12 |
public class PluginsLibrary extends AbstractLibrary { |
|
13 |
|
|
14 |
@Override |
|
15 |
public void doRegistration() { |
|
16 |
registerAsAPI(PluginsLibrary.class); |
|
17 |
} |
|
18 |
|
|
19 |
protected void doInitialize() throws LibraryException { |
|
20 |
PluginsLocator.registerDefaultManager(DefaultPluginsManager.class); |
|
21 |
PluginsLocator.registerActionInfoManager(DefaultActionInfoManager.class); |
|
22 |
} |
|
23 |
|
|
24 |
protected void doPostInitialize() throws LibraryException { |
|
25 |
Caller caller = new DefaultCaller(); |
|
26 |
|
|
27 |
caller.add( new WindowInfo.RegisterPersistence() ); |
|
28 |
|
|
29 |
/* |
|
30 |
* Do register of all |
|
31 |
*/ |
|
32 |
if( !caller.call() ) { |
|
33 |
throw new LibraryException(PluginsLibrary.class, caller.getExceptions()); |
|
34 |
} |
|
35 |
|
|
36 |
|
|
37 |
} |
|
38 |
|
|
39 |
} |
|
0 | 40 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/help/Help.java | ||
---|---|---|
1 |
package org.gvsig.andami.help; |
|
2 |
|
|
3 |
import java.awt.event.ActionEvent; |
|
4 |
import java.awt.event.ActionListener; |
|
5 |
import java.awt.event.KeyEvent; |
|
6 |
import java.io.File; |
|
7 |
import java.net.MalformedURLException; |
|
8 |
import java.net.URL; |
|
9 |
import java.net.URLClassLoader; |
|
10 |
import java.text.MessageFormat; |
|
11 |
import java.util.ArrayList; |
|
12 |
import java.util.Iterator; |
|
13 |
import java.util.Locale; |
|
14 |
|
|
15 |
import javax.help.HelpSet; |
|
16 |
import javax.swing.JComponent; |
|
17 |
import javax.swing.KeyStroke; |
|
18 |
|
|
19 |
import org.slf4j.Logger; |
|
20 |
import org.slf4j.LoggerFactory; |
|
21 |
|
|
22 |
|
|
23 |
public class Help { |
|
24 |
|
|
25 |
private static Help help = null; |
|
26 |
|
|
27 |
private HelpSet mainHS = null; |
|
28 |
private ArrayList resources = new ArrayList(); |
|
29 |
private ArrayList helps = new ArrayList(); |
|
30 |
|
|
31 |
private HelpPanel window=null; |
|
32 |
|
|
33 |
public static Help getHelp() { |
|
34 |
if( help == null ) { |
|
35 |
help = new Help(); |
|
36 |
} |
|
37 |
return help; |
|
38 |
} |
|
39 |
|
|
40 |
private Logger log() { |
|
41 |
return LoggerFactory.getLogger("org.gvsig"); |
|
42 |
} |
|
43 |
|
|
44 |
public void show() { |
|
45 |
log().info("show()"); |
|
46 |
show(null); |
|
47 |
} |
|
48 |
|
|
49 |
public void show(String id) { |
|
50 |
try { |
|
51 |
log().info("show(id) id="+id); |
|
52 |
initHelp(); |
|
53 |
try { |
|
54 |
window.showWindow(id); |
|
55 |
}catch(NullPointerException e) { |
|
56 |
window = new AndamiHelpPanel(mainHS, id); |
|
57 |
window.showWindow(); |
|
58 |
} |
|
59 |
} catch (Exception ex) { |
|
60 |
log().error("Se ha producido un error mostrando la ventana de ayuda.",ex); |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
public void enableHelp(JComponent comp, String id) |
|
65 |
{ |
|
66 |
try{ |
|
67 |
initHelp(); |
|
68 |
comp.registerKeyboardAction(new DisplayHelpFromFocus(id), KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); |
|
69 |
} |
|
70 |
catch(Exception except){ |
|
71 |
log().error("ID: "+id+" erronea"); |
|
72 |
} |
|
73 |
} |
|
74 |
|
|
75 |
public boolean addResource(String path) { |
|
76 |
URL url = null; |
|
77 |
try { |
|
78 |
url = (new File(path)).toURL(); |
|
79 |
} catch (MalformedURLException e) { |
|
80 |
return false; |
|
81 |
} |
|
82 |
resources.add(url); |
|
83 |
return true; |
|
84 |
} |
|
85 |
|
|
86 |
|
|
87 |
public boolean addHelp(String helpName) { |
|
88 |
helps.add(helpName); |
|
89 |
return true; |
|
90 |
} |
|
91 |
|
|
92 |
private void initHelp() |
|
93 |
{ |
|
94 |
if ( mainHS != null ) { |
|
95 |
return; |
|
96 |
} |
|
97 |
|
|
98 |
// |
|
99 |
// Obtenemos un array de URLs de array list de URLs |
|
100 |
// |
|
101 |
URL urls[] = new URL[resources.size()]; |
|
102 |
int i=0; |
|
103 |
for( Iterator it=resources.iterator(); it.hasNext() ;) { |
|
104 |
urls[i++] = (URL) it.next(); |
|
105 |
} |
|
106 |
|
|
107 |
// |
|
108 |
// Creamos la lista de helpsets que han de componer |
|
109 |
// la ayuda |
|
110 |
// |
|
111 |
ArrayList helpSets = new ArrayList(); |
|
112 |
|
|
113 |
for( Iterator it=helps.iterator(); it.hasNext() ;) { |
|
114 |
String name = (String) it.next(); |
|
115 |
String lang = Locale.getDefault().getLanguage(); |
|
116 |
HelpSet hs = createHelpSet(urls, name + "/" + lang + "/help.hs"); |
|
117 |
if( hs == null ) { |
|
118 |
lang = "en"; |
|
119 |
hs = createHelpSet(urls, name + "/" + lang + "/help.hs"); |
|
120 |
} |
|
121 |
if( hs != null ) { |
|
122 |
helpSets.add(hs); |
|
123 |
} |
|
124 |
} |
|
125 |
|
|
126 |
// |
|
127 |
// Fijamos el primer helpset de la lista como master y |
|
128 |
// le a?adimos (merge) a este los demas helpsets |
|
129 |
// |
|
130 |
Iterator it=helpSets.iterator(); |
|
131 |
if( ! it.hasNext() ) { |
|
132 |
return; |
|
133 |
} |
|
134 |
mainHS = (HelpSet) it.next(); |
|
135 |
while( it.hasNext() ) { |
|
136 |
try { |
|
137 |
mainHS.add( (HelpSet) it.next() ); |
|
138 |
} catch (Exception ex) { |
|
139 |
log().error(ex.toString()); |
|
140 |
} |
|
141 |
} |
|
142 |
} |
|
143 |
|
|
144 |
private HelpSet createHelpSet(URL resources[], String hsName) { |
|
145 |
HelpSet hs = null; |
|
146 |
|
|
147 |
ClassLoader loader = ClassLoader.getSystemClassLoader(); |
|
148 |
loader = new URLClassLoader(resources, loader); |
|
149 |
URL url = HelpSet.findHelpSet(loader, hsName); |
|
150 |
if (url == null) { |
|
151 |
log().error( |
|
152 |
MessageFormat.format( |
|
153 |
"No se ha encontrado el helpset ''{0}''.", |
|
154 |
new Object[] { hsName } |
|
155 |
) |
|
156 |
); |
|
157 |
return null; |
|
158 |
} |
|
159 |
log().info("createHelpSet: url="+url); |
|
160 |
|
|
161 |
try { |
|
162 |
hs = new HelpSet(null, url); |
|
163 |
} catch (Exception ex) { |
|
164 |
log().error( |
|
165 |
MessageFormat.format( |
|
166 |
"No se ha podido cargar el helpset desde ''{0}''.", |
|
167 |
new Object[] { url } |
|
168 |
), |
|
169 |
ex |
|
170 |
); |
|
171 |
return null; |
|
172 |
} |
|
173 |
return hs; |
|
174 |
} |
|
175 |
|
|
176 |
|
|
177 |
public class DisplayHelpFromFocus implements ActionListener { |
|
178 |
|
|
179 |
private String id = null; |
|
180 |
|
|
181 |
public DisplayHelpFromFocus(String id) { |
|
182 |
log().info("DisplayHelpFromFocus(id) id="+id); |
|
183 |
this.id=id; |
|
184 |
} |
|
185 |
|
|
186 |
public void actionPerformed(ActionEvent e) { |
|
187 |
Help.getHelp().show(this.id); |
|
188 |
} |
|
189 |
} |
|
190 |
} |
|
191 |
|
|
0 | 192 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/help/HelpPanel.java | ||
---|---|---|
1 |
package org.gvsig.andami.help; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.Frame; |
|
5 |
import java.awt.event.ComponentEvent; |
|
6 |
import java.awt.event.ComponentListener; |
|
7 |
|
|
8 |
import javax.help.BadIDException; |
|
9 |
import javax.help.HelpSet; |
|
10 |
import javax.help.JHelp; |
|
11 |
import javax.swing.JPanel; |
|
12 |
|
|
13 |
import org.slf4j.Logger; |
|
14 |
import org.slf4j.LoggerFactory; |
|
15 |
|
|
16 |
public class HelpPanel extends JPanel { |
|
17 |
|
|
18 |
private static final long serialVersionUID = 4164482247505362337L; |
|
19 |
|
|
20 |
public static int WIDTH = 645; |
|
21 |
public static int HEIGHT = 495; |
|
22 |
private String title = null; |
|
23 |
private JHelp jh; |
|
24 |
|
|
25 |
private Logger log() { |
|
26 |
return LoggerFactory.getLogger("org.gvsig"); |
|
27 |
} |
|
28 |
|
|
29 |
public HelpPanel(HelpSet hs){ |
|
30 |
log().info("HelpPanel(hs)"); |
|
31 |
init(hs,null); |
|
32 |
} |
|
33 |
|
|
34 |
public HelpPanel(HelpSet hs, String id){ |
|
35 |
log().info("HelpPanel(hs,id) id="+id); |
|
36 |
init(hs,id); |
|
37 |
} |
|
38 |
|
|
39 |
private void init(HelpSet hs, String id){ |
|
40 |
jh = new JHelp(hs); |
|
41 |
log().info("init() ID "+ id); |
|
42 |
if (id != null) { |
|
43 |
try { |
|
44 |
log().info("init() setCurrentID "+ id); |
|
45 |
jh.setCurrentID(id); |
|
46 |
} catch (BadIDException ex) { |
|
47 |
log().error(ex.toString()); |
|
48 |
|
|
49 |
} catch (NullPointerException ex) { |
|
50 |
log().error(ex.toString()); |
|
51 |
} |
|
52 |
} |
|
53 |
String hsTitle = hs.getTitle(); |
|
54 |
if (hsTitle == null || hsTitle.equals("")) { |
|
55 |
hsTitle = "gvSIG Help"; |
|
56 |
} |
|
57 |
title = hsTitle; |
|
58 |
setLayout(new BorderLayout()); |
|
59 |
add(jh,BorderLayout.CENTER); |
|
60 |
} |
|
61 |
|
|
62 |
public void showWindow() { |
|
63 |
|
|
64 |
log().info("showWindow()"); |
|
65 |
Frame frame = new Frame(); |
|
66 |
frame.add(this); |
|
67 |
frame.setSize(WIDTH, HEIGHT + 30); |
|
68 |
frame.setTitle(getTitle()); |
|
69 |
frame.setResizable(true); |
|
70 |
this.setVisible(true); |
|
71 |
frame.show(); |
|
72 |
} |
|
73 |
|
|
74 |
public void showWindow(String id) { |
|
75 |
if (id != null) { |
|
76 |
try { |
|
77 |
log().info("showWindow(id) -> setCurrentID "+ id); |
|
78 |
jh.setCurrentID(id); |
|
79 |
} catch (BadIDException ex) { |
|
80 |
log().error(ex.toString()); |
|
81 |
} |
|
82 |
} |
|
83 |
String hsTitle = jh.getHelpSetPresentation().getTitle(); |
|
84 |
if (hsTitle == null || hsTitle.equals("")) { |
|
85 |
hsTitle = "gvSIG Help"; |
|
86 |
} |
|
87 |
title = hsTitle; |
|
88 |
showWindow(); |
|
89 |
} |
|
90 |
|
|
91 |
public String getTitle() { |
|
92 |
return this.title; |
|
93 |
} |
|
94 |
|
|
95 |
} |
|
0 | 96 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/help/AndamiHelpPanel.java | ||
---|---|---|
1 |
package org.gvsig.andami.help; |
|
2 |
|
|
3 |
import javax.help.HelpSet; |
|
4 |
|
|
5 |
import org.gvsig.andami.PluginServices; |
|
6 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
7 |
import org.gvsig.andami.ui.mdiManager.MDIManager; |
|
8 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
public class AndamiHelpPanel extends HelpPanel implements IWindow { |
|
13 |
|
|
14 |
private static final long serialVersionUID = 2683827167020046672L; |
|
15 |
|
|
16 |
private WindowInfo info = null ; |
|
17 |
|
|
18 |
public AndamiHelpPanel(HelpSet hs){ |
|
19 |
super(hs); |
|
20 |
} |
|
21 |
|
|
22 |
public AndamiHelpPanel(HelpSet hs, String id){ |
|
23 |
super(hs,id); |
|
24 |
} |
|
25 |
|
|
26 |
public void showWindow() { |
|
27 |
MDIManager mdim = PluginServices.getMDIManager(); |
|
28 |
mdim.addWindow((IWindow) this); |
|
29 |
} |
|
30 |
|
|
31 |
public WindowInfo getWindowInfo() { |
|
32 |
if( info == null ) { |
|
33 |
info = new WindowInfo( WindowInfo.RESIZABLE | |
|
34 |
WindowInfo.MAXIMIZABLE | WindowInfo.MODELESSDIALOG); |
|
35 |
info.setHeight(HEIGHT); |
|
36 |
info.setWidth(WIDTH); |
|
37 |
info.setTitle(getTitle()); |
|
38 |
} |
|
39 |
return info; |
|
40 |
} |
|
41 |
|
|
42 |
public Object getWindowProfile() { |
|
43 |
return WindowInfo.TOOL_PROFILE; |
|
44 |
} |
|
45 |
|
|
46 |
} |
|
0 | 47 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/ActionInfoManager.java | ||
---|---|---|
1 |
package org.gvsig.andami.actioninfo; |
|
2 |
|
|
3 |
import java.util.Iterator; |
|
4 |
|
|
5 |
import org.gvsig.andami.plugins.IExtension; |
|
6 |
|
|
7 |
public interface ActionInfoManager { |
|
8 |
|
|
9 |
/** |
|
10 |
* Create a new action and return. |
|
11 |
* |
|
12 |
* @param extension, class that execute the action, extends IExtension |
|
13 |
* @param name, name of the action |
|
14 |
* @param text, text to use to represent the action. |
|
15 |
* @param command, command used to execute the action |
|
16 |
* @param icon, icon used to represent the action |
|
17 |
* @param accelerator, the key which invokes the action |
|
18 |
* @param position, position of the action when it is represented in the user interface |
|
19 |
* @param tip, tooltip to associate to the action |
|
20 |
* @return |
|
21 |
*/ |
|
22 |
public ActionInfo createAction(Class<? extends IExtension> extension, String name, String text, String command, String icon, String accelerator, long position, String tip); |
|
23 |
|
|
24 |
/** |
|
25 |
* Register the action in the actions of the system, and return the action |
|
26 |
* that is registered. |
|
27 |
* |
|
28 |
* If an action with the same name is in the system then actions are merged |
|
29 |
* and the merged action is returned and remain in the system. |
|
30 |
* |
|
31 |
* @param action |
|
32 |
*/ |
|
33 |
public ActionInfo registerAction(ActionInfo action); |
|
34 |
|
|
35 |
/** |
|
36 |
* Retrieve an action by name |
|
37 |
* |
|
38 |
* @param name |
|
39 |
* @return the action associated to this name |
|
40 |
*/ |
|
41 |
public ActionInfo getAction(String name); |
|
42 |
|
|
43 |
/** |
|
44 |
* Return an iterator over all registered actions. |
|
45 |
* |
|
46 |
* @return iterator over al acctions |
|
47 |
*/ |
|
48 |
public Iterator<ActionInfo> getActions(); |
|
49 |
|
|
50 |
public ActionInfoStatusCache createActionStatusCache(); |
|
51 |
|
|
52 |
/** |
|
53 |
* Redirect the action source to the target. |
|
54 |
* |
|
55 |
* @param sourceName of action |
|
56 |
* @param targetName of action |
|
57 |
*/ |
|
58 |
public void redirect(String sourceName, String targetName); |
|
59 |
} |
|
0 | 60 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/ActionInfo.java | ||
---|---|---|
1 |
package org.gvsig.andami.actioninfo; |
|
2 |
|
|
3 |
import java.awt.event.ActionListener; |
|
4 |
import java.util.Collection; |
|
5 |
|
|
6 |
import javax.swing.Action; |
|
7 |
import javax.swing.ImageIcon; |
|
8 |
import javax.swing.KeyStroke; |
|
9 |
|
|
10 |
import org.gvsig.andami.PluginServices; |
|
11 |
import org.gvsig.andami.plugins.IExtension; |
|
12 |
|
|
13 |
/** |
|
14 |
* Esta entidad representa a una accion dentro de gvSIG, que podra ser usada |
|
15 |
* por menus, botones de la toolbar, menus contextuales, o desde cualquier |
|
16 |
* otro elemento de gvSIG que precise invocar a una accion. |
|
17 |
* |
|
18 |
* La accion esta compuesta por una definicion de cual es su etiqueta, su |
|
19 |
* icono, teclas aceleradoras, su tip, o su posicion respecto a otras acciones, |
|
20 |
* junto con una extension (IExtension) que aporta el codigo de la accion. |
|
21 |
* |
|
22 |
* Una accion responde principalmente a cuatro operaciones: |
|
23 |
* |
|
24 |
* - isActive, que nos indica si la accion esta activa, es decir, si |
|
25 |
* debera presentarse al usuario o no. Si una extension no esta activa, |
|
26 |
* los metodos isVisible y isEnabled retornaran siempre false, sin invocar |
|
27 |
* al codigo de la extension asociada a la accion. |
|
28 |
* |
|
29 |
* - isVisible, que nos indica si la accion debera presentarse o no en el |
|
30 |
* interface de usuario. De forma general podemos asumir que cuando se |
|
31 |
* invoque a este metodo se delegara en el metodo isVisible de la extension |
|
32 |
* asociada a la accion. |
|
33 |
* |
|
34 |
* - isEnabled, que nos indica si la accion debera estar habilitada o no en |
|
35 |
* el interface de usuario. De forma general podemos asumir que cuando se |
|
36 |
* invoque a este metodo se delegara en el metodo isEnabled de la extension |
|
37 |
* asociada a la accion. |
|
38 |
* |
|
39 |
* - execute, que provocara que se ejecute el codigo asociado a la accion. |
|
40 |
* De forma general podemos asumir que cuando se invoque a estos metodo se |
|
41 |
* delegara en el metodo execute de la extension asociada a esta accion, pasandole |
|
42 |
* el "command" de la accion como parametro. |
|
43 |
* |
|
44 |
* Ademas de la definicion de la accion, esta tambien puede disponer de una coleccion |
|
45 |
* de acciones hacia las que puede ser redirigida. Esto es, en un momento dado |
|
46 |
* nos puede interesar que cuando sea invocada la accion "A", en lugar de ejecutarse |
|
47 |
* las operaciones de esta, se ejecuten las operaciones de otra accion "B". Esto nos |
|
48 |
* permite atrapar la ejecucion de una accion independientemente de desde donde se este |
|
49 |
* invocando. Cuando una accion tenga asignadas otras acciones a las que redirigir |
|
50 |
* su ejecucion, solo se redigira a una de ellas, la primera en la coleccion de acciones a |
|
51 |
* redirigir que responda "true" a su metodo isEnabled, y en caso de que no responda true |
|
52 |
* ninguna se ejecutara el codigo de la accion original. El orden de la coleccion de |
|
53 |
* acciones a las que redirigir de una accion sera el orden inverso en el que se han |
|
54 |
* ido registrandose las redirecciones. Asi primero se intentara con la ultima redireccion |
|
55 |
* asignada, luego con la anterior, y asi sucesivamente se recorreran todas las redireccion |
|
56 |
* hasta que una responda "true" a su isEnabled, ejecutandose entonces el codigo de esta. |
|
57 |
* |
|
58 |
* |
|
59 |
* @author jjdelcerro |
|
60 |
* |
|
61 |
*/ |
|
62 |
public interface ActionInfo extends Action, ActionListener{ |
|
63 |
|
|
64 |
/** |
|
65 |
* returns the plugin of the extension asociated to the action. |
|
66 |
* |
|
67 |
* @return pluginServices asiciated to the action. |
|
68 |
*/ |
|
69 |
public PluginServices getPlugin(); |
|
70 |
|
|
71 |
/** |
|
72 |
* returns the extension asociated to the action. The action |
|
73 |
* delegates the methods isEnabled, isVisible and execute in this |
|
74 |
* extension when these are invoked. |
|
75 |
* |
|
76 |
* @return IExtension asociated to the action |
|
77 |
*/ |
|
78 |
public IExtension getExtension(); |
|
79 |
|
|
80 |
/** |
|
81 |
* Return the plugin name of the plugin asociated to the action. |
|
82 |
* This is a utility method checkins null values. is equivalent to: |
|
83 |
* |
|
84 |
* action.getPlugin().getPluginName() |
|
85 |
* |
|
86 |
* |
|
87 |
* @return plugin name |
|
88 |
* @see #getPlugin() |
|
89 |
*/ |
|
90 |
public String getPluginName(); |
|
91 |
|
|
92 |
/** |
|
93 |
* Returns the extension name of the extension asociated to this action. |
|
94 |
* This a utility method that check null values. Is equivalent to: |
|
95 |
* |
|
96 |
* action.getExtension().getClass().getName() |
|
97 |
* |
|
98 |
* @return extension name. |
|
99 |
* @see #getExtension() |
|
100 |
*/ |
|
101 |
public String getExtensionName(); |
|
102 |
|
|
103 |
/** |
|
104 |
* Returns the name of the action. This name is usaed to retrieve the |
|
105 |
* action thwros the manager. |
|
106 |
* |
|
107 |
* @return action name |
|
108 |
*/ |
|
109 |
public String getName(); |
|
110 |
|
|
111 |
/** |
|
112 |
* Return a label asociated to the action. This label can be used |
|
113 |
* in buttons, o menus. |
|
114 |
* |
|
115 |
* @return label of action |
|
116 |
*/ |
|
117 |
public String getLabel(); |
|
118 |
|
|
119 |
/** |
|
120 |
* Returns the command used for invoking the execute method of |
|
121 |
* the extension asociated to this action. |
|
122 |
* |
|
123 |
* @return command of action |
|
124 |
*/ |
|
125 |
public String getCommand(); |
|
126 |
|
|
127 |
/** |
|
128 |
* Return an icon asociated to the action. This icon can be used |
|
129 |
* in buttons, o menus. |
|
130 |
* |
|
131 |
* @return ImageIcon asociated tho the action |
|
132 |
*/ |
|
133 |
public ImageIcon getIcon(); |
|
134 |
|
|
135 |
/** |
|
136 |
* Returns the name of icon asociated to the action. This name is |
|
137 |
* used to retrive the icon from the current icon theme of the application. |
|
138 |
* |
|
139 |
* @return icon name. |
|
140 |
*/ |
|
141 |
public String getIconName(); |
|
142 |
|
|
143 |
/** |
|
144 |
* returns a representation human readable of the accelerator to be used |
|
145 |
* associated to the action. |
|
146 |
* |
|
147 |
* @return String representing the accelerator |
|
148 |
*/ |
|
149 |
public String getAccelerator(); |
|
150 |
|
|
151 |
/** |
|
152 |
* returns the KeyStroke which represents the accelerator of this |
|
153 |
* action. |
|
154 |
* |
|
155 |
* @return keystroke asociated to this action |
|
156 |
* @see #getAccelerator() |
|
157 |
*/ |
|
158 |
public KeyStroke getKeyStroke(); |
|
159 |
|
|
160 |
/** |
|
161 |
* Return a string that represents a tip asociated whit the action, |
|
162 |
* usually used as tooltip in buttons or menus. |
|
163 |
* |
|
164 |
* @return the tip of the action |
|
165 |
*/ |
|
166 |
public String getTooltip(); |
|
167 |
|
|
168 |
/** |
|
169 |
* Return the position absolute of the action referred to all actions. |
|
170 |
* |
|
171 |
* @return the position of the action |
|
172 |
*/ |
|
173 |
public long getPosition(); |
|
174 |
|
|
175 |
/** |
|
176 |
* retrurn if the action can be visible in the user interface or not. |
|
177 |
* This method call the isVisible of the extension asociated to the action, |
|
178 |
* unless the action is inactive. |
|
179 |
* If has a ExclusiveUIExtension set, then this is invoqued instead of the |
|
180 |
* the isVisible of the extension. |
|
181 |
* |
|
182 |
* @return if the action if visible for the user. |
|
183 |
*/ |
|
184 |
public boolean isVisible(); |
|
185 |
|
|
186 |
/** |
|
187 |
* retrurn if the action is enables. |
|
188 |
* This method call the isEnabled of the extension asociated to the action, |
|
189 |
* unless the action is inactive. |
|
190 |
* This method is used to determine whether it is possible to redirect |
|
191 |
* to this action or not. |
|
192 |
* If has a ExclusiveUIExtension set, then this is invoqued instead of the |
|
193 |
* the isEnabled of the extension. |
|
194 |
* |
|
195 |
* @return if the action if visible for the user. |
|
196 |
*/ |
|
197 |
public boolean isEnabled(); |
|
198 |
|
|
199 |
/** |
|
200 |
* Execute the code asociated to the action. |
|
201 |
* This method call the execute method of the asociated exetnsion using the |
|
202 |
* command of action as argument. |
|
203 |
* If the action is redirected try to call to the redirected actions. |
|
204 |
* |
|
205 |
*/ |
|
206 |
public void execute(); |
|
207 |
|
|
208 |
/** |
|
209 |
* Execute the code asociated to the action. |
|
210 |
* Pass the args to the execute of the asociated extension. |
|
211 |
* |
|
212 |
* @see #execute() |
|
213 |
*/ |
|
214 |
public void execute(Object[] args); |
|
215 |
|
|
216 |
/** |
|
217 |
* Execute the code asociated to the action. |
|
218 |
* Pass the args to the execute of the asociated extension. |
|
219 |
* |
|
220 |
* @see #execute() |
|
221 |
*/ |
|
222 |
public void execute(Object arg); |
|
223 |
|
|
224 |
/** |
|
225 |
* Return true is the action is active. When an action is active the methods |
|
226 |
* isEnable and isVisible call the methods of the extension asociated to this. |
|
227 |
* When is inactive always return false. |
|
228 |
* |
|
229 |
* @return if the action is active |
|
230 |
*/ |
|
231 |
public boolean isActive(); |
|
232 |
/** |
|
233 |
* Set the active state of an ActionInfo. |
|
234 |
* When the active state is set to false, isEnabled, and isVisible |
|
235 |
* returns false. |
|
236 |
* |
|
237 |
* @param active |
|
238 |
*/ |
|
239 |
public void setActive(boolean active); |
|
240 |
|
|
241 |
/** |
|
242 |
* |
|
243 |
* An action can redirect the execution of the execute, isVisible and isEnabled methods |
|
244 |
* to other action. Using this method is can be query and set this redirections. |
|
245 |
* The redirect will be established only if the method isEnabled of target action |
|
246 |
* returns true. Otherwise execute methods of initial action. |
|
247 |
* |
|
248 |
* @return the redirections established for this action |
|
249 |
*/ |
|
250 |
public Collection<ActionInfo> getRedirections(); |
|
251 |
|
|
252 |
} |
|
0 | 253 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/ActionInfoStatusCache.java | ||
---|---|---|
1 |
package org.gvsig.andami.actioninfo; |
|
2 |
|
|
3 |
public interface ActionInfoStatusCache { |
|
4 |
public void clear(); |
|
5 |
|
|
6 |
public boolean isEnabled(ActionInfo action); |
|
7 |
|
|
8 |
public boolean isVisible(ActionInfo action); |
|
9 |
} |
|
0 | 10 |
tags/v2_0_0_Build_2052/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/impl/DefaultActionInfoStatusCache.java | ||
---|---|---|
1 |
package org.gvsig.andami.actioninfo.impl; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.andami.actioninfo.ActionInfo; |
|
7 |
import org.gvsig.andami.actioninfo.ActionInfoStatusCache; |
|
8 |
import org.gvsig.andami.plugins.ExtensionHelper; |
|
9 |
import org.gvsig.andami.plugins.IExtension; |
|
10 |
|
|
11 |
public class DefaultActionInfoStatusCache implements ActionInfoStatusCache { |
|
12 |
|
|
13 |
private class Status { |
|
14 |
Boolean isEnabled = null; |
|
15 |
Boolean isVisible = null; |
Also available in: Unified diff