|
|||||||||
| 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
mars.venus.editors.jeditsyntax.JEditTextArea
mars.venus.editors.jeditsyntax.JEditBasedTextArea
public class JEditBasedTextArea
Adaptor subclass for JEditTextArea Provides those methods required by the MARSTextEditingArea interface that are not defined by JEditTextArea. This permits JEditTextArea to be used within MARS largely without modification. DPS 4-20-2010
| 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 |
|---|
| Fields inherited from class mars.venus.editors.jeditsyntax.JEditTextArea |
|---|
biasLeft, blink, BOTTOM, bracketLine, bracketPosition, caretBlinkRate, caretBlinks, caretEvent, caretTimer, caretVisible, CENTER, document, documentHandler, editable, electricScroll, firstLine, focusedComponent, horizontal, horizontalOffset, inputHandler, LEFT_OF_SCROLLBAR, lineSegment, listenerList, magicCaret, overwrite, painter, popup, rectSelect, RIGHT, scrollBarsInitialized, selectionEnd, selectionEndLine, selectionStart, selectionStartLine, unredoing, vertical, visibleLines |
| 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 mars.venus.editors.MARSTextEditingArea |
|---|
TEXT_FOUND, TEXT_NOT_FOUND, TEXT_REPLACED_FOUND_NEXT, TEXT_REPLACED_NOT_FOUND_NEXT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JEditBasedTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
|
|
| Method Summary | |
|---|---|
void |
caretUpdate(javax.swing.event.CaretEvent e)
Display caret position on the edit pane. |
void |
discardAllUndoableEdits()
Get rid of any accumulated undoable edits. |
int |
doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string. |
int |
doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search. |
int |
doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search. |
java.awt.Font |
getFont()
|
java.awt.Component |
getOuterComponent()
|
javax.swing.undo.UndoManager |
getUndoManager()
Returns the undo manager for this editing area |
int |
nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
Returns next posn of word in text - forward search. |
void |
redo()
Redo previous edit |
void |
replaceSelection(java.lang.String replacementText)
Same as setSelectedText but named for compatibility with JTextComponent method replaceSelection. |
void |
setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds. |
void |
setFont(java.awt.Font f)
|
void |
setLineHighlightEnabled(boolean highlight)
Use for highlighting the line currently being edited. |
void |
setSelectionVisible(boolean vis)
|
void |
setSourceCode(java.lang.String s,
boolean editable)
|
void |
setTabSize(int chars)
Set the number of characters a tab will expand to. |
void |
undo()
Undo previous edit |
void |
updateSyntaxStyles()
Update the syntax style table, which is obtained from SyntaxUtilities. |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, 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, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, 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, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, 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, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface mars.venus.editors.MARSTextEditingArea |
|---|
copy, cut, getCaretPosition, getDocument, getFontMetrics, getSelectedText, getSelectionEnd, getSelectionStart, getText, grabFocus, paste, requestFocusInWindow, revalidate, select, selectAll, setBackground, setCaretPosition, setCaretVisible, setEditable, setEnabled, setSelectionEnd, setSelectionStart, setText |
| Constructor Detail |
|---|
public JEditBasedTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
| Method Detail |
|---|
public void setFont(java.awt.Font f)
setFont in interface MARSTextEditingAreasetFont in class javax.swing.JComponentpublic java.awt.Font getFont()
getFont in interface java.awt.MenuContainergetFont in interface MARSTextEditingAreagetFont in class java.awt.Componentpublic void setLineHighlightEnabled(boolean highlight)
setLineHighlightEnabled in interface MARSTextEditingAreahighlight - true to enable line highlighting, false to disable.public void setCaretBlinkRate(int rate)
setCaretBlinkRate in interface MARSTextEditingArearate - blinking rate in millisecondspublic void setTabSize(int chars)
setTabSize in interface MARSTextEditingAreachars - number of characterspublic void updateSyntaxStyles()
updateSyntaxStyles in interface MARSTextEditingAreapublic java.awt.Component getOuterComponent()
getOuterComponent in interface MARSTextEditingAreapublic void discardAllUndoableEdits()
discardAllUndoableEdits in interface MARSTextEditingAreapublic void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate in interface javax.swing.event.CaretListenere - A CaretEventpublic void replaceSelection(java.lang.String replacementText)
replaceSelection in interface MARSTextEditingAreareplacementText - The replacement text for the selectionpublic void setSelectionVisible(boolean vis)
setSelectionVisible in interface MARSTextEditingArea
public void setSourceCode(java.lang.String s,
boolean editable)
setSourceCode in interface MARSTextEditingAreapublic javax.swing.undo.UndoManager getUndoManager()
getUndoManager in interface MARSTextEditingAreapublic void undo()
undo in interface MARSTextEditingAreapublic void redo()
redo in interface MARSTextEditingArea
public int doFindText(java.lang.String find,
boolean caseSensitive)
doFindText in interface MARSTextEditingAreafind - the text to locate in the stringcaseSensitive - true if search is to be case-sensitive, false otherwise
public int nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
input - the string to searchfind - the string to findstart - the character position to start the searchcaseSensitive - true for case sensitive. false to ignore case
public int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
doReplace in interface MARSTextEditingAreafind - the text to locate in the stringreplace - the text to replace the find text with - if the find text existscaseSensitive - true for case sensitive. false to ignore case
public int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
doReplaceAll in interface MARSTextEditingAreafind - the text to locate in the stringreplace - the text to replace the find text with - if the find text existscaseSensitive - true for case sensitive. false to ignore case
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||