net.xoetrope.swing
Class XComboBox.SystemSelectionManager

java.lang.Object
  extended by net.xoetrope.swing.XComboBox.SystemSelectionManager
All Implemented Interfaces:
javax.swing.JComboBox.KeySelectionManager
Enclosing class:
XComboBox

public class XComboBox.SystemSelectionManager
extends java.lang.Object
implements javax.swing.JComboBox.KeySelectionManager

A search manager for finding list entries as the user types a value


Constructor Summary
XComboBox.SystemSelectionManager(boolean search)
          Setup a key selection manager
 
Method Summary
 java.lang.String getSearchString()
           
 boolean isSearchable()
          Is the current key selectionmanager searchable
 int selectionForKey(char key, javax.swing.ComboBoxModel model)
          Given aKey and the model, returns the row that should become selected.
 void setAlphaNumOnly(boolean s)
           
 void setPause(long p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XComboBox.SystemSelectionManager

public XComboBox.SystemSelectionManager(boolean search)
Setup a key selection manager

Parameters:
search - true to search using keys as they are typed to form a search word, or false to use only the key as the first character of the search - match only the first letter.
Method Detail

selectionForKey

public int selectionForKey(char key,
                           javax.swing.ComboBoxModel model)
Given aKey and the model, returns the row that should become selected. Return -1 if no match was found.

Specified by:
selectionForKey in interface javax.swing.JComboBox.KeySelectionManager
Parameters:
key - a char value, usually indicating a keyboard key that was pressed
model - a ComboBoxModel -- the component's data model, containing the list of selectable items
Returns:
an int equal to the selected row, where 0 is the first item and -1 is none.

isSearchable

public boolean isSearchable()
Is the current key selectionmanager searchable

Returns:
true if a complex search is performed, false if only a single letter match is performed

getSearchString

public java.lang.String getSearchString()

setPause

public void setPause(long p)

setAlphaNumOnly

public void setAlphaNumOnly(boolean s)