|
|||||||||
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.JEditorPane
javax.swing.JTextPane
net.sourceforge.nite.gui.textviewer.NTextArea
public class NTextArea
The basic NITE GUI element used to display text - add text to the TextArea using addElement(NTextElement element). This GUI element can respond to timing highlights as well as query highlights and also implements the Printable interface.
getHighlightedTextElements(int type)
.
The methods getSelectedNOMElementsOrdered, getSelectedTextElements,
getSelectedElements and getSelectedElementsOrdered give a more
flexible access to the selection information, though they will be renamed in the future to
a more consistent set of function calls.
NTASelectionListener
. Whenever the selection of the NTextArea changes, e.g. through
mouse dragging, the NTASelectionListeners are notified of the change. They can then
call the above methods and react to the new selections. This only works for
selections, and not for time or query highlights.
clearHighlights(NTextArea.USER_HIGHLIGHTS)
The highlights are stored in TreeSets ordered by the transcript order. If you're planning to have highlights of 2000 or more elements, this will cause performance degradation, and you need to either reconsider the interface, or implement a different highlighting mechanism.
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 | |
---|---|
static int |
QUERY_HIGHLIGHTS
|
static int |
SELECTION_HIGHLIGHTS
|
static int |
TIME_HIGHLIGHTS
|
static int |
USER_HIGHLIGHTS
|
Fields inherited from class javax.swing.JEditorPane |
---|
HONOR_DISPLAY_PROPERTIES, W3C_LENGTH_UNITS |
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.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NTextArea()
create a screen area for the display of textual information with syncing-to-signal and search highlighting functionality. |
Method Summary | |
---|---|
void |
acceptQueryResult(NOMElement result)
display query result Old query highlights are removed. |
void |
acceptQueryResults(java.util.List results)
display query results (arg should be a list of NOMElements). |
void |
acceptResults(java.util.List results)
Accept the given list of query results, which can contain a mixture of NOMElements and further lists. |
void |
acceptTimeChange(double t)
Accept a new time (generally from another registered TimeHandler) and highlight the appropriate elements. |
void |
acceptTimeSpanChange(double start,
double end)
Accept a new time span from another registered time handler and highlight the appropriate elements. |
void |
addCaretListener(javax.swing.event.CaretListener newl)
|
void |
addElement(NTextElement te)
Inserts the content specified in the text element argument at the end of the current document. |
void |
addElement(NTextElement newEl,
NTextElement oldEl)
Insert a new NTextElement into the document after the given existing element. |
void |
addNTASelectionListener(NTASelectionListener newListener)
|
void |
clear()
clear the display and (re)initialise all indexes |
void |
clearHighlights(int type)
Clears all highlights of the given type. |
void |
clearSelection()
A convenience method to clear all selection highlights. |
Clock |
getClock()
Return the Clock that is currently syncronising this TimeHandler |
java.util.Set |
getElementsBetweenTimes(double start,
double end)
return a set of NTextElements which appear in the span |
java.util.List |
getHighlightedModelElements(int type)
Returns a set of ObjectModelElements associated with a highlight for a given type. |
java.util.List |
getHighlightedNOMElements(int type)
Returns a set of NOMElements associated with a highlight for a given type. |
java.util.SortedSet |
getHighlightedTextElements(int type)
Returns a (shared) set of highlighted NTextElements for the given type. |
double |
getMaxTime()
get the largest end time of any NTextElement so far added to this NTextArea. |
NTextElement |
getNTextElementAtPoint(java.awt.Point clickpoint)
given a Point (most likely a mouseEvent.getPoint() intercepted by a MouseListener), return the NTextElement beneath it (or return null). |
NTextElement |
getNTextElementAtPosition(int position)
Given a position in a document (probably because of trying to move the cursor), return the NTextElement at it, or null |
ObjectModelElement |
getObjectModelElementAtPoint(java.awt.Point clickpoint)
given a Point (most likely a mouseEvent.getPoint() intercepted by a MouseListener), return the ObjctModelElement beneath it (or return null). |
ObjectModelElement |
getObjectModelElementAtPosition(int position)
Given a position in a document (probably because of trying to move the cursor), return the ObjectModelElement at it, or null |
java.util.Set |
getSelectedElements()
Deprecated. This method will be renamed to achieve more consistent naming. |
java.util.List |
getSelectedElementsOrdered()
Deprecated. This method will be renamed to achieve more consistent naming. |
java.util.List |
getSelectedNOMElements()
Returns a list of currently selected NOMElements, that is, those highlighted with SELECTION_HIGHLIGHTS. |
java.util.Set |
getSelectedNOMElementsOrdered()
Deprecated. This method will be renamed to achieve more consistent naming. |
java.util.Set |
getSelectedTextElements()
Deprecated. Use getHighlightedTextElements(NTextArea.SELECTION_HIGHLIGHTS) |
int |
getSelectionEndPosition()
Returns the position of the selection end, or -1 if nothing is selected. |
int |
getSelectionStartPosition()
Returns the position of the selection start, or -1 if nothing is selected. |
java.util.Set |
getTextElements(ObjectModelElement ome)
return the set of screen elements (NTextElements) represented by the given object model element. |
void |
gotoDocumentEnd()
Scroll to the end of the displayed text |
void |
gotoDocumentStart()
Scroll to the start of the displayed text |
javax.swing.text.Style |
insertCopyOfStyle(NTextElement element,
javax.swing.text.Style templateStyle,
java.lang.String name)
Inserts a copy of the given style for the style hierarchy of the NTEXTelement, using the given name (which should be unique). |
void |
insertDisplayElement(ObjectModelElement newElement,
ObjectModelElement parent,
int position)
Insert a new text element into the parent at the given position |
void |
insertElement(NTextElement te,
int pos)
This method inserts NTextElement e in the NTA at the certain position Positions of the elements in the NTA are refreshed. |
boolean |
isResultRelevant(NOMElement result)
Is the given query result relevant to this text area? |
void |
newSelection(int dot,
int mark)
WRITE BETTER DOCUMENTATION HERE! THIS IS OBSCURE This latest version extends the highlighting to NOMObjectModelElements instead of NTextElements. |
void |
newTimeSelection(int dot,
int mark)
the user has highlighted a bit of text while holding down control, so reset the time on the clock to the timing data stored with the data corresponding to the selection |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pi)
print the document: calls the print method in NITEStyledDocument. |
void |
printTextArea()
Print the document if an print service can be found - winds up calling the print method in the NITEStyledDocument. |
void |
redisplayElement(NTextElement element,
java.lang.String newstring)
This version of redisplay takes the actual text element that needs to be replaced as an argument along with the new text. |
void |
redisplayElement(ObjectModelElement element)
Method redisplayElement. |
void |
redisplayElement(ObjectModelElement element,
java.lang.String oldstring,
java.lang.String newstring)
Method redisplayElement. |
void |
redisplayTextElement(NTextElement oldEl,
NTextElement newEl)
swap one NTextElement for another |
void |
removeDisplayComponent(ObjectModelElement element)
Remove all representations of the ObjectModelElement from the NTextArea. |
void |
removeHighlighted(int type,
NTextElement el)
Remove the highlights from the given element for the given highlighting type. |
void |
removeNTASelectionListener(NTASelectionListener listener)
|
javax.swing.text.Style |
removeStyleFromChain(NTextElement element,
Predicate isAlignStyle)
Searches the style hierarchy on the text element and removes the first style that satisfies the predicate. |
void |
scrollTo(NTextElement el)
Chopped out of the old setTimeHighlighted to scroll the window to highlight a particular element |
void |
setAutoScroll(boolean scrolling)
Turn off scrolling to the appropriate place in the NTextArea when highlights are applied. |
void |
setClock(Clock clock)
Set the Clock to which this TimeHandler is registered |
void |
setHighlighted(int type,
java.util.Iterator elements)
Passes on to setHighlighted(int type, NTextElement el) |
void |
setHighlighted(int type,
NTextElement el)
TO DOCUYMENT: SETHIGHLIGHTED WILL MOVE THE CARET!!!!!!!!! this means that you should be careful with setting highlights from your own caretlisteners, because they would get a loop-callback! Highlight the given element as 'highlighted' for the given type of highlighting. |
void |
setHighlighted(int type,
NTextElement el,
javax.swing.text.Style templatestyle)
|
void |
setHighlighted(int type,
ObjectModelElement el)
Highlight the given ObjectModelElement(typically corresponding to a NOMElement) with a given highlight type and default style |
void |
setHighlighted(int type,
ObjectModelElement el,
javax.swing.text.Style templateStyle)
Highlight the given ObjectModelElement(typically corresponding to a NOMElement) with a given highlight type, using the specified style |
void |
setHighlighted(int type,
java.util.Set elements)
Passes on to setHighlighted(int type, NTextElement el) |
void |
setHighlightingStyle(int type,
javax.swing.text.Style newStyle)
THIS is the method that you call if you want to have your own special Style for showing highlighting. |
void |
setQueryHighlightColor(java.awt.Color color)
set the colour of the highlighting for queries. |
void |
setReplayEnabled(boolean value)
turn off media / time playing ability for this text area. |
void |
setSelected(ObjectModelElement el)
A convenience method to highlight a given object model element as if it was selected by the user. |
void |
setTime(double t)
Broadcast a new time to any concurrent TimeHandlers |
void |
setTimeHighlightColor(java.awt.Color color)
this method is NOT preferred: use setHighlightingStyle. |
void |
setTimeSpan(double start,
double end)
Broadcast a new time span to any concurrent TimeHandlers |
void |
showTimeSpan(double start,
double end)
time alignment is reimplemented in this class using a time alignment style. |
Methods inherited from class javax.swing.JTextPane |
---|
addStyle, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, getUIClassID, insertComponent, insertIcon, removeStyle, replaceSelection, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument |
Methods inherited from class javax.swing.JEditorPane |
---|
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getHyperlinkListeners, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getText, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText |
Methods inherited from class javax.swing.text.JTextComponent |
---|
addInputMethodListener, addKeymap, copy, cut, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, 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, setFont, 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 |
Field Detail |
---|
public static final int SELECTION_HIGHLIGHTS
public static final int TIME_HIGHLIGHTS
public static final int QUERY_HIGHLIGHTS
public static final int USER_HIGHLIGHTS
Constructor Detail |
---|
public NTextArea()
Method Detail |
---|
public void addCaretListener(javax.swing.event.CaretListener newl)
addCaretListener
in class javax.swing.text.JTextComponent
public void acceptResults(java.util.List results)
SimpleQueryResultHandler
acceptResults
in interface SimpleQueryResultHandler
results
- the results.public void acceptQueryResults(java.util.List results)
acceptQueryResults
in interface QueryResultHandler
public void acceptQueryResult(NOMElement result)
acceptQueryResult
in interface QueryResultHandler
public boolean isResultRelevant(NOMElement result)
result
- the result.
true
if the result is relevant.public void setQueryHighlightColor(java.awt.Color color)
setQueryHighlightColor
in interface QueryResultHandler
public void printTextArea()
public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pi) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
java.awt.print.PrinterException
public void clear()
public void addNTASelectionListener(NTASelectionListener newListener)
public void removeNTASelectionListener(NTASelectionListener listener)
public void newSelection(int dot, int mark)
The superclass (JTextPane) uses a Caret for keeping track of GUI manipulations that manipulate the cursor in text, such as click or drag. The NTASelectionTracker of this NTextArea keeps track of changes in the caret. Whenever the caret changes (i.e. the user wants to change the selection), the tracker calls this newselection method. We usually want to select only complete NTextElemetns, even if the user dragged only a few words or characters. The newSelection method interprets the caret span, determines which NTextElements should be considered 'selected', takes care of proper highlighting and makes sure that the relevant elements are made available as being 'selected' (getSelectedTextElements and getSelectedElements). [DR: this is changed into getHighlightedTextElements NB: the Caret that originally caused this call is left unchanged!!! this means that the Caret does NOT always reflect the exact selection and highlighting information!
public void newTimeSelection(int dot, int mark)
public void gotoDocumentStart()
public void gotoDocumentEnd()
public void scrollTo(NTextElement el)
public java.util.Set getElementsBetweenTimes(double start, double end)
public void setAutoScroll(boolean scrolling)
public void showTimeSpan(double start, double end)
The actual work is done by setTimeAlignmentStyle and showTimeSpan
Note the following: If we align using a style, and the time alignment should be removed again, we do want to remove the style, but we do NOT want to remove possible styles that were present on the text before alignment. So we cannot just set an attribute such as ITALIC to true, and set it to false again afterwards. So what we do is the following. Internally we create a Style object used as "rubber stamp template". When a certain NTextElement should be highlighted, we copy this style giving it a unique name, give it as parent the current style of that NTextElement, and set this style as the new style of the NTextElement. When the timealignment is removed for this element, we just remove that new style again from the chain of styles for the NTextElement.
One problem though: other components may have added yet more style-children. So we cannot just take the first style, remove it and use its parent again; we need to search through the style-chain upwards to find the correct style. For this the time-alignment style for the NTextElement should have a wel-defined name, e.g. a unique ID prefixed by TIME_ALIGNMENT_STYLENAME.
To keep track of the highlighted NTextElements we store them in a Set.
public void acceptTimeChange(double t)
acceptTimeChange
in interface TimeHandler
public void acceptTimeSpanChange(double start, double end)
acceptTimeSpanChange
in interface TimeHandler
public void setTime(double t)
setTime
in interface TimeHandler
public void setTimeSpan(double start, double end)
setTimeSpan
in interface TimeHandler
public Clock getClock()
getClock
in interface TimeHandler
public void setClock(Clock clock)
setClock
in interface TimeHandler
public void setTimeHighlightColor(java.awt.Color color)
setTimeHighlightColor
in interface TimeHandler
public void setHighlightingStyle(int type, javax.swing.text.Style newStyle)
public void clearHighlights(int type)
public void setHighlighted(int type, NTextElement el)
following documetnation should be rewritten highlighted is reimplemented in this class using a highlighted style.
Note the following: If we highlighted using a style, and the highlighted should be removed again, we do want to remove the style, but we do NOT want to remove possible styles that were present on the text before highlighting. So we cannot just set an attribute such as ITALIC to true, and set it to false again afterwards. So what we do is the following. Internally we create a Style object used as "rubber stamp template". When a certain NTextElement should be highlighted, we copy this style giving it a unique name, give it as parent the current style of that NTextElement, and set this style as the new style of the NTextElement. When the highlight is removed for this element, we just remove that new style again from the chain of styles for the NTextElement.
One problem though: other components may have added yet more style-children. So we cannot just take the first style, remove it and use its parent again; we need to search through the style-chain upwards to find the correct style. For this the highlighted style for the NTextElement should have a wel-defined name, e.g. a unique ID prefixed by some constant string prefix.
To keep track of the highlighted NTextElements we store them in Sets.
Note that the SelectionListeners are not notified.
public void setHighlighted(int type, NTextElement el, javax.swing.text.Style templatestyle)
public void removeHighlighted(int type, NTextElement el)
public void setHighlighted(int type, ObjectModelElement el)
public void setHighlighted(int type, ObjectModelElement el, javax.swing.text.Style templateStyle)
public void setHighlighted(int type, java.util.Set elements)
public void setHighlighted(int type, java.util.Iterator elements)
public void setSelected(ObjectModelElement el)
public void clearSelection()
public java.util.SortedSet getHighlightedTextElements(int type)
public java.util.List getHighlightedModelElements(int type)
getHighlightedTextElements(int)
.
public java.util.List getHighlightedNOMElements(int type)
getHighlightedTextElements(int)
.
public java.util.List getSelectedNOMElements()
public java.util.Set getSelectedTextElements()
getHighlightedTextElements(NTextArea.SELECTION_HIGHLIGHTS)
public java.util.Set getSelectedElements()
public java.util.List getSelectedElementsOrdered()
public java.util.Set getSelectedNOMElementsOrdered()
public ObjectModelElement getObjectModelElementAtPosition(int position)
public ObjectModelElement getObjectModelElementAtPoint(java.awt.Point clickpoint)
public NTextElement getNTextElementAtPosition(int position)
public NTextElement getNTextElementAtPoint(java.awt.Point clickpoint)
public java.util.Set getTextElements(ObjectModelElement ome)
NTextElementPositionComparator
public int getSelectionStartPosition()
newSelection(int, int)
public int getSelectionEndPosition()
newSelection(int, int)
public void addElement(NTextElement te)
te
- The element to be inserted into the documentpublic double getMaxTime()
getMaxTime
in interface TimeHandler
public void addElement(NTextElement newEl, NTextElement oldEl)
public void redisplayElement(ObjectModelElement element)
public void redisplayTextElement(NTextElement oldEl, NTextElement newEl)
public void redisplayElement(ObjectModelElement element, java.lang.String oldstring, java.lang.String newstring)
public void redisplayElement(NTextElement element, java.lang.String newstring)
public void removeDisplayComponent(ObjectModelElement element)
public void insertDisplayElement(ObjectModelElement newElement, ObjectModelElement parent, int position)
public javax.swing.text.Style removeStyleFromChain(NTextElement element, Predicate isAlignStyle)
TODO: improve documentation here with a picture of this style hierarchy, highlightinh what will be removed
public void insertElement(NTextElement te, int pos)
public javax.swing.text.Style insertCopyOfStyle(NTextElement element, javax.swing.text.Style templateStyle, java.lang.String name)
public void setReplayEnabled(boolean value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |