root / branches / piloto3d / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / view / toc / actions / FLyrRasterAdjustTransparencyTocMenuEntry.java @ 9529
History | View | Annotate | Download (3.01 KB)
1 |
package com.iver.cit.gvsig.project.documents.view.toc.actions; |
---|---|
2 |
|
3 |
import java.awt.event.ActionEvent; |
4 |
|
5 |
import javax.swing.JMenuItem; |
6 |
|
7 |
import com.iver.andami.PluginServices; |
8 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
9 |
import com.iver.cit.gvsig.fmap.layers.FLyrDefault; |
10 |
import com.iver.cit.gvsig.fmap.layers.FLyrRaster; |
11 |
import com.iver.cit.gvsig.gui.panels.AdjustTransparencyPanel; |
12 |
import com.iver.cit.gvsig.project.documents.view.toc.TocMenuEntry; |
13 |
import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu; |
14 |
|
15 |
|
16 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
17 |
*
|
18 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
19 |
*
|
20 |
* This program is free software; you can redistribute it and/or
|
21 |
* modify it under the terms of the GNU General Public License
|
22 |
* as published by the Free Software Foundation; either version 2
|
23 |
* of the License, or (at your option) any later version.
|
24 |
*
|
25 |
* This program is distributed in the hope that it will be useful,
|
26 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28 |
* GNU General Public License for more details.
|
29 |
*
|
30 |
* You should have received a copy of the GNU General Public License
|
31 |
* along with this program; if not, write to the Free Software
|
32 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
33 |
*
|
34 |
* For more information, contact:
|
35 |
*
|
36 |
* Generalitat Valenciana
|
37 |
* Conselleria d'Infraestructures i Transport
|
38 |
* Av. Blasco Ib??ez, 50
|
39 |
* 46010 VALENCIA
|
40 |
* SPAIN
|
41 |
*
|
42 |
* +34 963862235
|
43 |
* gvsig@gva.es
|
44 |
* www.gvsig.gva.es
|
45 |
*
|
46 |
* or
|
47 |
*
|
48 |
* IVER T.I. S.A
|
49 |
* Salamanca 50
|
50 |
* 46005 Valencia
|
51 |
* Spain
|
52 |
*
|
53 |
* +34 963163400
|
54 |
* dac@iver.es
|
55 |
*/
|
56 |
/* CVS MESSAGES:
|
57 |
*
|
58 |
* $Id: FLyrRasterAdjustTransparencyTocMenuEntry.java 9529 2007-01-03 17:07:31Z sbayarri $
|
59 |
* $Log$
|
60 |
* Revision 1.1.4.1 2007-01-03 17:07:30 sbayarri
|
61 |
* Fix wrong files
|
62 |
*
|
63 |
* Revision 1.1.2.1 2006/11/15 04:10:44 jjdelcerro
|
64 |
* *** empty log message ***
|
65 |
*
|
66 |
* Revision 1.1 2006/09/15 10:41:30 caballero
|
67 |
* extensibilidad de documentos
|
68 |
*
|
69 |
* Revision 1.1 2006/09/12 15:58:14 jorpiell
|
70 |
* "Sacadas" las opcines del men? de FPopupMenu
|
71 |
*
|
72 |
*
|
73 |
*/
|
74 |
|
75 |
public class FLyrRasterAdjustTransparencyTocMenuEntry extends TocMenuEntry { |
76 |
private JMenuItem transparency; |
77 |
FLayer lyr = null;
|
78 |
public void initialize(FPopupMenu m) { |
79 |
super.initialize(m);
|
80 |
|
81 |
if (isTocItemBranch()) {
|
82 |
lyr = getNodeLayer(); |
83 |
// Opcciones para capas raster
|
84 |
if ((lyr instanceof FLyrRaster)) { |
85 |
transparency = new JMenuItem(PluginServices.getText(this, "adjust_transparency")); |
86 |
getMenu().add( transparency ); |
87 |
transparency.setFont(FPopupMenu.theFont); |
88 |
getMenu().setEnabled(true);
|
89 |
//getMenu().addSeparator();
|
90 |
//Cambio color
|
91 |
transparency.addActionListener(this);
|
92 |
} |
93 |
} |
94 |
} |
95 |
/* (non-Javadoc)
|
96 |
* @see com.iver.cit.gvsig.gui.toc.TocMenuEntry#execute(com.iver.cit.gvsig.gui.toc.ITocItem)
|
97 |
*/
|
98 |
public void actionPerformed(ActionEvent e) { |
99 |
lyr = getNodeLayer(); |
100 |
AdjustTransparencyPanel transPanel = new AdjustTransparencyPanel((FLyrDefault) lyr);
|
101 |
transPanel.openJDialog(); |
102 |
//getMapContext().invalidate();
|
103 |
} |
104 |
} |
105 |
|