Changeset 4112 in josm
- Timestamp:
- 2011-06-01T21:29:32+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java
r4072 r4112 65 65 case UNDECIDED: 66 66 model.addElement(tr("Choose a value")); 67 setFont(getFont().deriveFont(Font.ITALIC)); 68 setToolTipText(tr("Please decide which values to keep")); 67 cbDecisionRenderer.setFont(getFont().deriveFont(Font.ITALIC)); 69 68 cbDecisionRenderer.setSelectedIndex(0); 70 69 break; 71 70 case KEEP_ONE: 72 71 model.addElement(decision.getChosenValue()); 73 setToolTipText(tr("Value ''{0}'' is going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey()));72 cbDecisionRenderer.setFont(getFont()); 74 73 cbDecisionRenderer.setSelectedIndex(0); 75 74 break; 76 75 case KEEP_NONE: 77 76 model.addElement(tr("deleted")); 78 setFont(getFont().deriveFont(Font.ITALIC)); 79 setToolTipText(tr("The key ''{0}'' and all its values are going to be removed", decision.getKey())); 77 cbDecisionRenderer.setFont(getFont().deriveFont(Font.ITALIC)); 80 78 cbDecisionRenderer.setSelectedIndex(0); 81 79 break; 82 80 case KEEP_ALL: 83 81 model.addElement(decision.getChosenValue()); 84 setToolTipText(tr("All values joined as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey()));82 cbDecisionRenderer.setFont(getFont()); 85 83 cbDecisionRenderer.setSelectedIndex(0); 84 break; 85 } 86 } 87 88 /** 89 * Sets the text of the tooltip for both renderers, this (the JLabel) and the combobox renderer. 90 */ 91 protected void renderToolTipText(MultiValueResolutionDecision decision) { 92 switch(decision.getDecisionType()) { 93 case UNDECIDED: 94 { 95 String toolTipText = tr("Please decide which values to keep"); 96 setToolTipText(toolTipText); 97 cbDecisionRenderer.setToolTipText(toolTipText); 98 break; 99 } 100 case KEEP_ONE: 101 { 102 String toolTipText = tr("Value ''{0}'' is going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey()); 103 setToolTipText(toolTipText); 104 cbDecisionRenderer.setToolTipText(toolTipText); 105 break; 106 } 107 case KEEP_NONE: 108 { 109 String toolTipText = tr("The key ''{0}'' and all its values are going to be removed", decision.getKey()); 110 setToolTipText(toolTipText); 111 cbDecisionRenderer.setToolTipText(toolTipText); 112 break; 113 } 114 case KEEP_ALL: 115 String toolTipText = tr("All values joined as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey()); 116 setToolTipText(toolTipText); 117 cbDecisionRenderer.setToolTipText(toolTipText); 86 118 break; 87 119 } … … 103 135 MultiValueResolutionDecision decision = (MultiValueResolutionDecision)value; 104 136 renderColors(decision,isSelected); 137 renderToolTipText(decision); 105 138 switch(column) { 106 139 case 0:
Note:
See TracChangeset
for help on using the changeset viewer.