Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / layout / gui / LayoutPanel.java @ 33647

History | View | Annotate | Download (4.42 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2010 {Prodevelop}   {Task}
26
 */
27

    
28
package org.gvsig.app.project.documents.layout.gui;
29

    
30
import java.awt.Graphics2D;
31
import java.awt.print.PrinterJob;
32

    
33
import javax.swing.JPanel;
34

    
35
import org.gvsig.andami.ui.mdiManager.IWindowListener;
36
import org.gvsig.andami.ui.mdiManager.SingletonWindow;
37
import org.gvsig.app.project.documents.gui.IDocumentWindow;
38
import org.gvsig.app.project.documents.layout.LayoutContext;
39
import org.gvsig.app.project.documents.layout.LayoutControl;
40
import org.gvsig.app.project.documents.layout.LayoutManager;
41
import org.gvsig.app.project.documents.layout.fframes.IFFrame;
42
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFrameDialog;
43
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener;
44
import org.gvsig.tools.observer.Observer;
45
import org.gvsig.tools.persistence.Persistent;
46

    
47
/**
48
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
49
 */
50
public abstract class LayoutPanel extends JPanel implements SingletonWindow, ViewPortListener,
51
IWindowListener, Observer, Persistent, IDocumentWindow {
52
    
53
        /**
54
         * Returns the LayoutContext.
55
         * @return LayoutContext.
56
         */
57
        public abstract LayoutContext getLayoutContext();
58
        
59
        /**
60
         * Returns LayoutControl.
61
         * @return LayoutControl.
62
         */
63
        public abstract LayoutControl getLayoutControl();
64
        
65
          /**
66
         * @return Returns the bShowIconTag.
67
         */
68
    public abstract boolean isShowIconTag();
69
    
70
    /**
71
     * @param modeDebug
72
     *            The bModeDebug to set.
73
     */
74
    public abstract void setShowIconTag(boolean modeDebug);
75
    
76
    /**
77
         * It opens a dialog to select pdf file where to save the Layout in this format.
78
         */
79
    public abstract void layoutToPDF();
80
    
81
    /**
82
     * Opens a dialog where to pick a PDF-file to save the current Layout
83
     * suggesting a name for the file given by the first argument
84
     *
85
     * @param suggestedName
86
     */
87
    public abstract void layoutToPDF(String suggestedName);
88
    
89
    /**
90
         * It opens a dialog to select ps file where to save the Layout in this format.
91
         */
92
    public abstract void layoutToPS();
93
    
94
    /**
95
     * Opens a dialog where to pick a PS-file to save the current Layout
96
     * suggesting a name for the file given by the first argument
97
     *
98
     * @param suggestedName
99
     */
100
    public abstract void layoutToPS(String suggestedName);
101
    
102
    /**
103
         * The dialogs are created here each time that are needed.
104
         *
105
         * @param fframe
106
         *            Rectangle that represents the place that occupied the element added.
107
         *
108
         * @return IFFrame Returns the FFrame added or null if the fframe has not been added.
109
         */
110
    public abstract IFFrameDialog createFFrameDialog(IFFrame fframe);
111
    
112
    /**
113
         * It obtains the rect?ngulo that represents the sheet with the characteristics
114
         * that contains attributes and differentiating if is to visualize in screen or
115
         * for print.
116
         *
117
         */
118
    public abstract void obtainRect(boolean isPrint);
119
    
120
    /**
121
         * It shows the dialog of configuration of the Layout.
122
         */
123
    public abstract void showFConfig();
124
    
125
    /**
126
         * It shows the dialog of Layout?s properties.
127
         */
128
    public abstract boolean showFProperties();
129
    
130
    /**
131
         * It shows the dialog of printing of the Layout.
132
         *
133
         * @param job PrinterJob
134
         */
135
    public abstract void showPrintDialog(PrinterJob job);
136
  
137
    /**
138
         * Method to print the Layout without modify the Affinetransform.
139
         *
140
         * @param g2 Geaphics2D
141
         */
142
    public abstract void drawLayoutPrint(Graphics2D g2);
143

    
144
    public abstract void setLayoutManager(LayoutManager layoutManager);
145
    
146
   
147
}
148