|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.autocomplete.CompletionType
public abstract class CompletionType
AutoCompletionType defines the behaviour of the auto-completion, such as: - The key(s) that will open the popup window - When should the documentListener be attached to the text component - etc.. This abstract class contains the common things to all CompleterType implementations.
| Nested Class Summary | |
|---|---|
protected class |
CompletionType.ShowingThread
ShowingThread is an abstract class for threads that show auto-completion popup window after a given delay. |
| Field Summary | |
|---|---|
protected AutocompleterTextComponent |
autocompletedtextComp
|
protected javax.swing.event.DocumentListener |
documentListener
|
protected javax.swing.JList |
list
|
protected javax.swing.JPopupMenu |
popup
|
protected int |
POPUP_DELAY_AFTER_ACCEPTING_LIST_ITEM
|
protected int |
POPUP_DELAY_AT_TEXT_DELETION
|
protected int |
POPUP_DELAY_AT_TEXT_INSERTION
|
protected CompletionType.ShowingThread |
showingThread
|
protected int |
VISIBLE_ROW_COUNT
|
| Constructor Summary | |
|---|---|
CompletionType(AutocompleterTextComponent comp,
Completer completer)
|
|
| Method Summary | |
|---|---|
protected void |
acceptListItem(java.lang.String selected)
The function handles the case when an item of the auto-copmpletion popup was selected. |
protected void |
createNewShowingThread(int delay)
createNewShowingThread shows the auto-completion popup window after a non-blocking delay. |
protected abstract void |
hideAutocompletionPopup()
Hide the auto-completion popup window. |
protected boolean |
isItemSelectedAtPopupList()
Returns true if there is a selected item at the auto-completion popup window. |
protected boolean |
isPopupListShowing()
Returns true if the auto-completion popup window is visible. |
protected void |
selectFirstValue()
Selects the first item in the list. |
protected void |
selectLastValue()
Selects the last item in the list. |
protected void |
selectNextPage()
Selects the item at (VISIBLE_ROW_COUNT - 1) places after the currently selected item in the list. |
protected void |
selectNextPossibleValue()
Selects the next item in the list. |
protected void |
selectPreviousPage()
Selects the item at (VISIBLE_ROW_COUNT - 1) places before the currently selected item in the list. |
protected void |
selectPreviousPossibleValue()
Selects the previous item in the list. |
protected abstract void |
startNewShowingThread(int delay)
Start a new thread that implement ShowingThread with the given delay. |
protected boolean |
updateListData(javax.swing.JList list)
update auto-completion popup's list model depending on the data in text component. |
protected void |
updateTextComponent(java.lang.String selected)
user has selected some item from the auto-completion popup list, update text component accordingly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AutocompleterTextComponent autocompletedtextComp
protected javax.swing.event.DocumentListener documentListener
protected javax.swing.JList list
protected javax.swing.JPopupMenu popup
protected CompletionType.ShowingThread showingThread
protected final int VISIBLE_ROW_COUNT
protected final int POPUP_DELAY_AT_TEXT_INSERTION
protected final int POPUP_DELAY_AT_TEXT_DELETION
protected final int POPUP_DELAY_AFTER_ACCEPTING_LIST_ITEM
| Constructor Detail |
|---|
public CompletionType(AutocompleterTextComponent comp,
Completer completer)
| Method Detail |
|---|
protected abstract void startNewShowingThread(int delay)
protected abstract void hideAutocompletionPopup()
protected boolean updateListData(javax.swing.JList list)
list - - Auto-completion popup's list.
protected void updateTextComponent(java.lang.String selected)
selected - - The selected item from the auto-completion popup's list.protected void createNewShowingThread(int delay)
delay - - The requested delay (in miliseconds) until the popup appear.protected void acceptListItem(java.lang.String selected)
protected boolean isPopupListShowing()
protected boolean isItemSelectedAtPopupList()
protected void selectFirstValue()
protected void selectLastValue()
protected void selectNextPage()
protected void selectPreviousPage()
protected void selectNextPossibleValue()
protected void selectPreviousPossibleValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard