- Timestamp:
- 2014-09-26T13:10:26+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r6084 r7586 18 18 import javax.swing.JButton; 19 19 import javax.swing.JDialog; 20 import javax.swing.JLabel; 20 21 import javax.swing.JOptionPane; 21 22 import javax.swing.JPanel; … … 34 35 /** 35 36 * This is an extended dialog for resolving conflict between {@link OsmPrimitive}s. 36 * 37 * @since 1622 37 38 */ 38 39 public class ConflictResolutionDialog extends JDialog implements PropertyChangeListener { 39 40 /** the conflict resolver component */ 40 41 private ConflictResolver resolver; 42 private JLabel titleLabel; 41 43 42 44 private ApplyResolutionAction applyResolutionAction; … … 109 111 protected void build() { 110 112 setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 113 getContentPane().setLayout(new BorderLayout()); 114 115 titleLabel = new JLabel(); 116 titleLabel.setHorizontalAlignment(JLabel.CENTER); 117 getContentPane().add(titleLabel, BorderLayout.NORTH); 118 111 119 updateTitle(); 112 getContentPane().setLayout(new BorderLayout());113 120 114 121 resolver = new ConflictResolver(); … … 123 130 } 124 131 132 /** 133 * Constructs a new {@code ConflictResolutionDialog}. 134 * @param parent parent component 135 */ 125 136 public ConflictResolutionDialog(Component parent) { 126 137 super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL); 127 138 build(); 128 } 129 139 pack(); 140 if (getInsets().top > 0) { 141 titleLabel.setVisible(false); 142 } 143 } 144 145 /** 146 * Replies the conflict resolver component. 147 * @return the conflict resolver component 148 */ 130 149 public ConflictResolver getConflictResolver() { 131 150 return resolver; … … 238 257 239 258 @Override 259 public void setTitle(String title) { 260 super.setTitle(title); 261 if (titleLabel != null) { 262 titleLabel.setText(title); 263 } 264 } 265 266 @Override 240 267 public void propertyChange(PropertyChangeEvent evt) { 241 268 if (evt.getPropertyName().equals(ConflictResolver.MY_PRIMITIVE_PROP)) {
Note:
See TracChangeset
for help on using the changeset viewer.