root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / gui / preferencespage / PrintPropertiesPage.java @ 29596
History | View | Annotate | Download (4.64 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
|
42 |
/* CVS MESSAGES:
|
43 |
*
|
44 |
* $Id: PrintPropertiesPage.java 29596 2009-06-29 16:02:00Z jpiera $
|
45 |
* $Log$
|
46 |
* Revision 1.1 2006-10-18 07:57:47 jaume
|
47 |
* *** empty log message ***
|
48 |
*
|
49 |
*
|
50 |
*/
|
51 |
package org.gvsig.app.gui.preferencespage; |
52 |
|
53 |
import java.awt.Dimension; |
54 |
import java.awt.GridLayout; |
55 |
|
56 |
import javax.swing.ButtonGroup; |
57 |
import javax.swing.ImageIcon; |
58 |
import javax.swing.JCheckBox; |
59 |
import javax.swing.JLabel; |
60 |
import javax.swing.JPanel; |
61 |
import javax.swing.JRadioButton; |
62 |
import javax.swing.JTextField; |
63 |
|
64 |
import org.gvsig.andami.PluginServices; |
65 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
66 |
import org.gvsig.andami.preferences.StoreException; |
67 |
|
68 |
|
69 |
public class PrintPropertiesPage extends AbstractPreferencePage{ |
70 |
|
71 |
private static final boolean FACTORY_DEFAULT_LANDSCAPED_PAGE = true; |
72 |
protected static String id = PrintPropertiesPage.class.getName(); |
73 |
private ImageIcon icon; |
74 |
private JRadioButton rdBtnPortraitPage; |
75 |
private JRadioButton rdBtnLandscapePage; |
76 |
private JCheckBox chkCustomMargins; |
77 |
private JTextField txtTopMargin; |
78 |
private JTextField txtLeftMargin; |
79 |
private JTextField txtBottomMargin; |
80 |
private JTextField txtRightMargin; |
81 |
|
82 |
public PrintPropertiesPage() {
|
83 |
super();
|
84 |
setParentID(LayoutPage.class.getName()); |
85 |
icon = PluginServices.getIconTheme().get("prepare-page-icon");
|
86 |
rdBtnPortraitPage = new JRadioButton(PluginServices.getText(this, "options.layout.paper_properties.portrait")); |
87 |
ImageIcon portrait = PluginServices.getIconTheme().get("portrait-page-setup"); |
88 |
rdBtnLandscapePage = new JRadioButton(PluginServices.getText(this, "options.layout.paper_properties.landscaped")); |
89 |
ImageIcon landscape = PluginServices.getIconTheme().get("landscape-page-setup"); |
90 |
|
91 |
ButtonGroup group = new ButtonGroup(); |
92 |
group.add(rdBtnLandscapePage); |
93 |
group.add(rdBtnPortraitPage); |
94 |
|
95 |
JPanel aux = new JPanel(new GridLayout(2,2,10,0)); |
96 |
aux.setPreferredSize(new Dimension(200, 150)); |
97 |
aux.setSize(200, 150); |
98 |
aux.add(new JLabel(landscape)); |
99 |
aux.add(new JLabel(portrait)); |
100 |
aux.add(rdBtnLandscapePage); |
101 |
aux.add(rdBtnPortraitPage); |
102 |
|
103 |
addComponent(new JLabel(PluginServices. |
104 |
getText(this, "options.layout.paper_properties.paper_direction"))); |
105 |
addComponent("", aux);
|
106 |
addComponent(chkCustomMargins = new JCheckBox(PluginServices.getText(this, "personalizar_margenes"))); |
107 |
|
108 |
JPanel aux2 = new JPanel(new GridLayout(2, 4, 10, 3)); |
109 |
aux2.add(new JLabel(PluginServices.getText(this, "Superior"))); |
110 |
aux2.add(txtTopMargin = new JTextField(10)); |
111 |
aux2.add(new JLabel(PluginServices.getText(this, "Izquierdo"))); |
112 |
aux2.add(txtLeftMargin = new JTextField(10)); |
113 |
aux2.add(new JLabel(PluginServices.getText(this, "Inferior"))); |
114 |
aux2.add(txtBottomMargin = new JTextField(10)); |
115 |
aux2.add(new JLabel(PluginServices.getText(this, "Derecho"))); |
116 |
aux2.add(txtRightMargin = new JTextField(10)); |
117 |
addComponent("", aux2);
|
118 |
} |
119 |
|
120 |
public void storeValues() throws StoreException { |
121 |
// TODO Auto-generated method stub
|
122 |
|
123 |
} |
124 |
|
125 |
public void setChangesApplied() { |
126 |
// TODO Auto-generated method stub
|
127 |
|
128 |
} |
129 |
|
130 |
public String getID() { |
131 |
return id;
|
132 |
} |
133 |
|
134 |
public String getTitle() { |
135 |
return PluginServices.getText(this, "options.layout.paper_properties.title"); |
136 |
} |
137 |
|
138 |
public JPanel getPanel() { |
139 |
return this; |
140 |
} |
141 |
|
142 |
public void initializeValues() { |
143 |
// TODO Auto-generated method stub
|
144 |
|
145 |
} |
146 |
|
147 |
public void initializeDefaults() { |
148 |
rdBtnLandscapePage.setSelected(FACTORY_DEFAULT_LANDSCAPED_PAGE); |
149 |
rdBtnPortraitPage.setSelected(!FACTORY_DEFAULT_LANDSCAPED_PAGE); |
150 |
} |
151 |
|
152 |
public ImageIcon getIcon() { |
153 |
return icon;
|
154 |
} |
155 |
|
156 |
public boolean isValueChanged() { |
157 |
// TODO Auto-generated method stub
|
158 |
return false; |
159 |
} |
160 |
|
161 |
} |