|
||||||||||
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
javax.swing.text.JTextComponent
javax.swing.JTextArea
fr.umlv.unitex.editor.EditionTextArea
public class EditionTextArea
This class describes a JTextArea that can correctly load unicode text an seach on it
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
---|
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.text.JTextComponent |
---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 | |
---|---|
EditionTextArea()
Default Constructor |
|
EditionTextArea(javax.swing.text.Document doc)
|
Method Summary | |
---|---|
int |
countAll(java.lang.String key,
boolean searchUp,
boolean modelWord,
boolean modelCase)
count all the String occurrence in the text after or before the caret |
void |
dictionaryFindNext(boolean searchUp,
boolean modelCase,
boolean modelword,
boolean flexionnalForm,
boolean canonicalForm,
java.lang.String key)
finds a word ( key ) with dictionary mode |
void |
findNext(boolean searchUp,
boolean modelCase,
boolean modelWord,
boolean modelPrefixe,
boolean modelSuffixe,
boolean modelRadical,
java.lang.String key)
finds a word ( key ) in a text |
void |
findSentence(int number)
find the sentence numbered X |
void |
replaceAll(java.lang.String key,
java.lang.String rKey,
boolean modelUp,
boolean modelCase,
boolean modelWord)
Replaces all occurences of a word in a text |
void |
setSelection(int xStart,
int xFinish,
boolean moveUp)
select a part of the text |
Methods inherited from class javax.swing.JTextArea |
---|
append, getAccessibleContext, getColumns, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWord |
Methods inherited from class javax.swing.text.JTextComponent |
---|
addCaretListener, addInputMethodListener, addKeymap, copy, cut, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EditionTextArea()
public EditionTextArea(javax.swing.text.Document doc)
Method Detail |
---|
public void findNext(boolean searchUp, boolean modelCase, boolean modelWord, boolean modelPrefixe, boolean modelSuffixe, boolean modelRadical, java.lang.String key) throws javax.swing.text.BadLocationException, KeyErrorException
searchUp
- true if Search up mode is enabledmodelCase
- true if mode case is enabledmodelWord
- true if wall word only mode is selectedmodelPrefixe
- true if prefixe search mode is selectedmodelSuffixe
- true if suffixe search mode is selectedmodelRadical
- true if radical search mode is selectedkey
- the word to find
javax.swing.text.BadLocationException
KeyErrorException
- if the key if null or with 0 sizepublic void dictionaryFindNext(boolean searchUp, boolean modelCase, boolean modelword, boolean flexionnalForm, boolean canonicalForm, java.lang.String key) throws javax.swing.text.BadLocationException, KeyErrorException
searchUp
- true if Search up mode is enabledmodelCase
- true if case mode is selectedmodelword
- true if wall word only mode is selectedflexionnalForm
- true if flexional search mode is selectedcanonicalForm
- true if canonical search mode is selectedkey
- the word to find
javax.swing.text.BadLocationException
KeyErrorException
- if the key if null or with 0 sizepublic void setSelection(int xStart, int xFinish, boolean moveUp)
xStart
- the beginning of the selectionxFinish
- the end of the selectionmoveUp
- the search direction mode ( up or down )public void findSentence(int number) throws javax.swing.text.BadLocationException, KeyErrorException, TextAreaSeparatorException
number
- the sentence's number
javax.swing.text.BadLocationException
KeyErrorException
- if an error occure while sentences counting
TextAreaSeparatorException
- if there isn't any sentence separator {S} or if number > sentences number in the textpublic int countAll(java.lang.String key, boolean searchUp, boolean modelWord, boolean modelCase) throws javax.swing.text.BadLocationException, KeyErrorException
key
- the word to findsearchUp
- true if Search up mode is enabledmodelCase
- true if case mode is selectedmodelWord
- true if wall word only mode is selected
javax.swing.text.BadLocationException
KeyErrorException
- if the key if null or with 0 sizepublic void replaceAll(java.lang.String key, java.lang.String rKey, boolean modelUp, boolean modelCase, boolean modelWord) throws TargetException, ReplacementTargetException
key
- the word to findrKey
- the new wordmodelUp
- true if Search up mode is enabledmodelCase
- true if case mode is selectedmodelWord
- true if wall word only mode is selected
TargetException
- is key is empty
ReplacementTargetException
- is the new word is empty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |