svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / gui / preferencespage / PrintPropertiesPage.java @ 28368
History | View | Annotate | Download (4.64 KB)
1 | 8142 | jaume | /* 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$
|
||
45 | * $Log$
|
||
46 | * Revision 1.1 2006-10-18 07:57:47 jaume
|
||
47 | * *** empty log message ***
|
||
48 | *
|
||
49 | *
|
||
50 | */
|
||
51 | package com.iver.cit.gvsig.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 com.iver.andami.PluginServices; |
||
65 | import com.iver.andami.preferences.AbstractPreferencePage; |
||
66 | import com.iver.andami.preferences.StoreException; |
||
67 | |||
68 | public class PrintPropertiesPage extends AbstractPreferencePage{ |
||
69 | |||
70 | private static final boolean FACTORY_DEFAULT_LANDSCAPED_PAGE = true; |
||
71 | protected static String id = PrintPropertiesPage.class.getName(); |
||
72 | private ImageIcon icon; |
||
73 | private JRadioButton rdBtnPortraitPage; |
||
74 | private JRadioButton rdBtnLandscapePage; |
||
75 | private JCheckBox chkCustomMargins; |
||
76 | private JTextField txtTopMargin; |
||
77 | private JTextField txtLeftMargin; |
||
78 | private JTextField txtBottomMargin; |
||
79 | private JTextField txtRightMargin; |
||
80 | |||
81 | public PrintPropertiesPage() {
|
||
82 | super();
|
||
83 | setParentID(LayoutPage.class.getName()); |
||
84 | 15647 | jmvivo | icon = PluginServices.getIconTheme().get("prepare-page-icon");
|
85 | 8142 | jaume | rdBtnPortraitPage = new JRadioButton(PluginServices.getText(this, "options.layout.paper_properties.portrait")); |
86 | 15647 | jmvivo | ImageIcon portrait = PluginServices.getIconTheme().get("portrait-page-setup"); |
87 | 8142 | jaume | rdBtnLandscapePage = new JRadioButton(PluginServices.getText(this, "options.layout.paper_properties.landscaped")); |
88 | 15647 | jmvivo | ImageIcon landscape = PluginServices.getIconTheme().get("landscape-page-setup"); |
89 | 8142 | jaume | |
90 | ButtonGroup group = new ButtonGroup(); |
||
91 | group.add(rdBtnLandscapePage); |
||
92 | group.add(rdBtnPortraitPage); |
||
93 | |||
94 | JPanel aux = new JPanel(new GridLayout(2,2,10,0)); |
||
95 | aux.setPreferredSize(new Dimension(200, 150)); |
||
96 | aux.setSize(200, 150); |
||
97 | aux.add(new JLabel(landscape)); |
||
98 | aux.add(new JLabel(portrait)); |
||
99 | aux.add(rdBtnLandscapePage); |
||
100 | aux.add(rdBtnPortraitPage); |
||
101 | |||
102 | addComponent(new JLabel(PluginServices. |
||
103 | getText(this, "options.layout.paper_properties.paper_direction"))); |
||
104 | addComponent("", aux);
|
||
105 | addComponent(chkCustomMargins = new JCheckBox(PluginServices.getText(this, "personalizar_margenes"))); |
||
106 | |||
107 | JPanel aux2 = new JPanel(new GridLayout(2, 4, 10, 3)); |
||
108 | aux2.add(new JLabel(PluginServices.getText(this, "Superior"))); |
||
109 | aux2.add(txtTopMargin = new JTextField(10)); |
||
110 | aux2.add(new JLabel(PluginServices.getText(this, "Izquierdo"))); |
||
111 | aux2.add(txtLeftMargin = new JTextField(10)); |
||
112 | aux2.add(new JLabel(PluginServices.getText(this, "Inferior"))); |
||
113 | aux2.add(txtBottomMargin = new JTextField(10)); |
||
114 | aux2.add(new JLabel(PluginServices.getText(this, "Derecho"))); |
||
115 | aux2.add(txtRightMargin = new JTextField(10)); |
||
116 | addComponent("", aux2);
|
||
117 | } |
||
118 | |||
119 | public void storeValues() throws StoreException { |
||
120 | // TODO Auto-generated method stub
|
||
121 | |||
122 | } |
||
123 | |||
124 | public void setChangesApplied() { |
||
125 | // TODO Auto-generated method stub
|
||
126 | |||
127 | } |
||
128 | |||
129 | public String getID() { |
||
130 | return id;
|
||
131 | } |
||
132 | |||
133 | public String getTitle() { |
||
134 | return PluginServices.getText(this, "options.layout.paper_properties.title"); |
||
135 | } |
||
136 | |||
137 | public JPanel getPanel() { |
||
138 | return this; |
||
139 | } |
||
140 | |||
141 | public void initializeValues() { |
||
142 | // TODO Auto-generated method stub
|
||
143 | |||
144 | } |
||
145 | |||
146 | public void initializeDefaults() { |
||
147 | rdBtnLandscapePage.setSelected(FACTORY_DEFAULT_LANDSCAPED_PAGE); |
||
148 | rdBtnPortraitPage.setSelected(!FACTORY_DEFAULT_LANDSCAPED_PAGE); |
||
149 | } |
||
150 | |||
151 | public ImageIcon getIcon() { |
||
152 | return icon;
|
||
153 | } |
||
154 | |||
155 | public boolean isValueChanged() { |
||
156 | // TODO Auto-generated method stub
|
||
157 | return false; |
||
158 | } |
||
159 | |||
160 | } |