Statistics
| Revision:

svn-document-layout / branches / usability_v2 / org.gvsig.app.document.layout.app / org.gvsig.app.document.layout.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / gui / LayoutPanel.java @ 146

History | View | Annotate | Download (4.69 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.BorderLayout;
25
import java.awt.Graphics2D;
26
import java.awt.print.PrinterJob;
27

    
28
import javax.swing.JComponent;
29
import javax.swing.JPanel;
30

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

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

    
48
    private static final long serialVersionUID = 5961147362842287273L;
49

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

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

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

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

    
75
    /**
76
     * It opens a dialog to select pdf file where to save the Layout in this
77
     * 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
91
     * format.
92
     */
93
    public abstract void layoutToPS();
94

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

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

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

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

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

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

    
143
    public abstract void setLayoutManager(LayoutManager layoutManager);
144
    
145
    public abstract void drawLayoutPrint(Graphics2D g2);
146
        
147
        public abstract void addLateralComponent(JComponent c);
148
        
149
        public abstract void removeLateralComponent(JComponent c);
150
        
151
        public abstract void hideLateralComponent(JComponent c);
152

    
153
        public abstract void showLateralComponent(JComponent c);
154

    
155
}