Class AutoCompEvent
- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- org.openstreetmap.josm.gui.tagging.ac.AutoCompEvent
-
- All Implemented Interfaces:
Serializable
public class AutoCompEvent extends AWTEvent
This event is generated by an AutoCompTextField when an autocomplete occured.- Since:
- 18221
- See Also:
AutoCompTextField
,AutoCompListener
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUTOCOMP_BEFORE
This event id indicates that an autocomp is about to start.static int
AUTOCOMP_DONE
This event id indicates that an autocomp completed.static int
AUTOCOMP_FIRST
The first number in the range of ids used for autoComp events.static int
AUTOCOMP_LAST
The last number in the range of ids used for autoComp events.private Object
item
the selected autocomplete itemprivate static long
serialVersionUID
-
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description AutoCompEvent(Object source, int id, Object item)
Constructs aAutoCompEvent
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getItem()
Returns the item selected for autocompletion.String
paramString()
Returns a parameter string identifying this text event.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
AUTOCOMP_FIRST
public static final int AUTOCOMP_FIRST
The first number in the range of ids used for autoComp events.- See Also:
- Constant Field Values
-
AUTOCOMP_LAST
public static final int AUTOCOMP_LAST
The last number in the range of ids used for autoComp events.- See Also:
- Constant Field Values
-
AUTOCOMP_BEFORE
public static final int AUTOCOMP_BEFORE
This event id indicates that an autocomp is about to start.- See Also:
- Constant Field Values
-
AUTOCOMP_DONE
public static final int AUTOCOMP_DONE
This event id indicates that an autocomp completed.- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AutoCompEvent
public AutoCompEvent(Object source, int id, Object item)
Constructs aAutoCompEvent
object.This method throws an
IllegalArgumentException
ifsource
isnull
.- Parameters:
source
- The (AutoCompTextField
) object that originated the eventid
- An integer that identifies the event type. For information on allowable values, see the class description forAutoCompEvent
item
- The item selected for autocompletion.- Throws:
IllegalArgumentException
- ifsource
is null- See Also:
EventObject.getSource()
,AWTEvent.getID()
-
-
Method Detail
-
getItem
public Object getItem()
Returns the item selected for autocompletion.- Returns:
- the item selected for autocompletion
-
paramString
public String paramString()
Returns a parameter string identifying this text event. This method is useful for event-logging and for debugging.- Overrides:
paramString
in classAWTEvent
- Returns:
- a string identifying the event and its attributes
-
-