|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--TermTool
The TermTool is responsible for manipulating terminological
information.
| Inner Class Summary | |
class |
TermTool.LemmaChangeListener
This class listens for modifications to the lemmata choosers in the SaturationMeter. |
| Constructor Summary | |
TermTool(int colorID)
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
This method handles the action commands generated by buttons. |
boolean |
addClickedWord(java.lang.String word,
int num,
java.lang.String xpath,
java.lang.String lang)
Adds a word clicked in the ContentRenderPane to the
list of parts that constitute a full instance of a term. |
void |
addInstance(java.lang.String word,
int number,
java.lang.String xpath,
org.w3c.dom.Node container,
java.lang.String lang,
ContentRenderPane content)
Starts the process of adding a new term instance. |
void |
addTerm()
Presents a dialog whereby the user may add a new term (not a new term instance -- that's addInstance(). |
protected org.w3c.dom.Node |
addTermToDOM(java.lang.String name,
int parts,
java.lang.String translation,
java.lang.String lang)
Adds a new term in the DOM. |
protected void |
addTermToList(java.lang.String name,
int parts,
java.lang.String translation,
java.lang.String lang,
java.lang.String comments)
|
void |
cancelEdit()
Cancels any edit that is in progress. |
void |
cleanup()
Cleans up the term tool, in particular by pushing any edits to comments. |
void |
clearFilter()
Clears filter on term list. |
void |
copyTerm()
Copies the selected term (with instances) to another termlist. |
java.lang.String |
describe()
Returns a name/description for this TermTool. |
void |
dispose()
|
boolean |
dropInParts(java.io.Reader reader)
Allows term instances to be added in batch via drag-and-drop. |
boolean |
editInProgress()
Returns true if the user is in the process of editing a term instance. |
void |
editInstance(org.w3c.dom.Element instance,
java.lang.String xpath,
org.w3c.dom.Node container,
java.lang.String lang,
ContentRenderPane content,
boolean preselected,
boolean clearFilter)
Displays an existing term instance in the term editor. |
void |
editTerm()
Presents a dialog whereby the user may edit an existing term (not a term instance). |
void |
extendMorphology(java.lang.String variant,
java.lang.String basic,
java.lang.String lang)
|
void |
filterTermList()
Filter term list. |
javax.swing.JPanel |
getChooserPanel()
Returns the term chooser widget panel. |
int |
getColorID()
Returns the color ID for highlighting terms in this list. |
org.w3c.dom.Document |
getDocument()
Returns the termlist document. |
TermTool.LemmaChangeListener |
getLemmaChangeListener()
Returns the LemmaChangeListener. |
java.io.File |
getSaveFile()
Returns the File to which this URL should be saved. |
java.lang.String |
getSelectedViewLang()
Returns the selected view language. |
TermInfo |
getTermInfo(java.lang.String term)
Returns the TermInfoobject for a named term. |
org.w3c.dom.Document |
getTermList()
Returns XML termlist document. |
javax.swing.JList |
getTermSelector()
Returns the term selector component. |
java.net.URL |
getTermURL()
Returns the URL used for loading terms. |
void |
hashInstances(ArborPanel panel)
Builds a hash that maps DOM nodes to instance elements in the termlist; we'll want to get them quickly when rendering, etc. |
void |
initAddTermWidgets()
Initially creates the widgets for the "Add term" dialog. |
void |
initChooserWidgets()
Initially creates the widgets for the term chooser dialog. |
boolean |
isDirty()
Returns true if the termlist (DOM) is "dirty" -- that is, if any changes have been made. |
static boolean |
isDragInProgress()
Returns true if a drag involving a TermTool is in progress. |
boolean |
isFinished()
Returns true if this object is no longer to be used. |
boolean |
isInternalContentRenderPane(ContentRenderPane p)
Returns true if the ContentRenderPane is the internal
ContentRenderPane of the editor. |
void |
multipleSelectionMode(int[] indices)
Enters multiple-selection mode. |
void |
parseTermList(ArborAgent agent)
Parses an XML termlist. |
void |
playConfirmationSound()
Plays the sound associated with confirmation of adding a term. |
void |
redrawTerms()
Redraws list of terms in editor. |
void |
refreshTermList()
Refreshes the list of terms in the term selector. |
void |
rename()
Renames the term editor (if it is visible). |
void |
saturationChanged(SaturationEvent evt)
This method is part of the SaturationListener interface. |
void |
seedTermList(java.lang.String loc)
Loads a list of candidate ("seed") terms from a URl (in string form). |
void |
serialize(java.io.File file)
Generates an XML file from the termlist in the DOM. |
boolean |
serverMode()
Determines whether we're in server mode (terms from online DB). |
void |
setAvailableLangs()
Updates the choices in the picker (combo box) that allows the user to examine candidate terms in the available languages. |
void |
setDirty(boolean value)
Sets or clears the "dirty" property of the termlist. |
static void |
setDragInProgress(boolean value)
Sets global dragInProgress status. |
void |
setEditInProgress(boolean value)
Sets the flag that indicates whether the user is in the process of editing a term instance. |
void |
setLocator(java.lang.String locator)
Sets the text locator. |
void |
setSelectLang(java.lang.String lang)
Sets the value of selectLang. |
void |
setTermSelectorLanguage(java.lang.String lang)
Ensures that the term selector displays candidate terms for the given language. |
void |
setTermTypeMask()
Sets the term type mask. |
void |
setTermURL(java.net.URL termURL)
Sets the URL used for loading terms. |
void |
showEditor()
Displays the modeless frame that allows the user to edit term instances. |
void |
showInstances()
Displays a new frame containing passages in the current text where the selected technical term is instantiated. |
void |
showOther()
Allows the users to view all term instances not in the selected text. |
void |
showSelectedInstanceInContext()
Shows the currently selected instance. |
boolean |
termsLoaded()
Indicates whether terms have been loaded. |
void |
textsUpdated(TextUpdateEvent evt)
Required by the TextUpdateListener interface. |
void |
valueChanged(javax.swing.event.ListSelectionEvent evt)
This method is part of the ListSelectionListener interface. |
void |
view()
Displays the Term Editor frame. |
protected void |
zapPart(int num)
Removes part num from the accumulated instance parts. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TermTool(int colorID)
| Method Detail |
public java.lang.String describe()
TermTool.public java.io.File getSaveFile()
File to which this URL should be saved.public int getColorID()
public void initChooserWidgets()
public void rename()
public javax.swing.JPanel getChooserPanel()
public void setTermTypeMask()
public void setTermURL(java.net.URL termURL)
termURL - URL for loading termspublic java.net.URL getTermURL()
public void setLocator(java.lang.String locator)
locator - text locatorpublic void parseTermList(ArborAgent agent)
agent - ArborAgentpublic void hashInstances(ArborPanel panel)
panel - ArborPanelpublic void playConfirmationSound()
public void addInstance(java.lang.String word,
int number,
java.lang.String xpath,
org.w3c.dom.Node container,
java.lang.String lang,
ContentRenderPane content)
word - word in term (e.g., "naturam")number - number in containerxpath - XPath expressioncontainer - container in documentlang - language code as per ISO 639content - content pane in which word occurs
public void editInstance(org.w3c.dom.Element instance,
java.lang.String xpath,
org.w3c.dom.Node container,
java.lang.String lang,
ContentRenderPane content,
boolean preselected,
boolean clearFilter)
instance - instance element in termlistxpath - XPath expressioncontainer - container in documentlang - language code as per ISO 639content - content pane in which word occurspreselected - instance is already selected in termSelectorclearFilter - should any active filter be cleared?public void multipleSelectionMode(int[] indices)
ContentRenderPane, but there is
no SaturationMeter.indices - selected indicespublic boolean termsLoaded()
protected org.w3c.dom.Node addTermToDOM(java.lang.String name,
int parts,
java.lang.String translation,
java.lang.String lang)
name - termparts - number of partstranslation - translation(s)lang - language code as per ISO 639public void textsUpdated(TextUpdateEvent evt)
TextUpdateListener interface.textsUpdated in interface TextUpdateListenerpublic void showEditor()
public void showInstances()
public void showOther()
public void showSelectedInstanceInContext()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic void filterTermList()
public void clearFilter()
public void copyTerm()
public void valueChanged(javax.swing.event.ListSelectionEvent evt)
ListSelectionListener interface.valueChanged in interface javax.swing.event.ListSelectionListenerpublic void saturationChanged(SaturationEvent evt)
SaturationListener interface.saturationChanged in interface SaturationListenerpublic void seedTermList(java.lang.String loc)
loc - URL sourcepublic void setTermSelectorLanguage(java.lang.String lang)
lang - language code as per ISO 639public void refreshTermList()
public boolean editInProgress()
public void setEditInProgress(boolean value)
value - true if an edit is currently in progress
public boolean addClickedWord(java.lang.String word,
int num,
java.lang.String xpath,
java.lang.String lang)
ContentRenderPane to the
list of parts that constitute a full instance of a term. Each term
expects a certain number of parts; when that many parts have been
added, the term is considered saturated, and may be added to the
database.word - a variant form from the textnum - instance number of the variant relative to
containerxpath - XPath expressionlang - language code as per ISO 639protected void zapPart(int num)
num from the accumulated instance parts.num - part numberpublic boolean dropInParts(java.io.Reader reader)
reader - reader containing term instances in XML fragment
formpublic void initAddTermWidgets()
public void addTerm()
addInstance().addInstance(java.lang.String, int, java.lang.String, org.w3c.dom.Node, java.lang.String, ContentRenderPane)
protected void addTermToList(java.lang.String name,
int parts,
java.lang.String translation,
java.lang.String lang,
java.lang.String comments)
public void editTerm()
editInstance(org.w3c.dom.Element, java.lang.String, org.w3c.dom.Node, java.lang.String, ContentRenderPane, boolean, boolean)public void cancelEdit()
public void serialize(java.io.File file)
file - file to which XML is writtenpublic boolean isDirty()
public void setDirty(boolean value)
value - true if terms regarded as dirtypublic void redrawTerms()
public void dispose()
public boolean isFinished()
TermTool finishedpublic void cleanup()
public boolean serverMode()
public org.w3c.dom.Document getDocument()
public void view()
public void setAvailableLangs()
public java.lang.String getSelectedViewLang()
public void extendMorphology(java.lang.String variant,
java.lang.String basic,
java.lang.String lang)
public javax.swing.JList getTermSelector()
public org.w3c.dom.Document getTermList()
public void setSelectLang(java.lang.String lang)
selectLang.lang - value of selectLangpublic TermInfo getTermInfo(java.lang.String term)
TermInfoobject for a named term.term - term nameTermInfo objectpublic TermTool.LemmaChangeListener getLemmaChangeListener()
LemmaChangeListener.public boolean isInternalContentRenderPane(ContentRenderPane p)
ContentRenderPane is the internal
ContentRenderPane of the editor.ContentRenderPanepublic static void setDragInProgress(boolean value)
dragInProgress status.value - true if a drag is in progresspublic static boolean isDragInProgress()
TermTool is in progress.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||