Changeset 16675 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-06-17T23:03:35+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
r16672 r16675 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.widgets; 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 3 5 4 6 import java.awt.Color; … … 18 20 import javax.swing.text.JTextComponent; 19 21 22 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 20 23 import org.openstreetmap.josm.tools.CheckParameterUtil; 21 24 … … 33 36 */ 34 37 public abstract class AbstractTextComponentValidator implements ActionListener, FocusListener, DocumentListener, PropertyChangeListener { 35 protected static final Color ERROR_COLOR = Color.RED; 38 39 protected static final Color ERROR_COLOR = new NamedColorProperty(marktr("Input validation: error"), Color.RED).get(); 36 40 protected static final Border ERROR_BORDER = BorderFactory.createLineBorder(ERROR_COLOR, 1); 37 protected static final Color ERROR_BACKGROUND = new Color(0xFFCCCC); 38 protected static final Color WARNING_COLOR = new Color(0xFFA500); 41 protected static final Color ERROR_BACKGROUND = new NamedColorProperty( 42 marktr("Input validation: error background"), new Color(0xFFCCCC)).get(); 43 44 protected static final Color WARNING_COLOR = new NamedColorProperty(marktr("Input validation: warning"), new Color(0xFFA500)).get(); 39 45 protected static final Border WARNING_BORDER = BorderFactory.createLineBorder(WARNING_COLOR, 1); 40 protected static final Color WARNING_BACKGROUND = new Color(0xFFEDCC); 41 protected static final Color VALID_COLOR = new Color(0x008000); 46 protected static final Color WARNING_BACKGROUND = new NamedColorProperty( 47 marktr("Input validation: warning background"), new Color(0xFFEDCC)).get(); 48 49 protected static final Color VALID_COLOR = new NamedColorProperty(marktr("Input validation: valid"), new Color(0x008000)).get(); 42 50 protected static final Border VALID_BORDER = BorderFactory.createLineBorder(VALID_COLOR, 1); 43 51
Note:
See TracChangeset
for help on using the changeset viewer.