Ignore:
Timestamp:
2024-04-22T20:59:26+02:00 (10 months ago)
Author:
taylor.smock
Message:

Revert most var changes from r19048, fix most new compile warnings and checkstyle issues

Also, document why various ErrorProne checks were originally disabled and fix
generic SonarLint issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java

    r19048 r19050  
    55import java.awt.ComponentOrientation;
    66import java.awt.Font;
     7import java.awt.FontMetrics;
    78import java.awt.Graphics;
    89import java.awt.Graphics2D;
     
    1819
    1920import javax.swing.Icon;
     21import javax.swing.JTextField;
     22import javax.swing.RepaintManager;
    2023import javax.swing.JMenuItem;
    2124import javax.swing.JPopupMenu;
    22 import javax.swing.JTextField;
    23 import javax.swing.RepaintManager;
    2425import javax.swing.UIManager;
    2526import javax.swing.text.BadLocationException;
     
    254255     */
    255256    public static Color getHintTextColor() {
    256         var color = UIManager.getColor("TextField[Disabled].textForeground"); // Nimbus?
     257        Color color = UIManager.getColor("TextField[Disabled].textForeground"); // Nimbus?
    257258        if (color == null)
    258259            color = UIManager.getColor("TextField.inactiveForeground");
     
    305306            g.drawString(getHint(), x, getBaseline(getWidth(), getHeight()));
    306307        } else {
    307             final var metrics = g.getFontMetrics(g.getFont());
     308            FontMetrics metrics = g.getFontMetrics(g.getFont());
    308309            int dx = metrics.stringWidth(getHint());
    309310            g.drawString(getHint(), x - dx, getBaseline(getWidth(), getHeight()));
Note: See TracChangeset for help on using the changeset viewer.