public class TextFieldWithAutoCompletion<T> extends TextFieldWithCompletion
TextFieldWithCompletion
in 2 aspects:
1. only accepts instances of TextFieldWithAutoCompletionListProvider
(and not other implementations of TextCompletionProvider
);
2. allows to change completion variants setVariants(Collection)
.
Completion is implemented via TextCompletionContributor
.Modifier and Type | Class and Description |
---|---|
static class |
TextFieldWithAutoCompletion.StringsCompletionProvider |
LanguageTextField.DocumentCreator, LanguageTextField.SimpleDocumentCreator
Wrapper.North
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
java.awt.Container.AccessibleAWTContainer
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
NullableComponent.Check
Modifier and Type | Field and Description |
---|---|
static TextFieldWithAutoCompletionListProvider |
EMPTY_COMPLETION |
SUPPLEMENTARY_KEY
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
TextFieldWithAutoCompletion(Project project,
TextFieldWithAutoCompletionListProvider<T> provider,
boolean showCompletionHint,
java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
static TextFieldWithAutoCompletion<java.lang.String> |
create(Project project,
java.util.Collection<java.lang.String> items,
boolean showCompletionHint,
java.lang.String text) |
static TextFieldWithAutoCompletion<java.lang.String> |
create(Project project,
java.util.Collection<java.lang.String> items,
javax.swing.Icon icon,
boolean showCompletionHint,
java.lang.String text) |
static void |
installCompletion(Document document,
Project project,
TextFieldWithAutoCompletionListProvider provider,
boolean autoPopup) |
<T> void |
installProvider(TextFieldWithAutoCompletionListProvider<T> provider) |
void |
setVariants(java.util.Collection<T> variants) |
createEditor
createDocument
addDocumentListener, addFocusListener, addImpl, addMouseListener, addNotify, addSettingsProvider, beforeDocumentChange, createDocument, documentChanged, ensureWillComputePreferredSize, focusGained, focusLost, getBackground, getCaretModel, getComponent, getData, getDocument, getEditor, getFileType, getFocusTarget, getMinimumSize, getNextFocusableComponent, getPreferredSize, getProject, getText, isFocusOwner, isOneLineMode, isViewer, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, processKeyBinding, removeDocumentListener, removeFocusListener, removeMouseListener, removeNotify, removeSelection, removeSettingsProvider, requestFocus, requestFocusInWindow, selectAll, setAsRendererWithSelection, setBackground, setCaretPosition, setDocument, setEnabled, setFileType, setFont, setFontInheritedFromLAF, setNewDocumentAndFileType, setNextFocusableComponent, setOneLineMode, setPlaceholder, setPreferredWidth, setSupplementary, setText, setupBorder, setupTextFieldEditor, setViewerEnabled, shouldHaveBorder, updateBorder
setOpaque, setTransparent
getTargetComponent, isNull, requestFocus, requestFocusInternal, setContent, setHorizontalSizeReferent, setVerticalSizeReferent
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
bulkUpdateFinished, bulkUpdateStarting
public static final TextFieldWithAutoCompletionListProvider EMPTY_COMPLETION
public TextFieldWithAutoCompletion(Project project, TextFieldWithAutoCompletionListProvider<T> provider, boolean showCompletionHint, java.lang.String text)
public static TextFieldWithAutoCompletion<java.lang.String> create(Project project, java.util.Collection<java.lang.String> items, boolean showCompletionHint, java.lang.String text)
public static TextFieldWithAutoCompletion<java.lang.String> create(Project project, java.util.Collection<java.lang.String> items, javax.swing.Icon icon, boolean showCompletionHint, java.lang.String text)
public void setVariants(java.util.Collection<T> variants)
public <T> void installProvider(TextFieldWithAutoCompletionListProvider<T> provider)
public static void installCompletion(Document document, Project project, TextFieldWithAutoCompletionListProvider provider, boolean autoPopup)