|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.gjt.sp.jedit.textarea.TextArea
org.gjt.sp.jedit.textarea.JEditTextArea
public class JEditTextArea
jEdit's text component.
Unlike most other text editors, the selection API permits selection and
concurrent manipulation of multiple, non-contiguous regions of text.
Methods in this class that deal with selecting text rely upon classes derived
the Selection
class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_FOLD_PAINTER_SERVICE
|
static java.lang.String |
FOLD_PAINTER_PROPERTY
Fold painter service. |
static java.lang.String |
FOLD_PAINTER_SERVICE
|
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 |
---|
accessibleContext, 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 |
---|
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 | |
---|---|
JEditTextArea(View view)
Creates a new JEditTextArea. |
Method Summary | |
---|---|
void |
addExplicitFold()
Surrounds the selection with explicit fold markers. |
void |
createPopupMenu(java.awt.event.MouseEvent evt)
Creates the popup menu. |
void |
dispose()
Plugins and macros should not call this method. |
protected static void |
doWordCount(View view,
java.lang.String text)
|
void |
end(boolean select)
An override to record the acutual action taken for end(). |
void |
formatParagraph()
Formats the paragraph containing the caret. |
FoldPainter |
getFoldPainter()
|
static java.lang.String |
getFoldPainterName()
|
View |
getView()
Returns this text area's view. |
void |
goToBufferEnd(boolean select)
Moves the caret to the end of the buffer. |
void |
goToBufferStart(boolean select)
Moves the caret to the beginning of the buffer. |
void |
goToMatchingBracket()
Moves the caret to the bracket matching the one before the caret. |
void |
handlePopupTrigger(java.awt.event.MouseEvent evt)
Do the same thing as right-clicking on the text area. |
void |
handlePropertiesChanged(PropertiesChanged msg)
|
void |
home(boolean select)
An override to record the acutual action taken for home(). |
int |
replaceSelection(java.lang.String selectedText)
Set the selection, but does not deactivate it, and does not move the caret. |
void |
showGoToLineDialog()
Displays the 'go to line' dialog box, and moves the caret to the specified line number. |
void |
showPopupMenu()
Shows the popup menu below the current caret position. |
void |
showWordCountDialog()
Displays the 'word count' dialog box. |
void |
smartEnd(boolean select)
An override to record the acutual action taken for smartHome(). |
void |
smartHome(boolean select)
An override to record the acutual action taken for smartHome(). |
void |
userInput(char ch)
Handles the insertion of the specified character. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, updateUI |
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, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FOLD_PAINTER_PROPERTY
public static final java.lang.String FOLD_PAINTER_SERVICE
public static final java.lang.String DEFAULT_FOLD_PAINTER_SERVICE
Constructor Detail |
---|
public JEditTextArea(View view)
Method Detail |
---|
public void dispose()
TextArea
dispose
in class TextArea
public FoldPainter getFoldPainter()
getFoldPainter
in class TextArea
public void home(boolean select)
home
in class TextArea
select
- true if we also want to select from the cursorpublic void end(boolean select)
end
in class TextArea
select
- true if we also want to select from the cursorpublic void smartHome(boolean select)
smartHome
in class TextArea
select
- true if you want to extend selectionpublic void smartEnd(boolean select)
smartEnd
in class TextArea
select
- true if you want to extend selectionpublic void goToBufferEnd(boolean select)
TextArea
goToBufferEnd
in class TextArea
select
- true if you want to extend selectionpublic void goToMatchingBracket()
goToMatchingBracket
in class TextArea
public void goToBufferStart(boolean select)
TextArea
goToBufferStart
in class TextArea
select
- true if you want to extend selectionpublic int replaceSelection(java.lang.String selectedText)
TextArea
TextArea.setSelectedText(String)
instead.
replaceSelection
in class TextArea
selectedText
- The new selection
public void showGoToLineDialog()
public void userInput(char ch)
userInput
in class TextArea
ch
- The characterTextArea.setSelectedText(String)
,
TextArea.isOverwriteEnabled()
public void addExplicitFold()
addExplicitFold
in class TextArea
public void formatParagraph()
formatParagraph
in class TextArea
protected static void doWordCount(View view, java.lang.String text)
public void showWordCountDialog()
public View getView()
public static java.lang.String getFoldPainterName()
public void handlePopupTrigger(java.awt.event.MouseEvent evt)
handlePopupTrigger
in class TextArea
public void createPopupMenu(java.awt.event.MouseEvent evt)
createPopupMenu
in class TextArea
public void showPopupMenu()
showPopupMenu
in class TextArea
public void handlePropertiesChanged(PropertiesChanged msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |