partTableGlobal Class
Item Index
Methods
- grabExtension
- grabExtension
- part_addEntry
- part_changeDensity
- part_clickFocus
- part_conversion
- part_doDensityDrop
- part_fillGlobalDensity
- part_flipCheck
- part_getChildrenByTag
- part_grab
- part_grabInd
- part_insertDensityInput
- part_insertHollowInput
- part_insertMassDisplay
- part_insertMassInput
- part_insertVolumeDisplay
- part_makeDensityDiv
- part_makeDropButton
- part_makeMassElem
- part_makeUndropButton
- part_makeVolElem
- part_recieveData
- part_registerDown
- part_registerUp
- part_renderEntry
- part_renderXML
- part_sendData
- part_setupClickFocus
- part_setupHighlighting
- removeHollowInput
- unpart_doDensityDrop
Methods
grabExtension
-
theName
Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.
Parameters:
-
theName
StringThe file name to be processed
Returns:
the extension in the given file name. If no extension is found, the 'undefined' value is returned.
grabExtension
-
theName
Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.
Parameters:
-
theName
StringThe file name to be processed
Returns:
the extension in the given file name. If no extension is found, the 'undefined' value is returned.
part_addEntry
-
theEntry
Given a jQuery object representation of a part entry, inserts an html representation of that entry in the table
Parameters:
-
theEntry
JQuery ObjectThe jQuery object containing the representation of a table entry, as extracted from an XML document
Returns:
part_changeDensity
-
theButton
A function automatically called by button elements associated with sample densities. Will fill the associated density input box with the value associated with the inner text of the button.
Parameters:
-
theButton
HTML ElementThe button element that called this function
Returns:
part_clickFocus
()
Void
Makes it so that the table row associated with this call has its part model displayed
Returns:
part_conversion
-
theString
Accepts a string and outputs a part_conversion value for the string's described unit to the standard units of this application. If no suitable unit is identified in the string, the part_conversion value returned is 0.
Parameters:
-
theString
StringA string representation of the unit being looked up
Returns:
the unit part_conversion value
part_doDensityDrop
-
theButton
A function automatically called by button elements associated with accessing sample densities. Adds a div element containing several sample density options.
Parameters:
-
theButton
HTML ElementThe button element that called this function
Returns:
part_fillGlobalDensity
()
Void
Takes the value present in the global density input textbox and applies it to all parts currently in the table.
Returns:
part_flipCheck
-
theBox
A function automatically called by text box elements upon becoming checked/unchecked. Sets an internal value to indicate the checked state of the element.
Parameters:
-
theBox
HTML ElementThe checkbox element calling this function
Returns:
part_getChildrenByTag
-
theNode
-
tag
Given an HTML element and a string, returns a list containing all child elements of the given element with a tag equivalent to the given string
Parameters:
-
theNode
HTML ElementThe HTML element whose children are to be searched
-
tag
StringThe string to be used when searching for element children
Returns:
part_grab
-
theTree
-
theMember
Given a jQuery object and a string, returns the first child of the given element with a tag equivalent to the given string.
Parameters:
-
theTree
JQuery ObjectThe jQuery object whose child is to be returned
-
theMember
StringThe name of the tag being searched
Returns:
The first child with the given tag. If such a child does not exist, null is returned.
part_grabInd
-
theTree
-
theMember
-
theIndex
Given a jQuery object and an integer "N", returns the Nth child of the given element with the given tag.
Parameters:
-
theTree
JQuery ObjectThe jQuery object whose child is to be returned
-
theMember
StringThe name of the tag being searched
-
theIndex
StringThe ordinal of the matching child to be returned
Returns:
The child meeting the tag and ordinal requirement. If such a child does not exist, null is returned.
part_insertDensityInput
-
theButton
A function automatically called by button elements associated with the density option in an entry's mass section when pressed. Changes the parent mass section to contain a text input element and a button allowing the user to switch over to mass input.
Parameters:
-
theButton
HTML ElementThe button that calls this function
Returns:
part_insertHollowInput
-
theButton
A function automatically called by button elements associated with the hollow option in an entry's volume section when pressed. Changes the parent volume section to contain a text input element and a button allowing the user to indicate the part is not hollow.
Parameters:
-
theButton
HTML ElementThe button that calls this function
Returns:
part_insertMassDisplay
-
theBox
A function automatically called by text input elements associated with the density option in an entry's mass section when changed. Changes the currently displayed mass to match the given density
Parameters:
-
theBox
HTML ElementThe text input element that calls this function
Returns:
part_insertMassInput
-
theButton
A function automatically called by button elements associated with the mass option in an entry's mass section when pressed. Changes the parent mass section to contain a text input element and a button allowing the user to switch over to density input.
Parameters:
-
theButton
HTML ElementThe button that calls this function
Returns:
part_insertVolumeDisplay
-
theBox
A function automatically called by text input elements associated with the hollow option in an entry's volume section when changed. Changes the currently displayed volume to match the given thickness
Parameters:
-
theBox
HTML ElementThe text input element that calls this function
Returns:
part_makeDensityDiv
()
HTML element
Returns a standard sample density dropdown menu
Returns:
a sample density dropdown menu
part_makeDropButton
()
HTML element
Returns a standard button for a density dropdown menu
Returns:
a standard density dropdown button
part_makeMassElem
()
HTML element
Returns a blank mass input element for use in the table
Returns:
a blank mass input element
part_makeUndropButton
()
HTML element
Returns a standard button to remove a density dropdown element
Returns:
a standard density dropdown removal button
part_makeVolElem
()
HTML element
Returns a blank volume input element for use in the table
Returns:
a blank volume input element
part_recieveData
-
theXMLText
Given the contents of a part table XML file (as a string), fills out the table in the web page.
Parameters:
-
theXMLText
StringThe contents of a part table
Returns:
part_registerDown
-
e
Accepts a key press event and, if the key press corresponds to one of the keys used for manipulating the view, sets the proper components of "inputState" to true.
Parameters:
-
e
EventThe key down event to be supplied to the function by a key down event listener on the web page
Returns:
part_registerUp
-
e
Accepts a key press release and, if the key release corresponds to one of the keys used for manipulating the view, sets the proper components of "inputState" to false
Parameters:
-
e
EventThe key up event to be supplied to the function by a key up event listener on the web page
Returns:
part_renderEntry
-
theCells
Given an html row element containing data regarding a part, converts the information into an xml formatted string and returns it
Parameters:
-
theCells
HTML ElementAn html row element containing information about a part
Returns:
XML representation of the table entry
part_renderXML
()
Void
Parses through each entry in the table and, if all entries are fully filled out, converts the table into an XML file and adds a download link for that file to the webpage
Returns:
part_sendData
-
theXMLText
Is called whenever the user submits the part table and every entry has been properly filled out.
Parameters:
-
theXMLText
StringThe contents of the part table in the webpage, as a string in XML formatting
Returns:
part_setupClickFocus
()
Void
Sets up every table entry HTML element with the focus function as its "onclick" attribute
Returns:
part_setupHighlighting
()
Void
Sets up every table entry HTML element with color highlighting
Returns:
removeHollowInput
-
theButton
A function automatically called by button elements associated with the hollow option in an entry's volume section when pressed. Changes the parent volume section to contain only a mass value and a button allowing the user to indicate the part is hollow.
Parameters:
-
theButton
HTML ElementThe button that calls this function
Returns:
unpart_doDensityDrop
-
theButton
A function automatically called by button elements associated with accessing sample densities. Removes the sample density option div element.
Parameters:
-
theButton
HTML ElementThe button element that called this function