Revision 9246 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/gui/MapProperties.java
MapProperties.java | ||
---|---|---|
75 | 75 |
private javax.swing.JTextField txtHorizontal = null; |
76 | 76 |
private javax.swing.JLabel jLabel5 = null; |
77 | 77 |
private javax.swing.JTextField txtVertical = null; |
78 |
private javax.swing.JCheckBox chkMalla = null;
|
|
78 |
private javax.swing.JCheckBox chkActiveGrid = null;
|
|
79 | 79 |
private ProjectMap map; |
80 | 80 |
private javax.swing.JPanel jPanel = null; |
81 | 81 |
private javax.swing.JPanel jPanel1 = null; |
... | ... | |
86 | 86 |
private javax.swing.JPanel jPanel4 = null; |
87 | 87 |
private javax.swing.JLabel jLabel7 = null; |
88 | 88 |
private javax.swing.JLabel jLabel8 = null; |
89 |
private javax.swing.JCheckBox jCheckBox = null;
|
|
89 |
private javax.swing.JCheckBox activeRuler = null;
|
|
90 | 90 |
private javax.swing.JPanel jPanel5 = null; |
91 |
private JCheckBox jCheckBox1 = null;
|
|
91 |
private JCheckBox showGrid = null;
|
|
92 | 92 |
private JCheckBox chbEditable = null; |
93 | 93 |
private AcceptCancelPanel accept; |
94 | 94 |
/** |
... | ... | |
125 | 125 |
getTxtHorizontal().setText(Double.toString(map.getModel().getAtributes().getNumUnitsX())); |
126 | 126 |
getTxtVertical().setText(Double.toString(map.getModel().getAtributes().getNumUnitsY())); |
127 | 127 |
|
128 |
getChkMalla().setSelected(map.getModel().isAdjustingToGrid());
|
|
128 |
getChkActiveGrid().setSelected(map.getModel().isAdjustingToGrid());
|
|
129 | 129 |
//map.getModel().setProjectMap(map); |
130 | 130 |
} |
131 | 131 |
|
... | ... | |
358 | 358 |
* |
359 | 359 |
* @return javax.swing.JCheckBox |
360 | 360 |
*/ |
361 |
private javax.swing.JCheckBox getChkMalla() {
|
|
362 |
if (chkMalla == null) {
|
|
363 |
chkMalla = new javax.swing.JCheckBox();
|
|
364 |
chkMalla.setText(PluginServices.getText(this, "malla_activada"));
|
|
365 |
chkMalla.setSelected(true);
|
|
366 |
chkMalla.setPreferredSize(new java.awt.Dimension(190,24));
|
|
367 |
chkMalla.setHorizontalTextPosition(javax.swing.SwingConstants.TRAILING);
|
|
368 |
chkMalla.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
|
369 |
chkMalla.addActionListener(new java.awt.event.ActionListener() {
|
|
361 |
private javax.swing.JCheckBox getChkActiveGrid() {
|
|
362 |
if (chkActiveGrid == null) {
|
|
363 |
chkActiveGrid = new javax.swing.JCheckBox();
|
|
364 |
chkActiveGrid.setText(PluginServices.getText(this, "malla_activada"));
|
|
365 |
chkActiveGrid.setSelected(true);
|
|
366 |
chkActiveGrid.setPreferredSize(new java.awt.Dimension(190,24));
|
|
367 |
chkActiveGrid.setHorizontalTextPosition(javax.swing.SwingConstants.TRAILING);
|
|
368 |
chkActiveGrid.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
|
369 |
chkActiveGrid.addActionListener(new java.awt.event.ActionListener() {
|
|
370 | 370 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
371 | 371 |
///map.getModel().setIsCuadricula(chkMalla.isSelected()); |
372 | 372 |
} |
373 | 373 |
}); |
374 | 374 |
} |
375 | 375 |
|
376 |
return chkMalla;
|
|
376 |
return chkActiveGrid;
|
|
377 | 377 |
} |
378 | 378 |
|
379 | 379 |
/** |
... | ... | |
542 | 542 |
* |
543 | 543 |
* @return javax.swing.JCheckBox |
544 | 544 |
*/ |
545 |
private javax.swing.JCheckBox getJCheckBox() {
|
|
546 |
if(jCheckBox == null) {
|
|
547 |
jCheckBox = new javax.swing.JCheckBox();
|
|
548 |
jCheckBox.setText(PluginServices.getText(this,"activar_regla"));
|
|
549 |
jCheckBox.setPreferredSize(new java.awt.Dimension(190,24));
|
|
550 |
jCheckBox.setSelected(map.getModel().getRuler());
|
|
551 |
jCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
|
545 |
private javax.swing.JCheckBox getChbActiveRuler() {
|
|
546 |
if(activeRuler == null) {
|
|
547 |
activeRuler = new javax.swing.JCheckBox();
|
|
548 |
activeRuler.setText(PluginServices.getText(this,"activar_regla"));
|
|
549 |
activeRuler.setPreferredSize(new java.awt.Dimension(190,24));
|
|
550 |
activeRuler.setSelected(map.getModel().getRuler());
|
|
551 |
activeRuler.addActionListener(new java.awt.event.ActionListener() {
|
|
552 | 552 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
553 | 553 |
//map.getModel().setRuler(jCheckBox.isSelected()); |
554 | 554 |
} |
555 | 555 |
}); |
556 | 556 |
} |
557 |
return jCheckBox;
|
|
557 |
return activeRuler;
|
|
558 | 558 |
} |
559 | 559 |
/** |
560 | 560 |
* This method initializes jPanel5 |
... | ... | |
568 | 568 |
jPanel5 = new javax.swing.JPanel(); |
569 | 569 |
jPanel5.setLayout(flowLayout1); |
570 | 570 |
jPanel5.setPreferredSize(new java.awt.Dimension(390,120)); |
571 |
jPanel5.add(getChkMalla(), null);
|
|
572 |
jPanel5.add(getJCheckBox(), null);
|
|
573 |
jPanel5.add(getJCheckBox1(), null);
|
|
571 |
jPanel5.add(getChkActiveGrid(), null);
|
|
572 |
jPanel5.add(getChbActiveRuler(), null);
|
|
573 |
jPanel5.add(getChbShowGrid(), null);
|
|
574 | 574 |
jPanel5.add(getChbEditable(), null); |
575 | 575 |
} |
576 | 576 |
return jPanel5; |
... | ... | |
580 | 580 |
* |
581 | 581 |
* @return javax.swing.JCheckBox |
582 | 582 |
*/ |
583 |
private JCheckBox getJCheckBox1() {
|
|
584 |
if (jCheckBox1 == null) {
|
|
585 |
jCheckBox1 = new JCheckBox();
|
|
586 |
jCheckBox1.setSelected(map.getModel().getGridVisible());
|
|
587 |
jCheckBox1.setPreferredSize(new java.awt.Dimension(190,24));
|
|
588 |
jCheckBox1.setText(PluginServices.getText(this,"visualizar_cuadricula"));
|
|
589 |
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
|
|
583 |
private JCheckBox getChbShowGrid() {
|
|
584 |
if (showGrid == null) {
|
|
585 |
showGrid = new JCheckBox();
|
|
586 |
showGrid.setSelected(map.getModel().getGridVisible());
|
|
587 |
showGrid.setPreferredSize(new java.awt.Dimension(190,24));
|
|
588 |
showGrid.setText(PluginServices.getText(this,"visualizar_cuadricula"));
|
|
589 |
showGrid.addActionListener(new java.awt.event.ActionListener() {
|
|
590 | 590 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
591 | 591 |
|
592 | 592 |
} |
593 | 593 |
}); |
594 | 594 |
} |
595 |
return jCheckBox1;
|
|
595 |
return showGrid;
|
|
596 | 596 |
} |
597 | 597 |
/** |
598 | 598 |
* @see com.iver.andami.ui.mdiManager.SingletonWindow#getWindowModel() |
... | ... | |
622 | 622 |
map.setName(txtName.getText()); |
623 | 623 |
map.setOwner(txtOwner.getText()); |
624 | 624 |
map.setComment(txtComments.getText()); |
625 |
map.getModel().setGridVisible(chkMalla.isSelected()); |
|
626 |
map.getModel().setRuler(jCheckBox.isSelected()); |
|
625 |
map.getModel().setAdjustToGrid(chkActiveGrid.isSelected()); |
|
626 |
map.getModel().setGridVisible(showGrid.isSelected()); |
|
627 |
map.getModel().setRuler(activeRuler.isSelected()); |
|
627 | 628 |
map.getModel().setEditable(chbEditable.isSelected()); |
628 | 629 |
try { |
629 | 630 |
String sh=txtHorizontal.getText(); |
... | ... | |
641 | 642 |
} |
642 | 643 |
|
643 | 644 |
PluginServices.getMDIManager().closeWindow(MapProperties.this); |
644 |
map.getModel().setGridVisible(getJCheckBox1().isSelected());
|
|
645 |
map.getModel().setGridVisible(getChbShowGrid().isSelected());
|
|
645 | 646 |
map.getModel().refresh(); |
646 | 647 |
} catch (NumberFormatException ex) { |
647 | 648 |
NotificationManager.addInfo("no es un double", ex); |
Also available in: Unified diff