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 | 5 | jldominguez | /* 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 | 550 | jjdelcerro | import java.io.File; |
27 | 5 | jldominguez | 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 | 1714 | fdiaz | import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFramePanel; |
34 | 5 | jldominguez | 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á</a>
|
||
39 | */
|
||
40 | public abstract class LayoutPanel extends JPanel implements IDocumentWindow, |
||
41 | 216 | cmartinez | Observer, Persistent {
|
42 | 5 | jldominguez | |
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 | 550 | jjdelcerro | public abstract void layoutToPDF(File file); |
85 | 5 | jldominguez | /**
|
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 | 1714 | fdiaz | public abstract IFFramePanel createFFrameDialog(IFFrame fframe); |
110 | 5 | jldominguez | |
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 | 30 | jldominguez | |
141 | public abstract void drawLayoutPrint(Graphics2D g2); |
||
142 | 144 | cmartinez | |
143 | 216 | cmartinez | public abstract void hideToc(); |
144 | 5 | jldominguez | |
145 | 216 | cmartinez | public abstract void showToc(); |
146 | 144 | cmartinez | |
147 | 5 | jldominguez | } |