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 @ 153

History | View | Annotate | Download (4.45 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.JComponent;
28
import javax.swing.JPanel;
29

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

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

    
46
    private static final long serialVersionUID = 5961147362842287273L;
47

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

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

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

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

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

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

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

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

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

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

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

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

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

    
141
    public abstract void setLayoutManager(LayoutManager layoutManager);
142
    
143
    public abstract void drawLayoutPrint(Graphics2D g2);
144
        
145
        public abstract void hideToc(JComponent c);
146

    
147
        public abstract void showToc(JComponent c);
148

    
149
}