public class AutoCompletionMenu extends OverlayObject
| Modifier and Type | Class and Description |
|---|---|
class |
AutoCompletionMenu.ListMouseAdapter |
class |
AutoCompletionMenu.MyKeyAdapter |
| Modifier and Type | Field and Description |
|---|---|
protected AutoCompletionMenuDelegate |
delegate |
protected int |
displayIndex |
protected int |
insertionEndIndex |
protected int |
insertionStartIndex |
protected JList |
list |
protected DefaultListModel |
listModel |
protected int |
maxWordLength |
protected static List<String> |
recentlyUsedWords
Used to store most recently used during autocompletion
the newest should be stored at the front of the list.
|
static int |
visibleMatchingRules |
protected List<String> |
words |
ALIGN_CENTER, ALIGN_CUSTOM, ALIGN_LEFT, content, DEFAULT_HEIGHT, DEFAULT_WIDTH, parentComponent, parentFrame| Constructor and Description |
|---|
AutoCompletionMenu(AutoCompletionMenuDelegate delegate,
JTextComponent textComponent,
XJFrame frame) |
| Modifier and Type | Method and Description |
|---|---|
void |
autoComplete() |
void |
close() |
void |
completePartialWord(String word) |
int |
getPartialWordBeginsAtPosition(int pos) |
JTextComponent |
getTextComponent() |
static boolean |
isCharIdentifier(char c) |
boolean |
isVStyle() |
JComponent |
overlayCreateInterface() |
KeyStroke |
overlayDisplayKeyStroke() |
String |
overlayDisplayKeyStrokeMappingName() |
boolean |
overlayWillDisplay() |
void |
resize() |
void |
selectMostRecentlyUsedWordPosition(String partialWord,
String firstWordInList) |
void |
setDisplayIndex(int index) |
void |
setInsertionEndIndex(int endIndex) |
void |
setInsertionStartIndex(int startIndex) |
void |
setWordLists(List<String> names,
List<String> words) |
void |
updateAutoCompleteList() |
createKeyBindings, display, hide, isOverlayVisibleInParentComponent, isVisible, overlayCustomPosition, overlayDefaultAlignment, overlayDefaultHeight, overlayDefaultWidthprotected AutoCompletionMenuDelegate delegate
protected DefaultListModel listModel
protected JList list
protected static List<String> recentlyUsedWords
protected int maxWordLength
protected int insertionStartIndex
protected int insertionEndIndex
protected int displayIndex
public static int visibleMatchingRules
public AutoCompletionMenu(AutoCompletionMenuDelegate delegate, JTextComponent textComponent, XJFrame frame)
public void close()
close in class OverlayObjectpublic boolean isVStyle()
public JTextComponent getTextComponent()
public JComponent overlayCreateInterface()
overlayCreateInterface in class OverlayObjectpublic boolean overlayWillDisplay()
overlayWillDisplay in class OverlayObjectpublic KeyStroke overlayDisplayKeyStroke()
overlayDisplayKeyStroke in class OverlayObjectpublic String overlayDisplayKeyStrokeMappingName()
overlayDisplayKeyStrokeMappingName in class OverlayObjectpublic void setInsertionStartIndex(int startIndex)
public void setInsertionEndIndex(int endIndex)
public void setDisplayIndex(int index)
public static boolean isCharIdentifier(char c)
public int getPartialWordBeginsAtPosition(int pos)
public void completePartialWord(String word)
public void autoComplete()
public void resize()
resize in class OverlayObjectpublic void selectMostRecentlyUsedWordPosition(String partialWord, String firstWordInList)
public void updateAutoCompleteList()
Copyright © 2013. All rights reserved.