Revision 2518 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/project/ViewProperties.java
ViewProperties.java | ||
---|---|---|
78 | 78 |
private javax.swing.JTextArea txtComments = null; |
79 | 79 |
private javax.swing.JLabel jLabel7 = null; |
80 | 80 |
private javax.swing.JLabel lblColor = null; |
81 |
|
|
82 |
private Color backColor = null; |
|
83 |
|
|
81 | 84 |
private javax.swing.JButton btnColor = null; |
82 | 85 |
private javax.swing.JButton btnOk = null; |
83 | 86 |
private javax.swing.JButton btnCancel = null; |
... | ... | |
357 | 360 |
lblColor = new javax.swing.JLabel(); |
358 | 361 |
lblColor.setText(""); |
359 | 362 |
lblColor.setPreferredSize(new java.awt.Dimension(30, 16)); |
360 |
lblColor.setBackground(view.getMapContext().getViewPort().getBackColor()); |
|
363 |
Color theColor = view.getMapContext().getViewPort().getBackColor(); |
|
364 |
if (theColor == null) theColor = Color.WHITE; |
|
365 |
lblColor.setBackground(theColor); |
|
361 | 366 |
lblColor.setOpaque(true); |
362 | 367 |
} |
363 | 368 |
|
... | ... | |
383 | 388 |
|
384 | 389 |
if (ret != null) { |
385 | 390 |
lblColor.setBackground(ret); |
391 |
backColor = ret; |
|
386 | 392 |
} |
393 |
else |
|
394 |
lblColor.setBackground(Color.WHITE); |
|
387 | 395 |
} |
388 | 396 |
}); |
389 | 397 |
} |
... | ... | |
410 | 418 |
view.setComment(txtComments.getText()); |
411 | 419 |
view.getMapContext().getViewPort().setMapUnits(cmbMapUnits.getSelectedIndex()); |
412 | 420 |
view.getMapContext().getViewPort().setDistanceUnits(cmbDistanceUnits.getSelectedIndex()); |
413 |
view.setBackColor(lblColor.getBackground());
|
|
421 |
view.setBackColor(backColor);
|
|
414 | 422 |
|
415 | 423 |
PluginServices.getMDIManager().closeView(ViewProperties.this); |
416 | 424 |
} |
Also available in: Unified diff