Changeset 19050 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
- Timestamp:
- 2024-04-22T20:59:26+02:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
r19048 r19050 5 5 import java.awt.ComponentOrientation; 6 6 import java.awt.Font; 7 import java.awt.FontMetrics; 7 8 import java.awt.Graphics; 8 9 import java.awt.Graphics2D; … … 18 19 19 20 import javax.swing.Icon; 21 import javax.swing.JTextField; 22 import javax.swing.RepaintManager; 20 23 import javax.swing.JMenuItem; 21 24 import javax.swing.JPopupMenu; 22 import javax.swing.JTextField;23 import javax.swing.RepaintManager;24 25 import javax.swing.UIManager; 25 26 import javax.swing.text.BadLocationException; … … 254 255 */ 255 256 public static Color getHintTextColor() { 256 var color = UIManager.getColor("TextField[Disabled].textForeground"); // Nimbus?257 Color color = UIManager.getColor("TextField[Disabled].textForeground"); // Nimbus? 257 258 if (color == null) 258 259 color = UIManager.getColor("TextField.inactiveForeground"); … … 305 306 g.drawString(getHint(), x, getBaseline(getWidth(), getHeight())); 306 307 } else { 307 final varmetrics = g.getFontMetrics(g.getFont());308 FontMetrics metrics = g.getFontMetrics(g.getFont()); 308 309 int dx = metrics.stringWidth(getHint()); 309 310 g.drawString(getHint(), x - dx, getBaseline(getWidth(), getHeight()));
Note:
See TracChangeset
for help on using the changeset viewer.