root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / gui / preferencespage / SymbologyPage.java @ 29596
History | View | Annotate | Download (16.2 KB)
1 |
package org.gvsig.app.gui.preferencespage; |
---|---|
2 |
|
3 |
import java.awt.Color; |
4 |
import java.awt.Dimension; |
5 |
import java.awt.FlowLayout; |
6 |
import java.awt.Font; |
7 |
import java.awt.GridBagLayout; |
8 |
import java.awt.event.ActionEvent; |
9 |
import java.awt.event.ActionListener; |
10 |
import java.io.File; |
11 |
|
12 |
import javax.swing.ImageIcon; |
13 |
import javax.swing.JButton; |
14 |
import javax.swing.JCheckBox; |
15 |
import javax.swing.JLabel; |
16 |
import javax.swing.JPanel; |
17 |
import javax.swing.JSlider; |
18 |
import javax.swing.JTextField; |
19 |
import javax.swing.border.TitledBorder; |
20 |
import javax.swing.event.ChangeEvent; |
21 |
import javax.swing.event.ChangeListener; |
22 |
import javax.swing.filechooser.FileFilter; |
23 |
|
24 |
import org.gvsig.andami.PluginServices; |
25 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
26 |
import org.gvsig.andami.preferences.StoreException; |
27 |
import org.gvsig.app.gui.panels.ColorChooserPanel; |
28 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbologyFactory; |
29 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
30 |
import org.gvsig.gui.beans.swing.JBlank; |
31 |
import org.gvsig.gui.beans.swing.JComboBoxFontSizes; |
32 |
import org.gvsig.gui.beans.swing.JComboBoxFonts; |
33 |
import org.gvsig.gui.beans.swing.JFileChooser; |
34 |
import org.gvsig.utils.StringUtilities; |
35 |
import org.gvsig.utils.XMLEntity; |
36 |
|
37 |
|
38 |
|
39 |
/**
|
40 |
* This class extends AbstractPreferencesPage. This component is a preferences page for
|
41 |
* symbology and allows select default fore color, fill color, font and size text and
|
42 |
* the path where the images that compound symbols are located.
|
43 |
*
|
44 |
*/
|
45 |
public class SymbologyPage extends AbstractPreferencePage{ |
46 |
|
47 |
private static final long serialVersionUID = 1L; |
48 |
|
49 |
private ColorChooserPanel defaultColor = null; |
50 |
private ColorChooserPanel defaultFillColor = null; |
51 |
private JSlider jsDefaultSelectionAlpha = null; |
52 |
private JSlider jsFillSelelctionAlpha = null; |
53 |
protected String id; |
54 |
private boolean panelStarted = false; |
55 |
private JButton btnSelectProjectsFolder=null; |
56 |
private ActionListener btnFileChooserAction=null; |
57 |
private JTextField txtProjectsFolder=null; |
58 |
private JComboBoxFonts fonts= null; |
59 |
private JComboBoxFontSizes sizes= null; |
60 |
private ImageIcon icon=null; |
61 |
private JCheckBox aleatoryFillColor; |
62 |
|
63 |
private static final String SYMBOL_FORECOLOR_PROPERTY_NAME = "ForeColor"; |
64 |
private static final String SYMBOL_FILLCOLOR_PROPERTY_NAME = "FillColor"; |
65 |
private static final String SYMBOL_FONT_TYPE_PROPERTY_NAME = "FontType"; |
66 |
private static final String SYMBOL_FONT_SIZE_PROPERTY_NAME = "FontSize"; |
67 |
private static final String SYMBOL_IMAGE_FOLDER_PROPERTY_NAME = "ImageFolder"; |
68 |
private static final String SYMBOL_ALEATORY_FORECOLOR = "AleatoryForeColor"; |
69 |
private static final String SYMBOL_ALEATORY_FILLCOLOR = "AleatoryFillColor"; |
70 |
|
71 |
|
72 |
public SymbologyPage(){
|
73 |
super();
|
74 |
id = this.getClass().getName();
|
75 |
} |
76 |
|
77 |
// pending of a proposed refactor, don't erase
|
78 |
// @Override
|
79 |
// public void persistPreferences() throws StoreException {
|
80 |
// File f;
|
81 |
// String path, propertyName;
|
82 |
// Color foreColor=defaultColor.getColor();
|
83 |
// Color fillColor=defaultFillColor.getColor();
|
84 |
// PluginServices ps = PluginServices.getPluginServices(this);
|
85 |
// XMLEntity xml = ps.getPersistentXML();
|
86 |
//
|
87 |
// xml.putProperty(SYMBOL_FORECOLOR_PROPERTY_NAME,
|
88 |
// StringUtilities.color2String(foreColor));
|
89 |
//
|
90 |
// xml.putProperty(SYMBOL_FILLCOLOR_PROPERTY_NAME,
|
91 |
// StringUtilities.color2String(fillColor));
|
92 |
//
|
93 |
// propertyName = SYMBOL_IMAGE_FOLDER_PROPERTY_NAME;
|
94 |
// path = txtProjectsFolder.getText();
|
95 |
//
|
96 |
// if (path.equals("")) {
|
97 |
// if (xml.contains(propertyName)) {
|
98 |
// xml.remove(propertyName);
|
99 |
// }
|
100 |
// } else {
|
101 |
// f = new File(path);
|
102 |
// if (f.exists()) {
|
103 |
// if (xml.contains(propertyName)) {
|
104 |
// xml.remove(propertyName);
|
105 |
// }
|
106 |
// xml.putProperty(propertyName, f.getAbsolutePath());
|
107 |
// }
|
108 |
// }
|
109 |
//
|
110 |
// String nameFont=(String)fonts.getSelectedItem();
|
111 |
// Integer sizeFontAux =(Integer)sizes.getSelectedItem();
|
112 |
// int sizeFont=sizeFontAux.intValue();
|
113 |
//
|
114 |
// propertyName=SYMBOL_FONT_TYPE_PROPERTY_NAME;
|
115 |
// xml.putProperty(propertyName, nameFont);
|
116 |
//
|
117 |
// propertyName=SYMBOL_FONT_SIZE_PROPERTY_NAME;
|
118 |
// xml.putProperty(propertyName, sizeFont);
|
119 |
//
|
120 |
//
|
121 |
// }
|
122 |
|
123 |
public void persistPreferences() throws StoreException { |
124 |
File f;
|
125 |
String path, propertyName;
|
126 |
Color foreColor=defaultColor.getColor();
|
127 |
Color fillColor=defaultFillColor.getColor();
|
128 |
PluginServices ps = PluginServices.getPluginServices(this);
|
129 |
XMLEntity xml = ps.getPersistentXML(); |
130 |
|
131 |
xml.putProperty(SYMBOL_FORECOLOR_PROPERTY_NAME, |
132 |
StringUtilities.color2String(foreColor)); |
133 |
|
134 |
|
135 |
xml.putProperty(SYMBOL_FILLCOLOR_PROPERTY_NAME, |
136 |
StringUtilities.color2String(fillColor)); |
137 |
xml.putProperty(SYMBOL_ALEATORY_FILLCOLOR,aleatoryFillColor.isSelected()); |
138 |
|
139 |
propertyName = SYMBOL_IMAGE_FOLDER_PROPERTY_NAME; |
140 |
path = txtProjectsFolder.getText(); |
141 |
|
142 |
if (path.equals("")) { |
143 |
if (xml.contains(propertyName)) {
|
144 |
xml.remove(propertyName); |
145 |
} |
146 |
} else {
|
147 |
f = new File(path); |
148 |
if (f.exists()) {
|
149 |
if (xml.contains(propertyName)) {
|
150 |
xml.remove(propertyName); |
151 |
} |
152 |
xml.putProperty(propertyName, f.getAbsolutePath()); |
153 |
} |
154 |
} |
155 |
|
156 |
String nameFont=(String)fonts.getSelectedItem(); |
157 |
Integer sizeFontAux =(Integer)sizes.getSelectedItem(); |
158 |
int sizeFont=sizeFontAux.intValue();
|
159 |
|
160 |
propertyName=SYMBOL_FONT_TYPE_PROPERTY_NAME; |
161 |
xml.putProperty(propertyName, nameFont); |
162 |
|
163 |
propertyName=SYMBOL_FONT_SIZE_PROPERTY_NAME; |
164 |
xml.putProperty(propertyName, sizeFont); |
165 |
|
166 |
|
167 |
} |
168 |
|
169 |
|
170 |
@Override
|
171 |
public void setChangesApplied() { |
172 |
setChanged(false);
|
173 |
|
174 |
} |
175 |
|
176 |
public void applyValuesFromPersistence() throws StoreException { |
177 |
PluginServices ps = PluginServices.getPluginServices(this);
|
178 |
XMLEntity xml = ps.getPersistentXML(); |
179 |
xml = ps.getPersistentXML(); |
180 |
|
181 |
|
182 |
|
183 |
if(xml.contains(SYMBOL_FORECOLOR_PROPERTY_NAME)){
|
184 |
//Color
|
185 |
Color color=StringUtilities.string2Color(xml.getStringProperty(SYMBOL_FORECOLOR_PROPERTY_NAME));
|
186 |
SymbologyFactory.DefaultSymbolColor=color; |
187 |
}else{
|
188 |
SymbologyFactory.DefaultSymbolColor=SymbologyFactory.FactoryDefaultSymbolColor; |
189 |
} |
190 |
|
191 |
|
192 |
//FillColor
|
193 |
if(xml.contains(SYMBOL_FILLCOLOR_PROPERTY_NAME)){
|
194 |
Color colorFill=StringUtilities.string2Color(xml.getStringProperty(SYMBOL_FILLCOLOR_PROPERTY_NAME));
|
195 |
SymbologyFactory.DefaultFillSymbolColor=colorFill; |
196 |
}else{
|
197 |
SymbologyFactory.DefaultFillSymbolColor=SymbologyFactory.FactoryDefaultFillSymbolColor; |
198 |
} |
199 |
|
200 |
//Path
|
201 |
if(xml.contains(SYMBOL_IMAGE_FOLDER_PROPERTY_NAME)){
|
202 |
SymbologyFactory.SymbolLibraryPath=xml.getStringProperty(SYMBOL_IMAGE_FOLDER_PROPERTY_NAME); |
203 |
}else{
|
204 |
SymbologyFactory.SymbolLibraryPath=SymbologyFactory.FactorySymbolLibraryPath; |
205 |
} |
206 |
//Font
|
207 |
if(xml.contains(SYMBOL_FONT_TYPE_PROPERTY_NAME)){
|
208 |
int size=xml.getIntProperty(SYMBOL_FONT_SIZE_PROPERTY_NAME);
|
209 |
String type=xml.getStringProperty(SYMBOL_FONT_TYPE_PROPERTY_NAME);
|
210 |
Font font= new Font(type, Font.BOLD, size); |
211 |
SymbologyFactory.DefaultTextFont=font; |
212 |
}else{
|
213 |
SymbologyFactory.DefaultTextFont=SymbologyFactory.FactoryDefaultTextFont; |
214 |
} |
215 |
|
216 |
} |
217 |
|
218 |
public String getID() { |
219 |
return id;
|
220 |
} |
221 |
|
222 |
public ImageIcon getIcon() { |
223 |
if (icon == null){ |
224 |
icon=PluginServices.getIconTheme().get("symbol-pref");
|
225 |
} |
226 |
return icon;
|
227 |
} |
228 |
|
229 |
public JPanel getPanel() { |
230 |
if(panelStarted)return this; |
231 |
panelStarted=true;
|
232 |
addComponent(new JLabel(" ")); |
233 |
|
234 |
GridBagLayoutPanel selectionDefaultColorPanel = new GridBagLayoutPanel();
|
235 |
selectionDefaultColorPanel.setBorder(new TitledBorder(PluginServices.getText(this, "default_color"))); |
236 |
selectionDefaultColorPanel.setLayout(new GridBagLayout()); |
237 |
selectionDefaultColorPanel.add(new JLabel(PluginServices.getText(this,"fill"))); |
238 |
selectionDefaultColorPanel.add(defaultColor = new ColorChooserPanel());
|
239 |
|
240 |
selectionDefaultColorPanel.add(new JLabel(PluginServices.getText(this,"alpha"))); |
241 |
selectionDefaultColorPanel.add(jsDefaultSelectionAlpha = new JSlider(0,255)); |
242 |
selectionDefaultColorPanel.add(new JBlank(50,50)); |
243 |
|
244 |
jsDefaultSelectionAlpha.setPreferredSize(new Dimension(100,30)); |
245 |
jsDefaultSelectionAlpha.addChangeListener(new ChangeListener(){ |
246 |
public void stateChanged(ChangeEvent e) { |
247 |
defaultColor.setAlpha(((JSlider)e.getSource()).getValue());
|
248 |
}}); |
249 |
addComponent(new JLabel(" ")); |
250 |
addComponent(selectionDefaultColorPanel); |
251 |
|
252 |
GridBagLayoutPanel selectionFillColor = new GridBagLayoutPanel();
|
253 |
selectionFillColor.setBorder(new TitledBorder(PluginServices.getText(this, "default_fill_color"))); |
254 |
selectionFillColor.setLayout(new GridBagLayout()); |
255 |
selectionFillColor.add(new JLabel(PluginServices.getText(this,"fill"))); |
256 |
selectionFillColor.add(defaultFillColor = new ColorChooserPanel());
|
257 |
|
258 |
selectionFillColor.add(new JLabel(PluginServices.getText(this,"alpha"))); |
259 |
selectionFillColor.add(jsFillSelelctionAlpha = new JSlider(0,255)); |
260 |
|
261 |
jsFillSelelctionAlpha.setPreferredSize(new Dimension(100,30)); |
262 |
jsFillSelelctionAlpha.addChangeListener(new ChangeListener(){ |
263 |
public void stateChanged(ChangeEvent e) { |
264 |
defaultFillColor.setAlpha(((JSlider)e.getSource()).getValue());
|
265 |
}}); |
266 |
|
267 |
selectionFillColor.add(new JBlank(50,50)); |
268 |
selectionFillColor.add(aleatoryFillColor = new JCheckBox()); |
269 |
selectionFillColor.add(new JLabel(" " + PluginServices.getText(this,"aleatory"))); |
270 |
|
271 |
|
272 |
aleatoryFillColor.addActionListener(new ActionListener(){ |
273 |
|
274 |
public void actionPerformed(ActionEvent e) { |
275 |
if(e.getSource() == aleatoryFillColor){
|
276 |
defaultFillColor.setEnabled(!aleatoryFillColor.isSelected()); |
277 |
jsFillSelelctionAlpha.setEnabled(!aleatoryFillColor.isSelected()); |
278 |
} |
279 |
} |
280 |
|
281 |
}); |
282 |
|
283 |
addComponent(new JLabel(" ")); |
284 |
addComponent(selectionFillColor); |
285 |
|
286 |
btnFileChooserAction = new ActionListener() { |
287 |
public void actionPerformed(ActionEvent e) { |
288 |
String path;
|
289 |
if (e.getSource().equals(btnSelectProjectsFolder)) {
|
290 |
path = txtProjectsFolder.getText(); |
291 |
|
292 |
|
293 |
FileFilter def = new FileFilter(){ |
294 |
public boolean accept(File f) { |
295 |
return (f.isDirectory());
|
296 |
} |
297 |
|
298 |
public String getDescription() { |
299 |
return null; |
300 |
} |
301 |
}; |
302 |
|
303 |
File file = new File(path); |
304 |
JFileChooser fc;
|
305 |
if (file.exists()) {
|
306 |
fc = new JFileChooser("SYMBOLOGY_PREFERENCE_PAGE_FILECHOOSER", file); |
307 |
} else {
|
308 |
fc= new JFileChooser("SYMBOLOGY_PREFERENCE_PAGE_FILECHOOSER",JFileChooser.getLastPath("SYMBOLOGY_PREFERENCE_PAGE_FILECHOOSER", file)); |
309 |
} |
310 |
|
311 |
|
312 |
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
313 |
fc.setMultiSelectionEnabled(false);
|
314 |
fc.setAcceptAllFileFilterUsed(false);
|
315 |
fc.addChoosableFileFilter(def); |
316 |
int result = fc.showOpenDialog(SymbologyPage.this);
|
317 |
|
318 |
if (result == JFileChooser.APPROVE_OPTION && (file = fc.getSelectedFile()) != null) |
319 |
if (e.getSource().equals(btnSelectProjectsFolder))
|
320 |
txtProjectsFolder.setText(file.getAbsolutePath()); |
321 |
} |
322 |
} |
323 |
|
324 |
}; |
325 |
btnSelectProjectsFolder = new JButton(PluginServices.getText(this, "browse")); |
326 |
btnSelectProjectsFolder.addActionListener(btnFileChooserAction); |
327 |
|
328 |
JPanel panelBrowser = new JPanel(); |
329 |
panelBrowser.setBorder(new TitledBorder(PluginServices.getText(this, "folder_images"))); |
330 |
|
331 |
panelBrowser.add(txtProjectsFolder = new JTextField(30)); |
332 |
panelBrowser.add(btnSelectProjectsFolder); |
333 |
|
334 |
addComponent(panelBrowser); |
335 |
|
336 |
fonts= new JComboBoxFonts();
|
337 |
sizes = new JComboBoxFontSizes();
|
338 |
|
339 |
JPanel panelFont = new JPanel(new FlowLayout()); |
340 |
panelFont.setBorder(new TitledBorder(PluginServices.getText(this, "default_font"))); |
341 |
panelFont.add(fonts); |
342 |
panelFont.add(sizes); |
343 |
|
344 |
addComponent(panelFont); |
345 |
initializeValues(); |
346 |
return this; |
347 |
} |
348 |
|
349 |
public String getTitle() { |
350 |
return PluginServices.getText(this, "symbology"); |
351 |
} |
352 |
// pending of a refactoring do not delete (swap commented lines)
|
353 |
// public void initializeComponents() {
|
354 |
public void initializeValues() { |
355 |
if (!panelStarted) getPanel();
|
356 |
|
357 |
PluginServices ps = PluginServices.getPluginServices(this);
|
358 |
XMLEntity xml = ps.getPersistentXML(); |
359 |
|
360 |
//Default Color
|
361 |
if (xml.contains(SYMBOL_FORECOLOR_PROPERTY_NAME)) {
|
362 |
Color color=StringUtilities.string2Color(xml.getStringProperty(SYMBOL_FORECOLOR_PROPERTY_NAME));
|
363 |
defaultColor.setColor(color); |
364 |
defaultColor.setAlpha(color.getAlpha()); |
365 |
jsDefaultSelectionAlpha.setValue(color.getAlpha()); |
366 |
SymbologyFactory.DefaultSymbolColor = color; |
367 |
}else{
|
368 |
Color color=SymbologyFactory.FactoryDefaultSymbolColor;
|
369 |
defaultColor.setColor(color); |
370 |
defaultColor.setAlpha(color.getAlpha()); |
371 |
jsDefaultSelectionAlpha.setValue(color.getAlpha()); |
372 |
SymbologyFactory.DefaultSymbolColor = color; |
373 |
} |
374 |
|
375 |
if(xml.contains(SYMBOL_ALEATORY_FILLCOLOR)){
|
376 |
aleatoryFillColor.setSelected(xml.getBooleanProperty(SYMBOL_ALEATORY_FILLCOLOR)); |
377 |
SymbologyFactory.DefaultAleatoryFillColor = aleatoryFillColor.isSelected(); |
378 |
}else{
|
379 |
aleatoryFillColor.setSelected(SymbologyFactory.FactoryDefaultAleatoryFillColor); |
380 |
SymbologyFactory.DefaultAleatoryFillColor = aleatoryFillColor.isSelected(); |
381 |
} |
382 |
|
383 |
//Fill Color
|
384 |
if (xml.contains(SYMBOL_FILLCOLOR_PROPERTY_NAME)) {
|
385 |
Color color=StringUtilities.string2Color(xml.getStringProperty(SYMBOL_FILLCOLOR_PROPERTY_NAME));
|
386 |
defaultFillColor.setColor(color); |
387 |
defaultFillColor.setAlpha(color.getAlpha()); |
388 |
jsFillSelelctionAlpha.setValue(color.getAlpha()); |
389 |
SymbologyFactory.DefaultFillSymbolColor = color; |
390 |
}else{
|
391 |
Color color=SymbologyFactory.FactoryDefaultFillSymbolColor;
|
392 |
defaultFillColor.setColor(color); |
393 |
defaultFillColor.setAlpha(color.getAlpha()); |
394 |
jsFillSelelctionAlpha.setValue(color.getAlpha()); |
395 |
SymbologyFactory.DefaultFillSymbolColor = color; |
396 |
} |
397 |
|
398 |
defaultFillColor.setEnabled(!aleatoryFillColor.isSelected()); |
399 |
jsFillSelelctionAlpha.setEnabled(!aleatoryFillColor.isSelected()); |
400 |
|
401 |
//Path
|
402 |
if (xml.contains(SYMBOL_IMAGE_FOLDER_PROPERTY_NAME)) {
|
403 |
String path=xml.getStringProperty(SYMBOL_IMAGE_FOLDER_PROPERTY_NAME);
|
404 |
txtProjectsFolder.setText(path); |
405 |
SymbologyFactory.SymbolLibraryPath = path; |
406 |
}else{
|
407 |
txtProjectsFolder.setText(SymbologyFactory.FactorySymbolLibraryPath); |
408 |
SymbologyFactory.SymbolLibraryPath = SymbologyFactory.FactorySymbolLibraryPath; |
409 |
} |
410 |
|
411 |
//Font Size
|
412 |
if(xml.contains(SYMBOL_FONT_TYPE_PROPERTY_NAME)){
|
413 |
String type=xml.getStringProperty(SYMBOL_FONT_TYPE_PROPERTY_NAME);
|
414 |
fonts.setSelectedItem(type); |
415 |
} |
416 |
else{
|
417 |
String font =SymbologyFactory.FactoryDefaultTextFont.getFontName();
|
418 |
fonts.setSelectedItem(font); |
419 |
} |
420 |
|
421 |
if(xml.contains(SYMBOL_FONT_SIZE_PROPERTY_NAME)){
|
422 |
int size=xml.getIntProperty(SYMBOL_FONT_SIZE_PROPERTY_NAME);
|
423 |
sizes.setSelectedItem(size); |
424 |
} |
425 |
else{
|
426 |
int size =SymbologyFactory.FactoryDefaultTextFont.getSize();
|
427 |
sizes.setSelectedItem(size); |
428 |
} |
429 |
SymbologyFactory.DefaultTextFont = new Font(fonts.getFont().getName(),fonts.getFont().getStyle(),(Integer) sizes.getSelectedItem()); |
430 |
|
431 |
} |
432 |
|
433 |
public void initializeDefaults() { |
434 |
defaultColor.setColor(SymbologyFactory.FactoryDefaultSymbolColor); |
435 |
jsDefaultSelectionAlpha.setValue(255);
|
436 |
|
437 |
defaultFillColor.setColor(SymbologyFactory.FactoryDefaultFillSymbolColor); |
438 |
jsFillSelelctionAlpha.setValue(255);
|
439 |
|
440 |
fonts.setSelectedItem(SymbologyFactory.FactoryDefaultTextFont.getFamily()); |
441 |
sizes.setSelectedItem(SymbologyFactory.FactoryDefaultTextFont.getSize()); |
442 |
txtProjectsFolder.setText(SymbologyFactory.FactorySymbolLibraryPath); |
443 |
|
444 |
aleatoryFillColor.setSelected(SymbologyFactory.FactoryDefaultAleatoryFillColor); |
445 |
} |
446 |
|
447 |
public boolean isValueChanged() { |
448 |
return super.hasChanged(); |
449 |
} |
450 |
|
451 |
// pending of a refactoring, following method would be removed
|
452 |
@Override
|
453 |
public void storeValues() throws StoreException { |
454 |
setPropertiesFromPanel(); |
455 |
persistPreferences(); |
456 |
} |
457 |
|
458 |
private void setPropertiesFromPanel(){ |
459 |
|
460 |
if(defaultColor.getColor()!=null){ |
461 |
Color color = defaultColor.getColor();
|
462 |
color = new Color(color.getRed(),color.getGreen(),color.getBlue(),jsDefaultSelectionAlpha.getValue()); |
463 |
SymbologyFactory.DefaultSymbolColor = color; |
464 |
} |
465 |
|
466 |
if(aleatoryFillColor != null){ |
467 |
SymbologyFactory.DefaultAleatoryFillColor = aleatoryFillColor.isSelected(); |
468 |
} |
469 |
//Fill Color
|
470 |
if (defaultFillColor.getColor() != null) { |
471 |
Color color = defaultFillColor.getColor();
|
472 |
color = new Color(color.getRed(),color.getGreen(),color.getBlue(),jsFillSelelctionAlpha.getValue()); |
473 |
SymbologyFactory.DefaultFillSymbolColor = color; |
474 |
} |
475 |
|
476 |
//Path
|
477 |
if (txtProjectsFolder.getText() != null) { |
478 |
SymbologyFactory.SymbolLibraryPath = txtProjectsFolder.getText(); |
479 |
} |
480 |
|
481 |
//Font Size
|
482 |
if(fonts.getFont() != null && sizes.getSelectedItem() != null){ |
483 |
Font font = fonts.getFont();
|
484 |
font= new Font(fonts.getFont().getFontName(), Font.BOLD, (Integer)sizes.getSelectedItem()); |
485 |
SymbologyFactory.DefaultTextFont = font; |
486 |
} |
487 |
} |
488 |
} |