|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.PingOO.DLAI.lib.PWidget.ComboBoxEditorAuto
An editor for a combo box with auto-research feature. This will be used with the PComboBox (localized resource capable combox for PingOO).
The text zone automatically suggests to complete the word typed by the user, with word beginning by the same letters and which is inclued in the combobox.
ComboBoxEditor,
KeyListener| Field Summary | |
protected javax.swing.JComboBox |
combo
The combox associated with this editor. |
protected javax.swing.JTextField |
editor
The text zone for input characters. |
| Constructor Summary | |
ComboBoxEditorAuto(javax.swing.JComboBox combo)
Creates a new editor associated with a combobox. |
|
| Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds an ActionListener. |
protected java.lang.String |
findItemStartsWith(java.lang.String sBegin)
Research in the combo a word starting with the provided prefix. |
protected java.lang.String |
findNextItemStartsWith(java.lang.String sBegin,
java.lang.String sCur)
Research form the combo a word beginning with a prefix but which is different from the reference word. |
java.awt.Component |
getEditorComponent()
Returns the component that should be added to the tree hierarchy for this editor. |
java.lang.Object |
getItem()
Returns the edited item. |
void |
keyPressed(java.awt.event.KeyEvent event)
Invoked when a key has been pressed. |
void |
keyReleased(java.awt.event.KeyEvent event)
Invoked when a key has been released. |
void |
keyTyped(java.awt.event.KeyEvent event)
Invoked when a key has been typed. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Remove an ActionListener. |
void |
selectAll()
Asks the editor to start editing and to select everything. |
void |
setItem(java.lang.Object obj)
Set the item that should be edited. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected javax.swing.JTextField editor
protected javax.swing.JComboBox combo
| Constructor Detail |
public ComboBoxEditorAuto(javax.swing.JComboBox combo)
combo - The combox to be associated with this editor.| Method Detail |
public java.awt.Component getEditorComponent()
public void setItem(java.lang.Object obj)
public java.lang.Object getItem()
public void selectAll()
public void addActionListener(java.awt.event.ActionListener listener)
listener - The listener to be added.public void removeActionListener(java.awt.event.ActionListener listener)
listener - The listener to be removed.public void keyTyped(java.awt.event.KeyEvent event)
event - The key event.public void keyPressed(java.awt.event.KeyEvent event)
event - The key event.public void keyReleased(java.awt.event.KeyEvent event)
event - The key event.protected java.lang.String findItemStartsWith(java.lang.String sBegin)
sBegin - Thre prefix to research.
protected java.lang.String findNextItemStartsWith(java.lang.String sBegin,
java.lang.String sCur)
sBegin - The prefix to research.sCur - The reference word.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||