java.io.Serializable
public class SearchableEvent
extends java.awt.AWTEvent
AWTEvent
that adds support for
SearchableEvent
objects as the event source.Searchable
,
SearchableListener
,
Serialized FormModifier and Type | Field | Description |
---|---|---|
static int |
SEARCHABLE_CHANGE |
To indicate the searching text changes.
|
static int |
SEARCHABLE_END |
To indicate the searching process stopped.
|
static int |
SEARCHABLE_FIRST |
The first number in the range of IDs used for
SearchableEvent . |
static int |
SEARCHABLE_LAST |
The last number in the range of IDs used for
SearchableEvent . |
static int |
SEARCHABLE_MATCH |
To indicate the searching process finds a matching element.
|
static int |
SEARCHABLE_MODEL_CHANGE |
To indicate the search component model is changed.
|
static int |
SEARCHABLE_NOMATCH |
To indicate the searching process doesn't find a matching element.
|
static int |
SEARCHABLE_START |
To indicate the searching process started.
|
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
Constructor | Description |
---|---|
SearchableEvent(Searchable source,
int id) |
Creates a
SearchableEvent . |
SearchableEvent(java.lang.Object source,
int id,
java.lang.String searchingText) |
Creates a
SearchableEvent . |
SearchableEvent(java.lang.Object source,
int id,
java.lang.String searchingText,
java.lang.Object matchingObject,
java.lang.String matchingText) |
|
SearchableEvent(java.lang.Object source,
int id,
java.lang.String searchingText,
java.lang.String oldSearchingText) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
getMatchingObject() |
Gets the object that matches the searching text.
|
java.lang.String |
getMatchingText() |
Gets the text that is converted from the object matching the searching text.
|
java.lang.String |
getOldSearchingText() |
Gets the text that was searched for.
|
Searchable |
getSearchable() |
Returns the originator of the event.
|
java.lang.String |
getSearchingText() |
Gets the text that is being searched for.
|
java.lang.String |
paramString() |
Returns a parameter string identifying this event.
|
public static final int SEARCHABLE_FIRST
SearchableEvent
.public static final int SEARCHABLE_LAST
SearchableEvent
.public static final int SEARCHABLE_START
public static final int SEARCHABLE_END
public static final int SEARCHABLE_MATCH
getSearchingText()
will return
the text that is being searched for. getMatchingObject()
will return the element that matches the searching text.
getMatchingText()
is the text converting from the the matching object.public static final int SEARCHABLE_NOMATCH
getSearchingText()
will return
the text that is being searched for. getMatchingObject()
and getMatchingText()
will be null.public static final int SEARCHABLE_CHANGE
getSearchingText()
will return
the text that is being searched for. getOldSearchingText()
will return the previous searching text.public static final int SEARCHABLE_MODEL_CHANGE
public SearchableEvent(Searchable source, int id)
SearchableEvent
.source
- id
- public SearchableEvent(java.lang.Object source, int id, java.lang.String searchingText)
SearchableEvent
. The searching text is the text that is being searched for.source
- id
- searchingText
- public SearchableEvent(java.lang.Object source, int id, java.lang.String searchingText, java.lang.String oldSearchingText)
public SearchableEvent(java.lang.Object source, int id, java.lang.String searchingText, java.lang.Object matchingObject, java.lang.String matchingText)
public java.lang.String paramString()
paramString
in class java.awt.AWTEvent
public Searchable getSearchable()
Searchable
object that originated the eventpublic java.lang.String getSearchingText()
public java.lang.String getOldSearchingText()
public java.lang.String getMatchingText()
public java.lang.Object getMatchingObject()