|
|||||||
| 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
|
+--javax.swing.text.JTextComponent
|
+--javax.swing.JEditorPane
|
+--javax.swing.JTextPane
|
+--ContentRenderPane
Provides a flattened view of a portion of an XML document, with fontification and styling.
| Inner classes inherited from class javax.swing.JEditorPane |
javax.swing.JEditorPane.AccessibleJEditorPane, javax.swing.JEditorPane.AccessibleJEditorPaneHTML, javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport |
| Inner classes inherited from class javax.swing.text.JTextComponent |
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
| 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 |
| Field Summary | |
static java.awt.Insets |
defaultScrollInsets
|
protected javax.swing.text.DefaultStyledDocument |
doc
|
protected java.awt.Insets |
scrollInsets
|
| Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, 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.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 | |
ContentRenderPane(ContentOwner owner,
java.lang.String xmlFilename,
boolean primary,
boolean allowClose)
Four-argument constructor. |
|
ContentRenderPane(ContentOwner owner,
java.lang.String xmlFilename,
boolean primary,
boolean allowClose,
MorphologyTool morph,
boolean async)
Six-argument constructor for specifying initial MorphologyTool. |
|
| Method Summary | |
void |
abort()
Bails out of a time-consuming operation by raising bailFlag. |
void |
actionPerformed(java.awt.event.ActionEvent evt)
This method handles the action commands generated by the popup menu. |
void |
addMorphAnalysis(java.lang.String variant,
java.lang.String lang)
Allows the user to add a morphological analysis. |
void |
adjustEditOffsets(int delta,
DOMTextOffset dto)
Adjust editTable after an edit. |
void |
autoscroll(java.awt.Point location)
|
void |
buildMorphWidgets()
Initially creates the widgets used for adding morphology. |
void |
checkTerm(java.lang.String word)
Displays information from the termlist database. |
void |
cleanup()
Cleans up, when it's time for us to give up the ghost. |
void |
clear()
Creates a new document; clears nodeOffsets table and
all highlights. |
void |
commitEdits()
Commits edits (if needed). |
static int |
computeWordNum(java.lang.String s,
int loc,
java.lang.String lang)
For a location loc in s, returns
n, where n means that l is
located within the nth word in s. |
void |
contextMenu(int x,
int y)
Pops up a context menu when the mouse is clicked in the ContentRenderPane. |
javax.swing.text.Style |
copyAttributes(javax.swing.text.Style copyStyle,
javax.swing.text.Style origStyle)
Adds attributes from one style to another. |
void |
copyTermInstances()
Copies term instances at cursor to system clipboard. |
javax.swing.text.StyleContext |
defineStyles()
Creates some named styles in the current fontSize. |
boolean |
dropInLinks(java.io.Reader reader,
java.lang.String mimeType)
Allows links to be dragged into the document. |
void |
enterEditMode()
Enters edit mode. |
void |
finalize()
|
java.awt.Insets |
getAutoscrollInsets()
|
static java.awt.Color |
getColor(java.lang.String name)
Gets a color from from Arboreal properties. |
org.w3c.dom.Node[] |
getDisplayedNodes()
Returns the array of Nodes displayed in this pane. |
javax.swing.tree.TreePath[] |
getDisplayedPaths()
Returns the array of TreePaths displayed in this pane. |
DOMTextOffset |
getDOMTextOffset(int ofs)
Returns a DOMTextOffset object, which is used for
editing. |
boolean |
getDragModifierFlag()
Returns true if the drag modifier key (currently defined for all platforms as SHIFT) is depressed. |
int |
getFontSize()
Returns the current font size. |
HighlightState |
getHighlightState()
Returns the current highlight state. |
ContentRenderPane.LinkOffset |
getLinkNodeForOffset(int ofs)
Returns a LinkOffset object that contains the linking DOM
containing ofs -- or null if ofs isn't located
within a linking node. |
LinkTool |
getLinkTool()
Gets the LinkTool associated with this
ContentRenderPane. |
javax.swing.tree.TreePath[] |
getMappedPaths()
Returns an array of TreePaths in the master text, which
are mapped to the displayed paths. |
MorphologyTool |
getMorphology()
Returns the morphology tool used by this ContentRenderPane. |
NodeOffset |
getNodeForOffset(int ofs)
Returns a NodeOffset object that contains the DOM node
to which ofs in the ContentRenderPane belongs
and the Amalgamation of text for that node, if the node
is a container. |
static int |
getOffsetOfWord(java.lang.String s,
int n,
java.lang.String lang)
Returns the offset of the nth word in s (or
null if there are fewer than n words in s. |
ContentOwner |
getOwner()
Returns the owner of this ContentRenderPane. |
java.awt.Insets |
getScrollInsets()
|
boolean |
getShowTags()
Returns the value of showTags. |
SuperAmalgamation |
getSuperAmalgamation(org.w3c.dom.Node n)
Gets a SuperAmalgamation on node n. |
java.lang.String |
getWordAtCaret()
Returns the word in which the caret is located, or the word to left of the caret (if the caret is not within a word). |
static java.lang.String |
getWordByNum(java.lang.String s,
int n,
java.lang.String lang)
Returns the nth word in s (or null if there
are fewer than n words in s. |
java.lang.String |
getXLinksForDisplayedNodes()
Returns links for the displayed nodes. |
void |
hideContextMenu()
Hides the context menu. |
void |
highlight(int startOfs,
Amalgamation amalg)
Highlights all occurrences of a string or regex in an Amalgamation. |
boolean |
isBusy()
Returns true if the ContentRenderPane is currently busy. |
boolean |
isCaretInText()
Determines whether the caret is located in the amalgamated text of some node. |
boolean |
isEditAllowed()
Returns true if editing is allowed at the insertion point. |
boolean |
isInArborPanel()
Returns true if this ContentRenderPane appears within an
ArborPanel. |
boolean |
isInEditMode()
Returns true if the pane is in "Edit" mode. |
boolean |
isNodeAtCaretMapped()
Returns true if the node in which the caret is located is mapped to a node in the master text. |
boolean |
isPrimary()
Returns true if this is the primary content pane for the master text. |
java.lang.Object[] |
lookupTerm(java.lang.String word,
boolean disableAdd)
Looks for term instances involving the given word, and using the currently attached TermTool. |
void |
lowerDragModifierFlag()
Lowers the drag modifier flag. |
void |
markAsLinkPane(boolean value)
Sets this pane as a "link pane." |
void |
markTerms(org.w3c.dom.Node n,
DocSpec spec)
Marks technical terms within a sentence, using a hash of technical term instances. |
void |
markTerms(org.w3c.dom.Node clink,
org.w3c.dom.Node n,
DocSpec spec)
Marks technical terms within a sentence, using a link from a foreign document. |
void |
markWord(org.w3c.dom.Node container,
java.lang.String word,
int number,
java.lang.String lang,
SuperAmalgamation samalg)
Adds a word highlight. |
ContentRenderPane.Run |
newRun(java.lang.Object style,
java.lang.String content)
Generates a new Run of text and tracks the generated
document length. |
void |
openExternalLinks()
Allows the users to view the targets of all links present in the selection in the corresponding JTree(s). |
void |
paint(java.awt.Graphics g)
Overrides paint(), so that an ignorable exception can
be caught. |
void |
paintHighlights(boolean clear)
Paints find and term highlights. |
int |
print(java.awt.Graphics pg,
java.awt.print.PageFormat pageFormat,
int pageIndex)
This method is part of the Printable interface. |
void |
queryCommitEdits()
Queries the user whether s/he wishes to commit or cancel edits. |
void |
rebuildContextMenu()
Rebuilds the context menu, after a ContentRenderPane has
been dissociated from a tree (master text) view. |
void |
remapNodes()
Remaps nodes. |
void |
render(org.w3c.dom.Node[] nodes,
boolean clear)
This version renders an array of nodes. |
void |
render(org.w3c.dom.Node node,
boolean clear)
Renders the content of a node in the XML DOM, with fontification and styling. |
void |
render(javax.swing.tree.TreePath[] paths,
boolean clear)
This version of render() renders multiple nodes,
which are specified as a list of TreePaths. |
void |
render(javax.swing.tree.TreePath path,
boolean clear)
Renders the content of a node specified by a TreePath,
with fontification and styling. |
void |
repaintHighlights()
Updates the colors of highlighters and repaints. |
void |
replaceSelection(java.lang.String content)
Overrides replaceSelection() in JEditorPane. |
ContentRenderPane |
replicate(boolean forcePrimary)
Like clone(), but I didn't feel like dealing with the
necessary casting (and use of the Cloneable interface). |
boolean |
rerenderIfNeeded()
Rerenders the content if needed. |
void |
saveEdits()
Commits edits and stops edit mode. |
void |
scrollRectToVisible(java.awt.Rectangle aRect)
Overrides JComponent.scrollRectToVisible(), so as to
disable scrolling generated in
DefaultCaret.adjustVisibility(). |
void |
setBlankLineMode(boolean value)
Sets a flag that determines whether blank lines are rendered between individual containers. |
void |
setDropInProgress(boolean value)
Sets the dropInProgress property. |
void |
setFontSize(int fontSize)
Sets the current font size, within the range {MIN_FONT_SIZE..MAX_FONT_SIZE}. |
void |
setHighlightState(HighlightState highlightState)
Installs a highlight, specified by a HighlightState. |
void |
setLinkingNodes(org.w3c.dom.Node[] linkingNodes)
Sets linkingNodes, which contains the nodes that link to
the displayed nodes. |
void |
setLinkTool(LinkTool linkTool)
Sets the LinkTool associated with this
ContentRenderPane. |
void |
setResultsMode(boolean value)
In "results mode", XML tags are not shown, but IDs are displayed in green (if they exist). |
void |
setScrollInsets(java.awt.Insets insets)
|
void |
setShowTags(boolean value)
Sets the value of showTags. |
void |
setStyleContext(javax.swing.text.StyleContext sc)
Sets the style context. |
void |
setTermHighlight(org.w3c.dom.Node node)
Sets the term whose instances are shaded (in addition to the standard boxing). |
void |
setTermTool(TermTool terms)
Attaches the given TermTool. |
void |
toggleShowTags()
Toggles the value of showTags. |
void |
undoEdit()
Cancels and reverses active edit. |
void |
useTermTool(java.lang.String command)
Given the action command command, attaches the appropriate
TermTool and calls checkTerm(). |
void |
writeContents()
Writes the contents of this pane to a user-selected file as a text file in UTF-8 encoding. |
void |
zapAllHighlights()
Zaps all highlights. |
void |
zapHighlightPainters(javax.swing.text.Highlighter.HighlightPainter[] zap)
Zaps highlights painted by the specified painters. |
void |
zapTermHighlights()
This is a convenience method, since other classes should have to deal with the subtleties of zapHighlightPainters. |
void |
zapWordHighlights()
This is a convenience method, since other classes should have to deal with the subtleties of zapHighlightPainters. |
| Methods inherited from class javax.swing.JTextPane |
addStyle, createDefaultEditorKit, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, getStyledEditorKit, getUIClassID, insertComponent, insertIcon, paramString, removeStyle, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument |
| Methods inherited from class javax.swing.JEditorPane |
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getStream, getText, isFocusCycleRoot, isManagingFocus, processComponentKeyEvent, processKeyEvent, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText |
| Methods inherited from class javax.swing.text.JTextComponent |
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getUI, isEditable, isFocusTraversable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write |
| 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processFocusEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, 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 |
| 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, 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, 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, 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 |
| Field Detail |
protected javax.swing.text.DefaultStyledDocument doc
public static final java.awt.Insets defaultScrollInsets
protected java.awt.Insets scrollInsets
| Constructor Detail |
public ContentRenderPane(ContentOwner owner,
java.lang.String xmlFilename,
boolean primary,
boolean allowClose)
owner - ContentOwnerxmlFilename - XML filenameprimary - is this the primary content pane?allowClose - allow "Close" in context menu
public ContentRenderPane(ContentOwner owner,
java.lang.String xmlFilename,
boolean primary,
boolean allowClose,
MorphologyTool morph,
boolean async)
MorphologyTool.owner - ContentOwnerxmlFilename - XML filenameprimary - is this the primary content pane?morph - morphology toolasync - use asynchronous layout| Method Detail |
public void replaceSelection(java.lang.String content)
replaceSelection() in JEditorPane.replaceSelection in class javax.swing.JTextPanecontent - content to replace
public void adjustEditOffsets(int delta,
DOMTextOffset dto)
editTable after an edit.delta - length changedto - current DOMTextOffsetpublic void setDropInProgress(boolean value)
dropInProgress property.value - true if DnD drop onto this target in progress
public boolean dropInLinks(java.io.Reader reader,
java.lang.String mimeType)
reader - reader that supplies term instances in XML fragmentmimeType - mimetype of dropped linkspublic void queryCommitEdits()
public void commitEdits()
public void saveEdits()
public void undoEdit()
public void remapNodes()
public boolean isPrimary()
public void markAsLinkPane(boolean value)
value - true if link panepublic javax.swing.text.StyleContext defineStyles()
fontSize.public void setStyleContext(javax.swing.text.StyleContext sc)
sc - new style contextpublic int getFontSize()
public void setFontSize(int fontSize)
fontSize - new font sizepublic void setBlankLineMode(boolean value)
value - true to display extra blank linespublic void setHighlightState(HighlightState highlightState)
HighlightState.highlightState - highlight state informationpublic HighlightState getHighlightState()
public void setTermHighlight(org.w3c.dom.Node node)
node - term element in termlist DOMpublic void zapHighlightPainters(javax.swing.text.Highlighter.HighlightPainter[] zap)
zap - array of highlight painterspublic void zapAllHighlights()
removeAllHighlights()
in DefaultHighlighter does not allow for mixed
layered/non-layered highlights. If we were to call
removeAllHighlights() there would be exceptions
thrown.public void zapTermHighlights()
zapHighlightPainters.public void zapWordHighlights()
zapHighlightPainters.public void setLinkTool(LinkTool linkTool)
LinkTool associated with this
ContentRenderPane.linkTool - LinkToolpublic LinkTool getLinkTool()
LinkTool associated with this
ContentRenderPane.public void setLinkingNodes(org.w3c.dom.Node[] linkingNodes)
linkingNodes, which contains the nodes that link to
the displayed nodes.linkingNodes - linking nodespublic void toggleShowTags()
showTags.public boolean getShowTags()
showTags.public void setShowTags(boolean value)
showTags.value - true if tags are to be shownpublic void setResultsMode(boolean value)
value - true for results modepublic boolean isBusy()
ContentRenderPane is currently busy.public void abort()
bailFlag.
public void render(javax.swing.tree.TreePath[] paths,
boolean clear)
render() renders multiple nodes,
which are specified as a list of TreePaths.paths - paths to relevant nodesclear - true if pane should be cleared first
public void render(org.w3c.dom.Node[] nodes,
boolean clear)
nodes - nodes to be renderedclear - true if pane should be cleared first
public void render(javax.swing.tree.TreePath path,
boolean clear)
TreePath,
with fontification and styling.path - path to relevant nodeclear - true if pane should be cleared first
public void render(org.w3c.dom.Node node,
boolean clear)
node - node of DOM treeclear - true if pane should be cleared first
public void highlight(int startOfs,
Amalgamation amalg)
startOfs - offset for beginning of given nodeamalg - amalgamation of text nodes
public void markTerms(org.w3c.dom.Node n,
DocSpec spec)
n - container or subcontainerspec - document specification
public void markTerms(org.w3c.dom.Node clink,
org.w3c.dom.Node n,
DocSpec spec)
clink - term instance noden - container or subcontainerspec - document specificationpublic SuperAmalgamation getSuperAmalgamation(org.w3c.dom.Node n)
SuperAmalgamation on node n.n - container node
public void markWord(org.w3c.dom.Node container,
java.lang.String word,
int number,
java.lang.String lang,
SuperAmalgamation samalg)
container - the container nodeword - the word (variant form)number - occurrence number of wordlang - language of the wordsamalg - SuperAmalgamation on the container
public static int computeWordNum(java.lang.String s,
int loc,
java.lang.String lang)
loc in s, returns
n, where n means that l is
located within the nth word in s.s - sourceloc - offset in targetlang - language of sl in
s
public static java.lang.String getWordByNum(java.lang.String s,
int n,
java.lang.String lang)
nth word in s (or null if there
are fewer than n words in s.s - sourcen - word numberlang - language of s
public static int getOffsetOfWord(java.lang.String s,
int n,
java.lang.String lang)
nth word in s (or
null if there are fewer than n words in s.s - sourcen - word numberlang - language of sn wordpublic boolean rerenderIfNeeded()
editTable).public void clear()
nodeOffsets table and
all highlights.public void paintHighlights(boolean clear)
clear - true if word highlight should be cleared
public javax.swing.text.Style copyAttributes(javax.swing.text.Style copyStyle,
javax.swing.text.Style origStyle)
copyStyle - style to serve as base for copyorigStyle - style with attributes to copy
public ContentRenderPane.Run newRun(java.lang.Object style,
java.lang.String content)
Run of text and tracks the generated
document length.style - a style or style name (from current style
context)content - text contentpublic void rebuildContextMenu()
ContentRenderPane has
been dissociated from a tree (master text) view.public void hideContextMenu()
public boolean getDragModifierFlag()
public void lowerDragModifierFlag()
public DOMTextOffset getDOMTextOffset(int ofs)
DOMTextOffset object, which is used for
editing.public NodeOffset getNodeForOffset(int ofs)
NodeOffset object that contains the DOM node
to which ofs in the ContentRenderPane belongs
and the Amalgamation of text for that node, if the node
is a container.public boolean isCaretInText()
currentNodeOffset - node offset table entry
normalized - orthographically normalized amalgamation
amalgPos - offset in normalized amalgamated text
This method behaves differently when in edit mode.
public java.lang.String getWordAtCaret()
public ContentRenderPane.LinkOffset getLinkNodeForOffset(int ofs)
LinkOffset object that contains the linking DOM
containing ofs -- or null if ofs isn't located
within a linking node.public boolean isNodeAtCaretMapped()
currentMappedNodes is set to the list of mapped nodes (or
null).public void openExternalLinks()
JTree(s).
public int print(java.awt.Graphics pg,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
Printable interface.print in interface java.awt.print.Printablepublic void repaintHighlights()
public static java.awt.Color getColor(java.lang.String name)
name - symbolic color name
public void contextMenu(int x,
int y)
ContentRenderPane.x - x coordinatey - y coordinatepublic void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic boolean isInArborPanel()
ContentRenderPane appears within an
ArborPanel.ArborPanelpublic MorphologyTool getMorphology()
ContentRenderPane.MorphologyToolpublic void buildMorphWidgets()
public void addMorphAnalysis(java.lang.String variant,
java.lang.String lang)
variant - variant form (in text)lang - language codepublic void enterEditMode()
public boolean isInEditMode()
public boolean isEditAllowed()
public void copyTermInstances()
public void useTermTool(java.lang.String command)
command, attaches the appropriate
TermTool and calls checkTerm().command - term commandpublic void setTermTool(TermTool terms)
TermTool.terms - term tool
public java.lang.Object[] lookupTerm(java.lang.String word,
boolean disableAdd)
word - word to check in terminology databasedisableAdd - don't open term editor if not foundblobject, with multiple parameters
public void checkTerm(java.lang.String word)
word - word to check in terminology databasepublic ContentRenderPane replicate(boolean forcePrimary)
clone(), but I didn't feel like dealing with the
necessary casting (and use of the Cloneable interface).
Martha, by the way, has some very interesting material on cloning
(the human kind). (vide
Amazon)forcePrimary - force copy to be marked as primarypublic void writeContents()
public org.w3c.dom.Node[] getDisplayedNodes()
Nodes displayed in this pane.public javax.swing.tree.TreePath[] getDisplayedPaths()
TreePaths displayed in this pane.public javax.swing.tree.TreePath[] getMappedPaths()
TreePaths in the master text, which
are mapped to the displayed paths.public java.lang.String getXLinksForDisplayedNodes()
WordTokenTable exists, then links are generated that
point to the selected words and their containers.public ContentOwner getOwner()
ContentRenderPane.public void cleanup()
public void scrollRectToVisible(java.awt.Rectangle aRect)
JComponent.scrollRectToVisible(), so as to
disable scrolling generated in
DefaultCaret.adjustVisibility().scrollRectToVisible in class javax.swing.JComponentaRect - rectangle to be made visible (ignored here!)
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectpublic void paint(java.awt.Graphics g)
paint(), so that an ignorable exception can
be caught.paint in class javax.swing.JComponentg - graphics contextpublic void setScrollInsets(java.awt.Insets insets)
public java.awt.Insets getScrollInsets()
public java.awt.Insets getAutoscrollInsets()
getAutoscrollInsets in interface java.awt.dnd.Autoscrollpublic void autoscroll(java.awt.Point location)
autoscroll in interface java.awt.dnd.Autoscroll
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||