|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.ui.Field
|
+--net.rim.device.api.ui.component.ListField
|
+--net.rim.device.api.ui.component.KeywordFilterField
Consists of a single keyword input field and a list of selectable elements. The elements are filtered
when keywords are entered into the input field. An example of this can be found in the Address Book
application. The KeywordFilterField itself is a ListField and can be added to any
container for layout purposes. The contents within this list represent the keyword filter results.
The keyword input field can be access via getKeywordField or overridden with
a custom TextField via setKeywordField. This field currently only supports
prefix keyword filtering.
| Field Summary |
| Fields inherited from class net.rim.device.api.ui.component.ListField |
MULTI_SELECT, NO_ALTED_PAGE_UP_DOWN, NON_CONTIGUOUS_SELECT, ROW_HEIGHT_FONT |
| Fields inherited from class net.rim.device.api.ui.Field |
ACTION_INVOKE, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH |
| Fields inherited from interface net.rim.device.api.ui.FieldChangeListener |
PROGRAMMATIC |
| Constructor Summary | ||
KeywordFilterField()
Creates a new KeywordFilterField. |
||
| Method Summary | ||
Object |
getElementAt(int index)
Retrieves the element at the specified index in the list. |
|
String |
getKeyword()
Retrieves the entered keyword. |
|
TextField |
getKeywordField()
Retrieves the keyword input field. |
|
String |
getLabel()
Retrieves the label preceding the keyword input area. |
|
ReadableList |
getResultList()
Retrieves the list of elements that are currently not filtered out, i.e. search results. |
|
int |
getResultListSize()
Retrieves the size of the list of elements that are currently not filtered out. |
|
Object |
getSelectedElement()
Retrieves the selected element in the results list. |
|
ReadableList |
getSourceList()
Retrieves the source collection list. |
|
void |
setKeyword(String keyword)
Sets a keyword in the keyword input field programmatically. |
|
void |
setKeywordField(TextField keywordField)
Sets a custom keyword input field, which overrides the default field. |
|
void |
setLabel(String label)
Sets the keyword input field's label. |
|
void |
setSourceList(ReadableList list,
KeywordProvider helper)
Sets read-only source elements in the collection list from which to search. |
|
void |
updateList()
Updates the collection of elements to display in the list field. |
|
| Methods inherited from class net.rim.device.api.ui.component.ListField |
delete, drawFocus, getCallback, getEmptyString, getEmptyStringStyle, getFocusRect, getPreferredWidth, getRowHeight, getSelectedIndex, getSelection, getSize, indexOfList, insert, invalidate, invalidateRange, isEmpty, layout, moveFocus, moveFocus, onFocus, paint, setCallback, setEmptyString, setEmptyString, setRowHeight, setSearchable, setSelectedIndex, setSize, setSize |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public KeywordFilterField()
setList, setLabel (optional), setCallback (optional),
setKeywordField (optional) to initialize field.| Method Detail |
public Object getElementAt(int index)
index - Location of within the list.public String getKeyword()
public TextField getKeywordField()
setKeywordInputField.public String getLabel()
setLabel
to change default label.public ReadableList getResultList()
ReadableList containing the keyword
filtered elements shown in the list; if this KeywordFilterField is not set using setList,
returns null.public int getResultListSize()
setList, returns 0.public Object getSelectedElement()
public ReadableList getSourceList()
setList to set a list of elements in the field.public void setKeyword(String keyword)
FieldChangeListener
should be set via setChangeListener. A null keyword is equivalent
to an empty string and will reset the search.keyword - New keyword to search.public void setKeywordField(TextField keywordField)
FieldChangeListener
for the custom keyword input field via Field#setChangeListener in order for searches to occur.keywordField - Custom keyword input field. Resets to default text input field if null.public void setLabel(String label)
label - New label for the input field. Ignored if null.public void setSourceList(ReadableList list, KeywordProvider helper)
list - New source collection list for the field.helper - New keyword provider helper.IllegalArgumentException - In case parameters are set to null.public void updateList()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.