Revision 38933 branches/v2_0_0_prep/extensions/extI18n/src/main/java/org/gvsig/i18n/extension/preferences/I18nPreferencePage.java

View differences:

I18nPreferencePage.java
26 26
 */
27 27
package org.gvsig.i18n.extension.preferences;
28 28

  
29
import java.awt.Color;
29 30
import java.awt.Component;
30 31
import java.awt.Dimension;
31 32
import java.awt.Font;
......
55 56
import javax.swing.filechooser.FileFilter;
56 57
import javax.swing.table.TableColumn;
57 58

  
59
import org.apache.batik.ext.swing.GridBagConstants;
60

  
58 61
import org.gvsig.andami.PluginServices;
59 62
import org.gvsig.andami.preferences.AbstractPreferencePage;
60 63
import org.gvsig.andami.preferences.StoreException;
......
107 110
		setParentID("org.gvsig.coreplugin.preferences.general.GeneralPage");
108 111
		
109 112
	icon = PluginServices.getIconTheme().get("i18n-preferences");
113
	
114
	// GridBagConstants.HORIZONTAL
115
	Insets zero_ins = new Insets(0, 0, 0, 0);
116
	Font hints_fnt = new JLabel().getFont();
110 117

  
118
	addComponent(getLocalesPanel(),
119
	    GridBagConstants.HORIZONTAL, zero_ins);
120
	
121
	addComponent(Box.createRigidArea(new Dimension(0, 5)),
122
	    GridBagConstants.HORIZONTAL, zero_ins);
123
	
124
	addComponent(getActiveLocaleLabel(
125
	    this.getBackground(), hints_fnt.deriveFont(Font.BOLD)),
126
	    GridBagConstants.HORIZONTAL, zero_ins);
127
	
128
	addComponent(Box.createRigidArea(new Dimension(0, 5)),
129
	    GridBagConstants.HORIZONTAL, zero_ins);
130
	
131
	addComponent(getButtonsPanel(),
132
	    GridBagConstants.HORIZONTAL, zero_ins);
133
	
134
	addComponent(Box.createRigidArea(new Dimension(0, 5)),
135
	    GridBagConstants.HORIZONTAL, zero_ins);
136
	
137
	addComponent(getCollaborationLabel(
138
	    this.getBackground(), hints_fnt),
139
	    GridBagConstants.HORIZONTAL, zero_ins);
140

  
141
	/*
111 142
	add(getLocalesPanel());
112 143
	add(Box.createRigidArea(new Dimension(0, 5)));
113 144
	add(getActiveLocaleLabel());
......
115 146
	add(getButtonsPanel());
116 147
	add(Box.createRigidArea(new Dimension(0, 5)));
117 148
	add(getCollaborationLabel());
149
	*/
118 150
    }
119 151

  
120 152
    public String getID() {
......
499 531
	localesPanel.setLayout(new BoxLayout(localesPanel, BoxLayout.Y_AXIS));
500 532
	localesPanel.add(scrollPane);
501 533
	localesPanel.setAlignmentX(CENTER_ALIGNMENT);
502
	localesPanel.setPreferredSize(new Dimension(236, 230));
534
	localesPanel.setPreferredSize(new Dimension(236, 200));
503 535
	localesPanel.setMaximumSize(new Dimension(500, 230));
504 536

  
505 537
	return localesPanel;
......
599 631
    /**
600 632
     * Creates the JLabel to show information about the preference page.
601 633
     */
602
    private Component getActiveLocaleLabel() {
634
    private Component getActiveLocaleLabel(Color bg, Font fnt) {
603 635
	JTextArea textArea = new JTextArea(Messages
604 636
		.getText("I18nPreferencePage.ayuda"));
605 637
	textArea.setEditable(false);
606 638
	textArea.setAutoscrolls(true);
607 639
	textArea.setLineWrap(true);
608 640
	textArea.setWrapStyleWord(true);
609
	textArea.setFont(textArea.getFont().deriveFont(Font.BOLD));
641
	textArea.setFont(fnt);
642
    textArea.setBackground(bg);
610 643
	return textArea;
611 644
    }
612 645

  
......
614 647
     * Creates the JLabel to show information about gvSIG translation
615 648
     * collaboration.
616 649
     */
617
    private Component getCollaborationLabel() {
650
    private Component getCollaborationLabel(Color bg, Font fnt) {
618 651
	JTextArea textArea = new JTextArea(Messages
619 652
		.getText("I18nPreferencePage.colaboracion"));
620 653
	textArea.setEditable(false);
621 654
	textArea.setAutoscrolls(true);
622 655
	textArea.setLineWrap(true);
623 656
	textArea.setWrapStyleWord(true);
657
	textArea.setFont(fnt);
658
	textArea.setBackground(bg);
624 659
	return textArea;
625 660
    }
626 661

  

Also available in: Unified diff