java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.gjt.sp.jedit.textarea.TextArea
org.gjt.sp.jedit.textarea.StandaloneTextArea
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
jEdit's standalone text component.
Use this class to embed a jEdit TextArea into other applications.
Example:
class MyTextArea extends StandaloneTextArea
{
static final Properties props = new Properties();
static IPropertyManager propertyManager;
static
{
props = new Properties();
load(props);
propertyManager = new IPropertyManager() {
public String getProperty() {
return props.getProperty();
}
}
}
public MyTextArea()
{
super(propertyManager);
}
}
See jedit.props for properties that can be set.- Version:
- $Id: StandaloneTextArea.java 25104 2020-03-31 22:25:46Z kpouer $
- Author:
- Slava Pestov, John Gellene (API documentation), Matthieu Casanova
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The actionSet for standalone textArea.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class org.gjt.sp.jedit.textarea.TextArea
buffer, caret, caretLine, ELECTRIC_SCROLL, inputHandlerProvider, multi, NO_SCROLL, NORMAL_SCROLL, painter, popup
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorDescriptionStandaloneTextArea
(IPropertyManager propertyManager) Creates a new StandaloneTextArea. -
Method Summary
Modifier and TypeMethodDescriptionstatic StandaloneTextArea
Create a standalone TextArea.getProperty
(String name) static void
void
Reinitializes the textarea by reading the properties from the property managerMethods inherited from class org.gjt.sp.jedit.textarea.TextArea
addActionSet, addBottomLeftComponent, addBottomRightComponent, addCaretListener, addExplicitFold, addExplicitFold, addLeftOfScrollBar, addNotify, addScrollListener, addStatusListener, addStructureMatcher, addTopComponent, addTopLeftComponent, addTopRightComponent, addToSelection, addToSelection, backspace, backspaceWord, backspaceWord, backspaceWord, blinkCaret, caretAutoScroll, centerCaret, collapseFold, collapseFold, createPopupMenu, delete, deleteLine, deleteParagraph, deleteToEndOfLine, deleteToStartOfLine, deleteWord, deleteWord, dispose, doWordWrap, end, expandFold, extendSelection, extendSelection, formatParagraph, getActionContext, getBuffer, getBufferLength, getCaretLine, getCaretPosition, getDisplayManager, getElectricScroll, getFirstLine, getFirstPhysicalLine, getFocusCycleRoot, getFocusTraversalKeysEnabled, getFoldPainter, getGutter, getHorizontalOffset, getInputHandler, getInputMethodRequests, getJoinNonWordChars, getLastPhysicalLine, getLastScreenLine, getLineCount, getLineEndOffset, getLineLength, getLineOfOffset, getLineStartOffset, getLineText, getLineText, getMagicCaretPosition, getMarkPosition, getPainter, getPhysicalLineOfScreenLine, getRightClickPopup, getScreenLineEndOffset, getScreenLineOfOffset, getScreenLineStartOffset, getSelectedLines, getSelectedText, getSelectedText, getSelectedText, getSelection, getSelection, getSelectionAtOffset, getSelectionCount, getSelectionIterator, getStructureMatch, getTabExpander, getText, getText, getText, getVisibleLines, getVisibleLineSegment, getVisibleLineText, getVisibleLineText, goToBufferEnd, goToBufferStart, goToEndOfCode, goToEndOfLine, goToEndOfWhiteSpace, goToFirstVisibleLine, goToLastVisibleLine, goToMatchingBracket, goToNextBracket, goToNextCharacter, goToNextFold, goToNextLine, goToNextPage, goToNextParagraph, goToNextWord, goToNextWord, goToParentFold, goToPrevBracket, goToPrevCharacter, goToPrevFold, goToPrevLine, goToPrevPage, goToPrevParagraph, goToPrevWord, goToPrevWord, goToPrevWord, goToStartOfLine, goToStartOfWhiteSpace, handlePopupTrigger, home, indentSelectedLines, initInputHandler, insert, insertEnterAndIndent, insertTabAndIndent, invalidateLine, invalidateLineRange, invalidateScreenLineRange, invertSelection, isCaretBlinkEnabled, isCaretVisible, isCtrlForRectangularSelection, isDragEnabled, isEditable, isMultipleSelectionEnabled, isOverwriteEnabled, isQuickCopyEnabled, isRectangularSelectionEnabled, isRightClickPopupEnabled, isStructureHighlightVisible, joinLines, lineComment, lineInStructureScope, moveCaretPosition, moveCaretPosition, moveCaretPosition, narrowToFold, narrowToSelection, offsetToXY, offsetToXY, offsetToXY, processKeyEvent, rangeComment, removeCaretListener, removeFromSelection, removeFromSelection, removeLeftOfScrollBar, removeNotify, removeScrollListener, removeStatusListener, removeStructureMatcher, removeTopComponent, removeTrailingWhiteSpace, replaceSelection0, resizeSelection, scrollAndCenterCaret, scrollDownLine, scrollDownPage, scrollTo, scrollTo, scrollToCaret, scrollUpLine, scrollUpPage, selectAll, selectBlock, selectFold, selectFold, selectLine, selectNone, selectParagraph, selectToMatchingBracket, selectToMatchingBracket, selectWord, setBuffer, setCaretBlinkEnabled, setCaretPosition, setCaretPosition, setCtrlForRectangularSelection, setDragEnabled, setElectricScroll, setFirstLine, setFirstPhysicalLine, setFirstPhysicalLine, setHorizontalOffset, setJoinNonWordChars, setMagicCaretPosition, setMouseHandler, setMultipleSelectionEnabled, setOverwriteEnabled, setQuickCopyEnabled, setRectangularSelectionEnabled, setRightClickPopup, setRightClickPopupEnabled, setSelectedText, setSelectedText, setSelectedText, setSelection, setSelection, setText, setTransferHandler, shiftIndentLeft, shiftIndentRight, showPopupMenu, showPopupMenu, smartEnd, smartHome, spacesToTabs, tabsToSpaces, toggleMultipleSelectionEnabled, toggleOverwriteEnabled, toggleRectangularSelectionEnabled, toLowerCase, toString, toUpperCase, turnOnElasticTabstops, userInput, userInputTab, xToScreenLineOffset, xyToOffset, xyToOffset
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, 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, processKeyBinding, 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, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, 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, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, 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, 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, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
StandaloneTextArea
Creates a new StandaloneTextArea. A reference to the propertyManager is saved and used to read the properties whenpropertiesChanged()
is called.- Parameters:
propertyManager
- the property manager that contains both shortcut bindings and UI information
-
-
Method Details
-
getProperty
-
propertiesChanged
public void propertiesChanged()Reinitializes the textarea by reading the properties from the property manager- Overrides:
propertiesChanged
in classTextArea
-
createTextArea
Create a standalone TextArea. If you want to use it in jEdit, please useJEditEmbeddedTextArea()
- Returns:
- a textarea
- Since:
- 4.3pre13
-
main
-