svn-gvsig-desktop / tags / v1_0_2_Build_907 / applications / appgvSIG / src / com / iver / cit / gvsig / PrintProperties.java @ 11015
History | View | Annotate | Download (2.88 KB)
1 | 312 | fernando | /*
|
---|---|---|---|
2 | * Created on 19-may-2004
|
||
3 | *
|
||
4 | * To change the template for this generated file go to
|
||
5 | * Window>Preferences>Java>Code Generation>Code and Comments
|
||
6 | */
|
||
7 | 1103 | fjp | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 | *
|
||
9 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
10 | *
|
||
11 | * This program is free software; you can redistribute it and/or
|
||
12 | * modify it under the terms of the GNU General Public License
|
||
13 | * as published by the Free Software Foundation; either version 2
|
||
14 | * of the License, or (at your option) any later version.
|
||
15 | *
|
||
16 | * This program is distributed in the hope that it will be useful,
|
||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
19 | * GNU General Public License for more details.
|
||
20 | *
|
||
21 | * You should have received a copy of the GNU General Public License
|
||
22 | * along with this program; if not, write to the Free Software
|
||
23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
24 | *
|
||
25 | * For more information, contact:
|
||
26 | *
|
||
27 | * Generalitat Valenciana
|
||
28 | * Conselleria d'Infraestructures i Transport
|
||
29 | * Av. Blasco Ib??ez, 50
|
||
30 | * 46010 VALENCIA
|
||
31 | * SPAIN
|
||
32 | *
|
||
33 | * +34 963862235
|
||
34 | * gvsig@gva.es
|
||
35 | * www.gvsig.gva.es
|
||
36 | *
|
||
37 | * or
|
||
38 | *
|
||
39 | * IVER T.I. S.A
|
||
40 | * Salamanca 50
|
||
41 | * 46005 Valencia
|
||
42 | * Spain
|
||
43 | *
|
||
44 | * +34 963163400
|
||
45 | * dac@iver.es
|
||
46 | */
|
||
47 | 312 | fernando | package com.iver.cit.gvsig; |
48 | |||
49 | /**
|
||
50 | */
|
||
51 | import java.awt.geom.Rectangle2D; |
||
52 | |||
53 | 596 | fernando | import com.iver.andami.PluginServices; |
54 | import com.iver.andami.plugins.Extension; |
||
55 | 6877 | cesar | import com.iver.andami.ui.mdiManager.IWindow; |
56 | 312 | fernando | import com.iver.cit.gvsig.gui.layout.Layout; |
57 | |||
58 | |||
59 | /**
|
||
60 | * DOCUMENT ME!
|
||
61 | *
|
||
62 | * @author vcn
|
||
63 | */
|
||
64 | 8765 | jjdelcerro | public class PrintProperties extends Extension /*implements IPreferenceExtension*/ { |
65 | 312 | fernando | private Layout l;
|
66 | 8765 | jjdelcerro | // private static final IPreference printPropertiesPage = new PrintPropertiesPage();
|
67 | 2429 | caballero | // private Paper paper;
|
68 | 312 | fernando | Rectangle2D.Double aux = null; |
69 | |||
70 | /**
|
||
71 | * DOCUMENT ME!
|
||
72 | *
|
||
73 | * @param s DOCUMENT ME!
|
||
74 | */
|
||
75 | 596 | fernando | public void execute(String s) { |
76 | 6880 | cesar | l = (Layout) PluginServices.getMDIManager().getActiveWindow(); |
77 | 312 | fernando | l.showFConfig(); |
78 | //l.showPagePropertiesWindow(Print.printerJob);
|
||
79 | } |
||
80 | |||
81 | /**
|
||
82 | * DOCUMENT ME!
|
||
83 | *
|
||
84 | * @return DOCUMENT ME!
|
||
85 | */
|
||
86 | public boolean isVisible() { |
||
87 | 6880 | cesar | IWindow f = PluginServices.getMDIManager().getActiveWindow(); |
88 | 312 | fernando | |
89 | if (f == null) { |
||
90 | return false; |
||
91 | } |
||
92 | |||
93 | 5900 | jorpiell | return (f instanceof Layout); |
94 | 312 | fernando | } |
95 | |||
96 | /**
|
||
97 | 5005 | jorpiell | * @see com.iver.mdiApp.plugins.IExtension#isEnabled()
|
98 | 312 | fernando | */
|
99 | public boolean isEnabled() { |
||
100 | 6880 | cesar | Layout f = (Layout) PluginServices.getMDIManager().getActiveWindow(); |
101 | 312 | fernando | |
102 | 6393 | caballero | if (f == null || !f.isEditable()) { |
103 | 312 | fernando | return false; |
104 | } |
||
105 | |||
106 | return true; |
||
107 | } |
||
108 | 596 | fernando | |
109 | /**
|
||
110 | 5005 | jorpiell | * @see com.iver.andami.plugins.IExtension#initialize()
|
111 | 596 | fernando | */
|
112 | 5005 | jorpiell | public void initialize() { |
113 | 596 | fernando | } |
114 | 8765 | jjdelcerro | |
115 | // public IPreference getPreferencesPage() {
|
||
116 | // return printPropertiesPage;
|
||
117 | // }
|
||
118 | 312 | fernando | } |