|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--org.gjt.sp.jedit.textarea.JEditTextArea | +--tvouriot.elife.gui.ElifeTextArea
Zone de texte permettant l'édition des fichiers et contenant les fonctions d'ouverture, d'enregistrement et de recherche/remplacement
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class org.gjt.sp.jedit.textarea.JEditTextArea |
biasLeft, blink, BOTTOM, bracketLine, bracketPosition, caretBlinks, caretEvent, caretTimer, caretVisible, CENTER, document, documentHandler, editable, electricScroll, firstLine, focusedComponent, gutter, horizontal, horizontalOffset, inputHandler, LEFT, LEFT_OF_SCROLLBAR, lineSegment, listenerList, magicCaret, overwrite, painter, popup, rectSelect, RIGHT, scrollBarsInitialized, selectionEnd, selectionEndLine, selectionStart, selectionStartLine, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ElifeTextArea()
Constructeur |
Method Summary | |
void |
caretUpdate(javax.swing.event.CaretEvent evt)
|
void |
changeAutoIndentMode()
Active ou désactive le mode auto-indentation |
void |
changedUpdate(javax.swing.event.DocumentEvent documentEvent)
|
void |
changeEOLMarkersPainted()
Affiche ou cache les marqueurs de fin de lignes |
void |
changeGutterPainted()
Affiche ou cache la goutière |
void |
changeSyntax(java.lang.String s)
Change la coloration syntaxique qui sera utilisée |
protected void |
finalize()
Permet de faciliter le travail du ramasse miettes |
boolean |
find(java.lang.String searchStr,
int start,
boolean ignoreCase)
Fonction tirée de l'éditeur Jext (http://www.jext.org) Return the result of a string search. |
java.io.File |
getCurrentFile()
Retourne le fichier courant |
java.lang.String |
getFindPattern()
Renvoie le dernier mot ayant été recherché |
int |
getLength()
Renvoie la taille du fichier courant |
int |
getLineStartOffset(int off)
Renvoie l'offset du début de ligne d'un autre offset |
java.lang.String |
getOpenBrackets()
Retourne les parenthèses ouvrantes d'un bloc de code en fonction du mode de coloration syntaxique |
java.lang.String |
getReplacePattern()
Renvoie la valeur du dernier mot ayant servi pour le remplacement |
java.lang.String |
getSyntax()
Retourne lengthtype de coloration syntaxique |
javax.swing.undo.UndoManager |
getUndo()
Retourne l'objet permettant de rétablir ou d'annuler une action |
void |
initSyntax()
Initialise la coloration syntaxique qui sera utilisée en fonction de l'extension du fichier |
void |
insertUpdate(javax.swing.event.DocumentEvent evt)
|
boolean |
isDirty()
Teste si la zone de texte a été modifié sans être enregistré |
boolean |
isEmpty()
Teste si la zone de texte contient un fichier vide |
boolean |
isNew()
Teste si la zone de texte contient un fichier est nouveau |
void |
open(java.io.File toLoad)
Fonction tirée de l'éditeur Jext (http://www.jext.org) Called to load a new file in the text area. |
void |
removeUpdate(javax.swing.event.DocumentEvent documentEvent)
|
boolean |
replaceAll(java.lang.String searchStr,
java.lang.String replaceStr,
int start,
int end,
boolean ignoreCase)
Fonction tirée de l'éditeur Jext (http://www.jext.org) Return the result of a string replace. |
boolean |
save(java.io.File file)
Enregistre le contenu de la zone de texte dans fichier |
void |
setCurrentFile(java.io.File path)
Modifie le fichier courant |
void |
setDirty(boolean b)
Fonction permettant de définir si la zone de texte a été modifié sans être enregistré |
void |
setDocument(SyntaxDocument document)
Changer le document associé à la zone de texte |
void |
setFindPattern(java.lang.String pattern)
Modifier la valeur du dernier mot ayant été recherché |
void |
setNew(boolean newFlag)
Fonction permettant de definir si la zone de texte contient un fichier nouveau |
void |
setReplacePattern(java.lang.String pattern)
Modifier la valeur du dernier mot ayant servi pour le remplacement |
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
|
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, 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, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ElifeTextArea()
Method Detail |
public void changeEOLMarkersPainted()
public void changeGutterPainted()
public void changeAutoIndentMode()
public void setDocument(SyntaxDocument document)
setDocument
in class JEditTextArea
document
- nouveau documentpublic void setFindPattern(java.lang.String pattern)
pattern
- nouveau motpublic java.lang.String getFindPattern()
public void setReplacePattern(java.lang.String pattern)
pattern
- nouveau motpublic java.lang.String getReplacePattern()
public java.lang.String getOpenBrackets()
public boolean save(java.io.File file)
file
- fichier dans lequel l'enregistrement sera faitpublic void open(java.io.File toLoad) throws javax.swing.text.BadLocationException, java.io.FileNotFoundException, java.io.IOException
toLoad
- fichier à ouvrirpublic void changeSyntax(java.lang.String s)
s
- type de colorationpublic void initSyntax()
public java.io.File getCurrentFile()
public void setCurrentFile(java.io.File path)
path
- nouveau fichierpublic void setNew(boolean newFlag)
newFlag
- booléen permettant de savoir si le fichier est nouveaupublic boolean isNew()
public boolean isEmpty()
public boolean isDirty()
public void setDirty(boolean b)
b
- vrai si la zone de texte a été modifié sans être enregistrépublic java.lang.String getSyntax()
public int getLength()
public void removeUpdate(javax.swing.event.DocumentEvent documentEvent)
removeUpdate
in interface javax.swing.event.DocumentListener
public void insertUpdate(javax.swing.event.DocumentEvent evt)
insertUpdate
in interface javax.swing.event.DocumentListener
public void changedUpdate(javax.swing.event.DocumentEvent documentEvent)
changedUpdate
in interface javax.swing.event.DocumentListener
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
undoableEditHappened
in interface javax.swing.event.UndoableEditListener
public javax.swing.undo.UndoManager getUndo()
public int getLineStartOffset(int off)
getLineStartOffset
in class JEditTextArea
off
- offset dont il faut chercher le début de lignepublic void caretUpdate(javax.swing.event.CaretEvent evt)
caretUpdate
in interface javax.swing.event.CaretListener
public boolean find(java.lang.String searchStr, int start, boolean ignoreCase)
searchStr
- The string to be foundstart
- The search's start offsetignoreCase
- Set to true, we'll ignore the text casesearchStr
has been found, false otherwisepublic boolean replaceAll(java.lang.String searchStr, java.lang.String replaceStr, int start, int end, boolean ignoreCase) throws REException
searchStr
- The string to be foundreplaceStr
- The string which will replace searchStr
start
- The search's start offsetend
- The search's end offsetignoreCase
- Set to true, we'll ignore the text caseprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |