Class Index | File Index

Classes


Class doubletree.DoubleTree

doubletree.DoubleTree This is the class for the DoubleTree visualization
Defined in: DoubleTree.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
doubletree.DoubleTree.basicStyles(stylesObj)
Getter/setter for the styles of the nodes and branches.
<static>  
doubletree.DoubleTree.clearSearch()
clear the visualization of the search results

the CSS class foundText is removed

<static>  
doubletree.DoubleTree.continuationColor(value)
Getter/setter for the function determining the color of the text of the nodes that are continuations of the clicked node.
<static>  
doubletree.DoubleTree.filteredIDs()
<static>  
doubletree.DoubleTree.filters(value)
Getter/setter for the filter functions.
<static>  
doubletree.DoubleTree.handlers(value)
Getter/setter for the handlers for alt-click and shift-click on the nodes.
<static>  
doubletree.DoubleTree.init(containerPattern)
initialize the visualization in one or more html containers

<static>  
doubletree.DoubleTree.nodeText(the)
Getter/setter for the function determining the content of the node labels.
<static>  
doubletree.DoubleTree.prefixesOnRight(value)
Getter/setter for whether the prefixes are displayed on the right or the left.
<static>  
doubletree.DoubleTree.rectBorderColor(value)
Getter/setter for the function determining the color of the borders of the background rectangles for the nodes.
<static>  
doubletree.DoubleTree.rectColor(value)
Getter/setter for the function determining the color of the background rectangles for the nodes.
<static>  
doubletree.DoubleTree.redraw()
redraw the visualization
<static>  
doubletree.DoubleTree.scaleLabels(value)
Getter/setter for scaling the node labels by their frequency.
<static>  
doubletree.DoubleTree.search(searchRE)
search the nodes of the visualization for a pattern

The found nodes will get the CSS class foundText

<static>  
doubletree.DoubleTree.setupFromArrays(prefixArray, hitArray, suffixArray, idArray, caseSensitive, fieldNames, fieldDelim, distinguishingFieldsArray, prefixesOnRight)
set up the visualization from arrays corresponding to the hit, the prefix, and the suffix of a key word in context result.
<static>  
doubletree.DoubleTree.setupFromTries(leftOne, rtOne)
set up the visualization using 2 doubletree.Tries
<static>  
doubletree.DoubleTree.showTokenExtra(value)
Getter/setter for showing/hiding extra information associated with the main value, e.g.
<static>  
doubletree.DoubleTree.sortFun(the)
Getter/setter for the function determining the sort order of sibling nodes.
<static>  
doubletree.DoubleTree.succeeded()
Reports whether the DoubleTree was constructed successfully

<static>  
doubletree.DoubleTree.tokenExtraText(the)
Getter/setter for the function determining the content of the "extra" information for the labels labels

The function gets an information object as its first argument and a boolean indicating whether the node is the root or not as its second argument.

<static>  
doubletree.DoubleTree.updateTokenExtras()
update the showing/hiding of extra information associated with the basic item, e.g.
<static>  
doubletree.DoubleTree.visWidth(value)
Getter/setter for the maximum width of the DoubleTree area
Class Detail
doubletree.DoubleTree()
Method Detail
<static> doubletree.DoubleTree.basicStyles(stylesObj)
Getter/setter for the styles of the nodes and branches. For now these are constant throughout the tree. Takes an object of the form: {"node":{"fill":cssColor, "stroke":cssColor, "stroke-width":cssWidth}, "branch":{"stroke":cssColor, "stroke-width":cssWidth}} All of the attributes are optional Defaults are: {"node":{"fill":"white", "stroke":"steelblue", "stroke-width":"1.5px"}, "branch":{"stroke":"#777", "stroke-width":"1.5px"}};
Parameters:
stylesObj

<static> doubletree.DoubleTree.clearSearch()
clear the visualization of the search results

the CSS class foundText is removed


<static> doubletree.DoubleTree.continuationColor(value)
Getter/setter for the function determining the color of the text of the nodes that are continuations of the clicked node.

The function gets an information object as its argument, and should return a CSS color in a string, e.g. "rgba(255,128,0,0.5)" The default is transparent white (i.e., effectively no color);

Parameters:
value
the border color function

<static> doubletree.DoubleTree.filteredIDs()
Returns:
just the ids of the data that satisfies the current filters

<static> doubletree.DoubleTree.filters(value)
Getter/setter for the filter functions.

The filter functions get an information object as their argument, and return true/false. Each position away from the root has its own filter, and the left and right sides also have their own filters. The filters are specified via an object with "left" and "right" keys whose values are arrays of functions The function at index i filters position i + 1 away from the root. Default is no filtering (via empty arrays)

Note: setting the filters does not redraw the visualization. See #redraw

Parameters:
value
an object containing the filters

<static> doubletree.DoubleTree.handlers(value)
Getter/setter for the handlers for alt-click and shift-click on the nodes.

The handlers get an information object as their argument. The handlers are specified via an object with "alt" and "shift" keys whose values are functions The default is no handlers, i.e. NO interaction

Parameters:
value
an object containing the handlers

<static> doubletree.DoubleTree.init(containerPattern)
initialize the visualization in one or more html containers

Parameters:
containerPattern
CSS selector for the containers

<static> doubletree.DoubleTree.nodeText(the)
Getter/setter for the function determining the content of the node labels.

The function gets an information object as its first argument and a boolean indicating whether the node is the root or not as its second argument. The function should return a string. The default is #tokenText

Parameters:
the
content function

<static> doubletree.DoubleTree.prefixesOnRight(value)
Getter/setter for whether the prefixes are displayed on the right or the left.

The default value is false, i.e. the prefixes are displayed on the left, as in English. prefixesOnRight should be set to true for right-to-left writing systems such as Arabic, Hebrew, N'Ko, etc.

Parameters:
value
true or false

<static> doubletree.DoubleTree.rectBorderColor(value)
Getter/setter for the function determining the color of the borders of the background rectangles for the nodes.

The function gets an information object as its argument, and should return a CSS color in a string, e.g. "rgba(255,128,0,0.5)" The default is transparent white (i.e., effectively no color);

Parameters:
value
the border color function

<static> doubletree.DoubleTree.rectColor(value)
Getter/setter for the function determining the color of the background rectangles for the nodes.

The function gets an information object as its argument, and should return a CSS color in a string, e.g. "rgba(255,128,0,0.5)" The default is transparent white (i.e., effectively no color);

Parameters:
value
the background color function

<static> doubletree.DoubleTree.redraw()
redraw the visualization

<static> doubletree.DoubleTree.scaleLabels(value)
Getter/setter for scaling the node labels by their frequency.

Default is true

Parameters:
value
a boolean specifying whether to scale the labels or not

<static> doubletree.DoubleTree.search(searchRE)
search the nodes of the visualization for a pattern

The found nodes will get the CSS class foundText

Parameters:
searchRE
the regular expression to look for
Returns:
how many nodes were found

<static> doubletree.DoubleTree.setupFromArrays(prefixArray, hitArray, suffixArray, idArray, caseSensitive, fieldNames, fieldDelim, distinguishingFieldsArray, prefixesOnRight)
set up the visualization from arrays corresponding to the hit, the prefix, and the suffix of a key word in context result.

The ith elements should correspond with each other. Each item consists of fields separated by a field delimiter. For example we might have word/tag (with / as the delimiter) or word\tlemma\tauthor (with tab (\t) as the delimiter) Only certain fields are relevant for deciding whether two items are to be considered the same (e.g. we might ignore an author field)

Parameters:
prefixArray
the array of arrays of the prefixes of the hits
hitArray
the array of the hits
suffixArray
the array of arrays of the suffixes of the hits
idArray
the array of ids of the hits (or null, if there are no ids for the hits)
caseSensitive
are the hits case sensitive
fieldNames
the names of the fields
fieldDelim
the field delimiter
distinguishingFieldsArray
the fields that determine identity
prefixesOnRight
display the prefixes on the right, for right-to-left writing systems. Default is false

<static> doubletree.DoubleTree.setupFromTries(leftOne, rtOne)
set up the visualization using 2 doubletree.Tries
Parameters:
leftOne
the left doubletree.Trie
rtOne
the right doubletree.Trie

<static> doubletree.DoubleTree.showTokenExtra(value)
Getter/setter for showing/hiding extra information associated with the main value, e.g. part of speech information.

Note: setting this value does not redraw the visualization. See #redraw Default is true

Parameters:
value
a boolean specifying whether to show the information or not

<static> doubletree.DoubleTree.sortFun(the)
Getter/setter for the function determining the sort order of sibling nodes.

The function gets an information object as its argument, and should return -1 for precedes, 1 for follows and 0 for don't care The nodes are displayed in "preceding" (i.e. ascending) order, from top to bottom. The default is alphabetical by a "token" field if there is one: doubletree.sortByStrFld("token")

Parameters:
the
sort order function

<static> doubletree.DoubleTree.succeeded()
Reports whether the DoubleTree was constructed successfully

Returns:
true if the DoubleTree was constructed successfully and false otherwise

<static> doubletree.DoubleTree.tokenExtraText(the)
Getter/setter for the function determining the content of the "extra" information for the labels labels

The function gets an information object as its first argument and a boolean indicating whether the node is the root or not as its second argument. The function should return a string. The default is the POS field of the information object

Parameters:
the
content function

<static> doubletree.DoubleTree.updateTokenExtras()
update the showing/hiding of extra information associated with the basic item, e.g. part of speech information

Notes:


<static> doubletree.DoubleTree.visWidth(value)
Getter/setter for the maximum width of the DoubleTree area
Parameters:
value
the maximum width

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Oct 19 2015 19:21:49 GMT-0400 (EDT)