Statistics
| Revision:

svn-document-layout / trunk / org.gvsig.app.document.layout2.app / org.gvsig.app.document.layout2.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / gui / LayoutPanel.java @ 1714

History | View | Annotate | Download (4.38 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
import java.io.File;
27
import javax.swing.JPanel;
28
import org.gvsig.app.project.documents.gui.IDocumentWindow;
29
import org.gvsig.app.project.documents.layout.LayoutContext;
30
import org.gvsig.app.project.documents.layout.LayoutControl;
31
import org.gvsig.app.project.documents.layout.LayoutManager;
32
import org.gvsig.app.project.documents.layout.fframes.IFFrame;
33
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFramePanel;
34
import org.gvsig.tools.observer.Observer;
35
import org.gvsig.tools.persistence.Persistent;
36

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

    
43
    private static final long serialVersionUID = 5961147362842287273L;
44

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
145
        public abstract void showToc();
146

    
147
}