Class AbstractIdTextField<T extends AbstractTextComponentValidator>

Type Parameters:
T - The ID validator class
All Implemented Interfaces:
ComponentListener, FocusListener, KeyListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, CellEditor, Scrollable, SwingConstants, TableCellEditor, Destroyable
Direct Known Subclasses:
ChangesetIdTextField, OsmIdTextField

An abstract class for ID text fields.
Since:
5765
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • performValidation

      public final void performValidation()
      Performs the field validation
    • clearTextIfInvalid

      public final void clearTextIfInvalid()
      Clears field if content is invalid
    • readIds

      public abstract boolean readIds()
      Reads the id(s).
      Returns:
      true if at least a valid id has been successfully read, false otherwise
    • tryToPasteFromClipboard

      public void tryToPasteFromClipboard()
      Tries to set text from clipboard (no effect with invalid or empty clipboard)
    • tryToPasteFrom

      public boolean tryToPasteFrom(String contents)
      Tries to set text from given contents (no effect with invalid or empty contents)
      Parameters:
      contents - The text to interpret as ID(s)
      Returns:
      true if text has been pasted and valid ids have been read