Revision 7634 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/dialogs/FFrameScaleBarDialog.java

View differences:

FFrameScaleBarDialog.java
44 44
 */
45 45
package com.iver.cit.gvsig.gui.layout.fframes.dialogs;
46 46

  
47
import com.iver.andami.PluginServices;
48
import com.iver.andami.ui.mdiManager.WindowInfo;
49 47

  
50
import com.iver.cit.gvsig.AddLayer;
51
import com.iver.cit.gvsig.gui.dialogs.FontChooser;
52
import com.iver.cit.gvsig.gui.layout.Attributes;
53
import com.iver.cit.gvsig.gui.layout.FLayoutUtilities;
54
import com.iver.cit.gvsig.gui.layout.Layout;
55
import com.iver.cit.gvsig.gui.layout.fframes.FFrameScaleBar;
56
import com.iver.cit.gvsig.gui.layout.fframes.FFrameView;
57
import com.iver.cit.gvsig.gui.layout.fframes.IFFrame;
58
import com.iver.cit.gvsig.gui.layout.fframes.ListViewModel;
59
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
60

  
61 48
import java.awt.Color;
62 49
import java.awt.Component;
63 50
import java.awt.Dimension;
51
import java.awt.FlowLayout;
64 52
import java.awt.event.KeyEvent;
65 53
import java.awt.geom.Rectangle2D;
66 54

  
67 55
import javax.swing.ImageIcon;
68
import javax.swing.JButton;
69 56
import javax.swing.JCheckBox;
70
import javax.swing.JColorChooser;
71
import javax.swing.JDialog;
72
import javax.swing.JFrame;
73 57
import javax.swing.JLabel;
74 58
import javax.swing.JList;
75 59
import javax.swing.JPanel;
76 60
import javax.swing.JTextField;
77 61
import javax.swing.ListCellRenderer;
78 62

  
63
import com.iver.andami.PluginServices;
64
import com.iver.andami.ui.mdiManager.WindowInfo;
65
import com.iver.cit.gvsig.AddLayer;
66
import com.iver.cit.gvsig.gui.dialogs.FontChooser;
67
import com.iver.cit.gvsig.gui.layout.Attributes;
68
import com.iver.cit.gvsig.gui.layout.FLayoutUtilities;
69
import com.iver.cit.gvsig.gui.layout.Layout;
70
import com.iver.cit.gvsig.gui.layout.fframes.FFrameScaleBar;
71
import com.iver.cit.gvsig.gui.layout.fframes.FFrameView;
72
import com.iver.cit.gvsig.gui.layout.fframes.IFFrame;
73
import com.iver.cit.gvsig.gui.layout.fframes.ListViewModel;
74
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
79 75

  
76

  
80 77
/**
81 78
 * Dialogo para a?adir una barra de escala al Layout.
82 79
 *
......
138 135
	private JCheckBox jCheckBox = null;
139 136
	private JPRotation pRotation = null;
140 137
	private JLabel lblBarColor = null;
141
	private JLabel lblLabelColor = null;
142 138
	private JTextField txtNumDec = null;
143 139
	private JLabel lblNumDec = null;
144 140

  
......
232 228
	private javax.swing.JScrollPane getJScrollPane() {
233 229
		if (jScrollPane == null) {
234 230
			jScrollPane = new javax.swing.JScrollPane();
235
			jScrollPane.setPreferredSize(new java.awt.Dimension(220, 50));
231
			jScrollPane.setPreferredSize(new java.awt.Dimension(250,55));
236 232
			jScrollPane.setViewportView(getLiVistas());
237 233
		}
238 234

  
......
253 249

  
254 250
			liVistas = new javax.swing.JList();
255 251

  
252
			liVistas.setSize(new java.awt.Dimension(250,52));
256 253
			liVistas.setModel(listmodel);
257 254

  
258 255
			for (int i = 0; i < liVistas.getModel().getSize(); i++) {
......
433 430
		if (lIntervalo == null) {
434 431
			lIntervalo = new javax.swing.JLabel();
435 432
			lIntervalo.setText(PluginServices.getText(this, "Intervalo"));
436
			lIntervalo.setPreferredSize(new java.awt.Dimension(90, 20));
433
			lIntervalo.setPreferredSize(new java.awt.Dimension(155,20));
437 434
		}
438 435

  
439 436
		return lIntervalo;
......
447 444
	private javax.swing.JTextField getTIntervalo() {
448 445
		if (tIntervalo == null) {
449 446
			tIntervalo = new javax.swing.JTextField();
450
			tIntervalo.setPreferredSize(new java.awt.Dimension(90, 20));
447
			tIntervalo.setPreferredSize(new java.awt.Dimension(80,20));
451 448
			tIntervalo.setText(fframescalebar.getInterval());
452 449
			tIntervalo.addKeyListener(new java.awt.event.KeyAdapter() {
453 450
					public void keyReleased(java.awt.event.KeyEvent e) {
......
473 470
		if (lNumIntervalos == null) {
474 471
			lNumIntervalos = new javax.swing.JLabel();
475 472
			lNumIntervalos.setText(PluginServices.getText(this, "Num_intervalos"));
476
			lNumIntervalos.setPreferredSize(new java.awt.Dimension(90, 20));
473
			lNumIntervalos.setPreferredSize(new java.awt.Dimension(155,20));
477 474
		}
478 475

  
479 476
		return lNumIntervalos;
......
487 484
	private javax.swing.JTextField getTNumIntervalos() {
488 485
		if (tNumIntervalos == null) {
489 486
			tNumIntervalos = new javax.swing.JTextField();
490
			tNumIntervalos.setPreferredSize(new java.awt.Dimension(90, 20));
487
			tNumIntervalos.setPreferredSize(new java.awt.Dimension(80,20));
491 488
			tNumIntervalos.setText(Integer.toString(
492 489
					fframescalebar.getNumInterval()));
493 490
			tNumIntervalos.addKeyListener(new java.awt.event.KeyAdapter() {
......
514 511
			lDivIzquierda = new javax.swing.JLabel();
515 512
			lDivIzquierda.setText(PluginServices.getText(this,
516 513
					"divisiones_izquierda"));
517
			lDivIzquierda.setPreferredSize(new java.awt.Dimension(90, 20));
514
			lDivIzquierda.setPreferredSize(new java.awt.Dimension(155,20));
518 515
		}
519 516

  
520 517
		return lDivIzquierda;
......
528 525
	private javax.swing.JTextField getTDivIzquierda() {
529 526
		if (tDivIzquierda == null) {
530 527
			tDivIzquierda = new javax.swing.JTextField();
531
			tDivIzquierda.setPreferredSize(new java.awt.Dimension(90, 20));
528
			tDivIzquierda.setPreferredSize(new java.awt.Dimension(80,20));
532 529
			tDivIzquierda.setText(Integer.toString(fframescalebar.getNumLeft()));
533 530
			tDivIzquierda.addKeyListener(new java.awt.event.KeyAdapter() {
534 531
					public void keyReleased(java.awt.event.KeyEvent e) {
......
622 619
	}
623 620

  
624 621
	/**
625
	 * @see com.iver.cit.gvsig.gui.layout.fframes.dialogs.IFFrameDialog#getIsAcepted()
622
	 * @see com.iver.cit.gvsig.project.documents.layout.fframes.gui.dialogs.IFFrameDialog#getIsAcepted()
626 623
	 */
627 624
	public boolean getIsAcepted() {
628 625
		return isAcepted;
......
663 660
	private JPanel getPMarcoVista() {
664 661
		if (pMarcoVista == null) {
665 662
			pMarcoVista = new JPanel();
666
			pMarcoVista.setBounds(7, 9, 240, 86);
663
			pMarcoVista.setBounds(7, 9, 263, 86);
667 664
			pMarcoVista.setBorder(javax.swing.BorderFactory.createTitledBorder(
668
					null, PluginServices.getText(this,PluginServices.getText(this,"marco_vista")),
669
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
670
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
665
					null, PluginServices.getText(this,PluginServices.getText(this,"marco_vista")),javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
671 666
			pMarcoVista.add(getJScrollPane(), null);
672 667
		}
673 668

  
......
681 676
	 */
682 677
	private JPanel getPDescripcion() {
683 678
		if (pDescripcion == null) {
679
			FlowLayout flowLayout1 = new FlowLayout();
680
			flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
684 681
			pDescripcion = new JPanel();
685
			pDescripcion.setBounds(256, 9, 216, 110);
682
			pDescripcion.setLayout(flowLayout1);
683
			pDescripcion.setBounds(275, 9, 204, 110);
686 684
			pDescripcion.setBorder(javax.swing.BorderFactory.createTitledBorder(null, PluginServices.getText(this,"Escala"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
687 685
			pDescripcion.add(getTfNumberScale(), null);
688 686
			pDescripcion.add(getJCheckBox(), null);
......
700 698
	private JTextField getTfNumberScale() {
701 699
		if (tfDescripcion == null) {
702 700
			tfDescripcion = new JTextField();
703
			tfDescripcion.setPreferredSize(new java.awt.Dimension(190, 20));
701
			tfDescripcion.setPreferredSize(new java.awt.Dimension(180,20));
704 702

  
705 703
			tfDescripcion.setEditable(false);
706 704
			/*if (fframeview!=null){
......
720 718
	 */
721 719
	private JPanel getPUnidades() {
722 720
		if (pUnidades == null) {
721
			FlowLayout flowLayout = new FlowLayout();
722
			flowLayout.setAlignment(java.awt.FlowLayout.LEFT);
723 723
			pUnidades = new JPanel();
724
			pUnidades.setLocation(255, 129);
725
			pUnidades.setSize(216, 107);
724
			pUnidades.setLayout(flowLayout);
725
			pUnidades.setLocation(274, 122);
726
			pUnidades.setSize(204, 110);
726 727
			pUnidades.setBorder(javax.swing.BorderFactory.createTitledBorder(
727
					null, PluginServices.getText(this, "unidades"),
728
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
729
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
728
					null, PluginServices.getText(this, "unidades"),javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
730 729
			pUnidades.add(getCbUnidades(), null);
731 730
			pUnidades.add(getChbMostrarUnidades(), null);
732 731
			pUnidades.add(getChbSobreUnidades(), null);
......
744 743
		if (chbSobreDescripcion == null) {
745 744
			chbSobreDescripcion = new JCheckBox();
746 745
			chbSobreDescripcion.setSelected(fframescalebar.isAboveDescription());
746
			chbSobreDescripcion.setPreferredSize(new java.awt.Dimension(180,24));
747 747
			chbSobreDescripcion.setText(PluginServices.getText(this,"sobre_la_barra"));
748 748
		}
749 749

  
......
789 789
	 */
790 790
	private JPanel getPEtiquetas() {
791 791
		if (pEtiquetas == null) {
792
			FlowLayout flowLayout2 = new FlowLayout();
793
			flowLayout2.setAlignment(java.awt.FlowLayout.LEFT);
792 794
			pEtiquetas = new JPanel();
795
			pEtiquetas.setLayout(flowLayout2);
793 796
			pEtiquetas.setBorder(javax.swing.BorderFactory.createTitledBorder(
794
					null, PluginServices.getText(this, "etiquetas"),
795
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
796
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
797
			pEtiquetas.setBounds(257, 246, 216, 93);
797
					null, PluginServices.getText(this, "etiquetas"),javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
798
			pEtiquetas.setBounds(276, 235, 204, 104);
798 799
			pEtiquetas.add(getChbEtiquetas(), null);
799 800
			pEtiquetas.add(getJPanel2(), null);
800 801
		}
......
824 825
	 */
825 826
	private JPanel getPBarra() {
826 827
		if (pBarra == null) {
828
			FlowLayout flowLayout3 = new FlowLayout();
829
			flowLayout3.setAlignment(java.awt.FlowLayout.LEFT);
827 830
			lblNumDec = new JLabel();
828
			lblNumDec.setText("numero_decimales_mostrar");
831
			lblNumDec.setText(PluginServices.getText(this,"numero_decimales_mostrar"));
829 832
			lblBarColor = new JLabel();
830 833
			lblBarColor.setText(PluginServices.getText(this,"color"));
831 834
			pBarra = new JPanel();
832
			pBarra.setBounds(8, 104, 240, 235);
835
			pBarra.setLayout(flowLayout3);
836
			pBarra.setBounds(8, 104, 263, 235);
833 837
			pBarra.setBorder(javax.swing.BorderFactory.createTitledBorder(
834
					null, PluginServices.getText(this,"barra"),
835
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
836
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
838
					null, PluginServices.getText(this,"barra"),javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
837 839
			pBarra.add(getChbMantenerIntervalo(), null);
838 840
			pBarra.add(getCbEscala(), null);
839 841
			pBarra.add(lblNumDec, null);
......
843 845
			pBarra.add(getJPanel6(), null);
844 846
			pBarra.add(lblBarColor, null);
845 847
			pBarra.add(getBBarraColor(), null);
846
			//pBarra.add(getJPanel(), null);
847 848
		}
848 849

  
849 850
		return pBarra;
......
857 858
	private JPanel getJPanel5() {
858 859
		if (jPanel5 == null) {
859 860
			jPanel5 = new JPanel();
860
			jPanel5.setPreferredSize(new java.awt.Dimension(200, 30));
861
			jPanel5.setPreferredSize(new java.awt.Dimension(245,30));
861 862
			jPanel5.add(getLIntervalo(), null);
862 863
			jPanel5.add(getTIntervalo(), null);
863 864
		}
......
873 874
	private JPanel getJPanel6() {
874 875
		if (jPanel6 == null) {
875 876
			jPanel6 = new JPanel();
877
			jPanel6.setPreferredSize(new java.awt.Dimension(245,30));
876 878
			jPanel6.add(getLDivIzquierda(), null);
877 879
			jPanel6.add(getTDivIzquierda(), null);
878 880
		}
......
888 890
	private JPanel getJPanel7() {
889 891
		if (jPanel7 == null) {
890 892
			jPanel7 = new JPanel();
893
			jPanel7.setPreferredSize(new java.awt.Dimension(245,30));
891 894
			jPanel7.add(getLNumIntervalos(), null);
892 895
			jPanel7.add(getTNumIntervalos(), null);
893 896
		}
......
988 991
	 */
989 992
	private JPanel getJPanel2() {
990 993
		if (jPanel2 == null) {
991
			lblLabelColor = new JLabel();
992
			lblLabelColor.setText(PluginServices.getText(this,"color"));
993 994
			jPanel2 = new JPanel();
994 995
			jPanel2.add(getBFuente(), null);
995
			jPanel2.add(lblLabelColor, null);
996 996
			jPanel2.add(getBUnidadesColor(), null);
997 997

  
998 998
			//jPanel2.add(getJPanel1(), null);
......
1010 1010
		if (jCheckBox == null) {
1011 1011
			jCheckBox = new JCheckBox();
1012 1012
			jCheckBox.setSelected(fframescalebar.isShowDescription());
1013
			jCheckBox.setPreferredSize(new java.awt.Dimension(180,24));
1013 1014
			jCheckBox.setText(PluginServices.getText(this,"mostrar_escala_numerica"));
1014 1015
		}
1015 1016

  

Also available in: Unified diff