java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
de.grogra.pf.ui.swing.AutoCompletableTextEditor
- All Implemented Interfaces:
- AutoCompletableTextArea,- ImageObserver,- MenuContainer,- Serializable,- Accessible,- Scrollable
An extended text area used by an AutoCompletable panel
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class javax.swing.JTextAreaJTextArea.AccessibleJTextAreaNested classes/interfaces inherited from class javax.swing.text.JTextComponentJTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBindingNested classes/interfaces inherited from class javax.swing.JComponentJComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.ContainerContainer.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.ComponentComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
- 
Field SummaryFieldsFields inherited from class javax.swing.text.JTextComponentDEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEYFields inherited from class javax.swing.JComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.ComponentaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserverABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTextAreaListener(TextAreaListener listener) createPosition(int pos) Create the position at the position lenght.getAlreadyEnteredText(CompletionProvider provider) Returns the text just before the current caret position that could be the start of something auto-completable.getBeginLineText(int line) Return the Text contains between the begining of the given line and the caret position.intReturn the buffer size of the text areaintReturn the line of the caret.voidPush the text at position start of given length in the given segmentGet the XY position of the caret in pixelsvoidInitializes this completion provider.voidmoveCaretPositionFromXY(int x, int y) voidremoveTextAreaListener(TextAreaListener listener) voidselectText(int start, int end) Select the text between the two position.Methods inherited from class javax.swing.JTextAreaappend, createDefaultModel, getAccessibleContext, getColumns, getColumnWidth, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRowHeight, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, paramString, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWordMethods inherited from class javax.swing.text.JTextComponentaddCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, modelToView2D, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, viewToModel2D, writeMethods inherited from class javax.swing.JComponentaddAncestorListener, addNotify, 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, 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, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Containeradd, add, add, add, add, addContainerListener, addImpl, 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, validateTreeMethods inherited from class java.awt.Componentaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, 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, isFocusOwner, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.ui.autocomplete.AutoCompletableTextAreaaddCaretListener, getActionMap, getCaretPosition, getComponentOrientation, getHighlighter, getInputMap, getSelectionEnd, getSelectionStart, getText, moveCaretPosition, removeCaretListener, replaceSelection, setCaretPosition
- 
Field Details- 
EMPTY_STRING- See Also:
 
- 
seg
 
- 
- 
Constructor Details- 
AutoCompletableTextEditor
 
- 
- 
Method Details- 
getAlreadyEnteredTextDescription copied from interface:AutoCompletableTextAreaReturns the text just before the current caret position that could be the start of something auto-completable.- Specified by:
- getAlreadyEnteredTextin interface- AutoCompletableTextArea
 
- 
initCompletionProviderpublic void initCompletionProvider()Description copied from interface:AutoCompletableTextAreaInitializes this completion provider.- Specified by:
- initCompletionProviderin interface- AutoCompletableTextArea
 
- 
selectTextpublic void selectText(int start, int end) Description copied from interface:AutoCompletableTextAreaSelect the text between the two position.- Specified by:
- selectTextin interface- AutoCompletableTextArea
 
- 
moveCaretPositionFromXYpublic void moveCaretPositionFromXY(int x, int y) - Specified by:
- moveCaretPositionFromXYin interface- AutoCompletableTextArea
 
- 
getLineOfCaretpublic int getLineOfCaret()Description copied from interface:AutoCompletableTextAreaReturn the line of the caret.- Specified by:
- getLineOfCaretin interface- AutoCompletableTextArea
 
- 
getTextDescription copied from interface:AutoCompletableTextAreaPush the text at position start of given length in the given segment- Specified by:
- getTextin interface- AutoCompletableTextArea
- Throws:
- BadLocationException
 
- 
getDocumentLengthpublic int getDocumentLength()Description copied from interface:AutoCompletableTextAreaReturn the buffer size of the text area- Specified by:
- getDocumentLengthin interface- AutoCompletableTextArea
 
- 
createPositionDescription copied from interface:AutoCompletableTextAreaCreate the position at the position lenght. If length is bigger than the buffer size it will throw an error.- Specified by:
- createPositionin interface- AutoCompletableTextArea
- Throws:
- BadLocationException
 
- 
getXYCaretPositionDescription copied from interface:AutoCompletableTextAreaGet the XY position of the caret in pixels- Specified by:
- getXYCaretPositionin interface- AutoCompletableTextArea
 
- 
getBeginLineTextDescription copied from interface:AutoCompletableTextAreaReturn the Text contains between the begining of the given line and the caret position. It suppose that the caret position is after the start of the line- Specified by:
- getBeginLineTextin interface- AutoCompletableTextArea
- Returns:
 
- 
addTextAreaListener- Specified by:
- addTextAreaListenerin interface- AutoCompletableTextArea
 
- 
removeTextAreaListener- Specified by:
- removeTextAreaListenerin interface- AutoCompletableTextArea
 
 
-