Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / PrintProperties.java @ 7738

History | View | Annotate | Download (2.68 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 5005 jorpiell
public class PrintProperties extends Extension {
65 312 fernando
    private Layout l;
66 2429 caballero
   // private Paper paper;
67 312 fernando
    Rectangle2D.Double aux = null;
68
69
    /**
70
     * DOCUMENT ME!
71
     *
72
     * @param s DOCUMENT ME!
73
     */
74 596 fernando
    public void execute(String s) {
75 6880 cesar
        l = (Layout) PluginServices.getMDIManager().getActiveWindow();
76 312 fernando
                l.showFConfig();
77
        //l.showPagePropertiesWindow(Print.printerJob);
78
    }
79
80
    /**
81
     * DOCUMENT ME!
82
     *
83
     * @return DOCUMENT ME!
84
     */
85
    public boolean isVisible() {
86 6880 cesar
        IWindow f = PluginServices.getMDIManager().getActiveWindow();
87 312 fernando
88
        if (f == null) {
89
            return false;
90
        }
91
92 5900 jorpiell
        return (f instanceof Layout);
93 312 fernando
    }
94
95
    /**
96 5005 jorpiell
     * @see com.iver.mdiApp.plugins.IExtension#isEnabled()
97 312 fernando
     */
98
    public boolean isEnabled() {
99 6880 cesar
        Layout f = (Layout) PluginServices.getMDIManager().getActiveWindow();
100 312 fernando
101 6393 caballero
        if (f == null || !f.isEditable()) {
102 312 fernando
            return false;
103
        }
104
105
        return true;
106
    }
107 596 fernando
108
        /**
109 5005 jorpiell
         * @see com.iver.andami.plugins.IExtension#initialize()
110 596 fernando
         */
111 5005 jorpiell
        public void initialize() {
112 596 fernando
        }
113 312 fernando
}