public class CompletionPanel extends Object
| Modifier and Type | Field and Description |
|---|---|
static ImageIcon |
classIcon |
protected JavaEditor |
editor |
static ImageIcon |
fieldIcon |
protected static int |
KEYBOARD_COMPLETION |
static ImageIcon |
localVarIcon |
static ImageIcon |
methodIcon |
protected static int |
MOUSE_COMPLETION |
| Constructor and Description |
|---|
CompletionPanel(JEditTextArea textarea,
int position,
String subWord,
DefaultListModel<CompletionCandidate> items,
Point location,
JavaEditor editor)
Triggers the completion popup
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
insertSelection(int completionSource)
Inserts the CompletionCandidate chosen from the suggestion list
|
boolean |
isVisible() |
protected void |
moveDown()
When down arrow key is pressed, moves the highlighted selection down in the list
|
protected void |
moveUp()
When up arrow key is pressed, moves the highlighted selection up in the list
|
void |
setInvisible() |
protected JavaEditor editor
protected static final int MOUSE_COMPLETION
protected static final int KEYBOARD_COMPLETION
public static ImageIcon classIcon
public static ImageIcon fieldIcon
public static ImageIcon methodIcon
public static ImageIcon localVarIcon
public CompletionPanel(JEditTextArea textarea, int position, String subWord, DefaultListModel<CompletionCandidate> items, Point location, JavaEditor editor)
textarea - position - - insertion position(caret pos)subWord - - Partial word which triggered the code completion and which needs to be completeditems - - completion candidateslocation - - Point location where popup list is to be displayeddedit - public boolean isVisible()
public void setInvisible()
protected boolean insertSelection(int completionSource)
completionSource - - whether being completed via keypress or mouse click.protected void moveUp()
protected void moveDown()
Copyright © 2001–2017 Processing Foundation. All rights reserved.