Statistics
| Revision:

svn-document-layout / tags / 2059 / org.gvsig.app.document.layout.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / gui / LayoutPanel.java @ 46

History | View | Annotate | Download (4.33 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
package org.gvsig.app.project.documents.layout.gui;
23

    
24
import java.awt.Graphics2D;
25
import java.awt.print.PrinterJob;
26

    
27
import javax.swing.JPanel;
28

    
29
import org.gvsig.app.project.documents.gui.IDocumentWindow;
30
import org.gvsig.app.project.documents.layout.LayoutContext;
31
import org.gvsig.app.project.documents.layout.LayoutControl;
32
import org.gvsig.app.project.documents.layout.LayoutManager;
33
import org.gvsig.app.project.documents.layout.fframes.IFFrame;
34
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFrameDialog;
35
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener;
36
import org.gvsig.tools.observer.Observer;
37
import org.gvsig.tools.persistence.Persistent;
38

    
39
/**
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
41
 */
42
public abstract class LayoutPanel extends JPanel implements IDocumentWindow,
43
    ViewPortListener, Observer, Persistent {
44

    
45
    private static final long serialVersionUID = 5961147362842287273L;
46

    
47
    /**
48
     * Returns the LayoutContext.
49
     * 
50
     * @return LayoutContext.
51
     */
52
    public abstract LayoutContext getLayoutContext();
53

    
54
    /**
55
     * Returns LayoutControl.
56
     * 
57
     * @return LayoutControl.
58
     */
59
    public abstract LayoutControl getLayoutControl();
60

    
61
    /**
62
     * @return Returns the bShowIconTag.
63
     */
64
    public abstract boolean isShowIconTag();
65

    
66
    /**
67
     * @param modeDebug
68
     *            The bModeDebug to set.
69
     */
70
    public abstract void setShowIconTag(boolean modeDebug);
71

    
72
    /**
73
     * It opens a dialog to select pdf file where to save the Layout in this
74
     * format.
75
     */
76
    public abstract void layoutToPDF();
77

    
78
    /**
79
     * Opens a dialog where to pick a PDF-file to save the current Layout
80
     * suggesting a name for the file given by the first argument
81
     * 
82
     * @param suggestedName
83
     */
84
    public abstract void layoutToPDF(String suggestedName);
85

    
86
    /**
87
     * It opens a dialog to select ps file where to save the Layout in this
88
     * format.
89
     */
90
    public abstract void layoutToPS();
91

    
92
    /**
93
     * Opens a dialog where to pick a PS-file to save the current Layout
94
     * suggesting a name for the file given by the first argument
95
     * 
96
     * @param suggestedName
97
     */
98
    public abstract void layoutToPS(String suggestedName);
99

    
100
    /**
101
     * The dialogs are created here each time that are needed.
102
     * 
103
     * @param fframe
104
     *            Rectangle that represents the place that occupied the element
105
     *            added.
106
     * 
107
     * @return IFFrame Returns the FFrame added or null if the fframe has not
108
     *         been added.
109
     */
110
    public abstract IFFrameDialog createFFrameDialog(IFFrame fframe);
111

    
112
    /**
113
     * It obtains the rect?ngulo that represents the sheet with the
114
     * characteristics
115
     * that contains attributes and differentiating if is to visualize in screen
116
     * or
117
     * for print.
118
     * 
119
     */
120
    public abstract void obtainRect(boolean isPrint);
121

    
122
    /**
123
     * It shows the dialog of configuration of the Layout.
124
     */
125
    public abstract void showFConfig();
126

    
127
    /**
128
     * It shows the dialog of Layout?s properties.
129
     */
130
    public abstract boolean showFProperties();
131

    
132
    /**
133
     * It shows the dialog of printing of the Layout.
134
     * 
135
     * @param job
136
     *            PrinterJob
137
     */
138
    public abstract void showPrintDialog(PrinterJob job);
139

    
140
    public abstract void setLayoutManager(LayoutManager layoutManager);
141
    
142
    public abstract void drawLayoutPrint(Graphics2D g2);
143

    
144
}