|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--PTCommonUtil
Static class containing commonly used methods.
Usage:
PTCommonUtil.isDefined(myobject)
Field Summary | |
<static> <final> Object |
VERSION
|
Constructor Summary | |
PTCommonUtil
()
PTCommonUtil static object constructor |
Method Summary | |
<static> Object
|
copyObject(srcObj,destObj)
Returns a new object which is a copy of a given object. |
<static> Object
|
getCSSClassStyleProperty(className, propertyName)
Returns a style property value for a given CSS class and style property name. |
<static> Object
|
getCSSClassStyles(className)
Returns the style object for a given CSS class name. |
<static> Element
|
getElementById(id)
Wrapper for document.getElementById with performance improvements. |
<static> Number
|
getIEVersion()
Returns "dot" version of MSIE browser (eg. |
<static> Number
|
getNNVersion()
Returns "dot" version of NN browser (eg. |
<static> Object
|
getRelativePosition(childDiv,parentDiv,ignoreBorders)
Computes relative placement of child within parent. |
<static> Object
|
getRemoteStyleClassProperty(doc,className,attrName)
Retrieves an attribute's value from a style class in a specified document |
<static> Array
|
getScripts()
Retrieves an array of the scripts on a page |
<static> String
|
getServerFromURL(url)
Returns the machine name portion of a URL (eg. |
<static> Object
|
getStyleClass(className)
Retrieves a style class from the current document's stylesheets |
<static> Object
|
getStyleClassFromDocument(doc,className)
Retrieves a style class from a document's stylesheets |
<static> Object
|
getStyleClassProperty(className,attrName)
Retrieves an attribute's value from a style class in the current document |
<static> String
|
getValueForStyleAttribute(s,attr)
Parses a style string, examining it for a single attribute, and returns the value of that attribute if found |
<static> Boolean
|
isDefined(obj)
Tests an object to see if it is currently defined in memory |
<static> Hash
|
parseGet(url)
Parses a URL, returning the query string variables separated in to key/value pairs. |
<static> void
|
scrollDivIntoView(object,container)
Repositions the document vertically so that one object becomes visible within the scrolling area of another object. |
<static> Number
|
sortCaseInsensitive(aa,bb)
Sorts alphabetically, ignoring case |
<static> Number
|
sortForward(aa,bb)
Sorts in forward alpha order |
<static> Hash
|
sortHashByKeys(hash,preserveFirstKey,isCaseInsensitive,doReverseSort)
Sorts the objects in a hash by order of its keys |
<static> Number
|
sortNumeric(a,b)
Sorts using numeric comparators (instead of default alpha comparator) |
<static> Number
|
sortReverse(aa,bb)
Sorts in reverse alpha order |
<static> Number
|
sortReverseCaseInsensitive(aa,bb)
Sorts reverse-alphabetically, ignoring case |
<static> void
|
wait(ms)
Causes the browser to idle in complete thread-blocking inactivity for a specified number of milliseconds. |
Field Detail |
<static> <final> Object VERSION
Constructor Detail |
PTCommonUtil()
Method Detail |
<static> Object copyObject(srcObj,destObj)
srcObj
- the object to copy
destObj
- an existing object onto which the srcObj should be copied (optional)
<static> Object getCSSClassStyleProperty(className, propertyName)
className
- the name of the CSS class.
propertyName
- the name of the CSS style property
<static> Object getCSSClassStyles(className)
className
- the name of the CSS class.
<static> Element getElementById(id)
id
- id of element to retrieve (string)
<static> Number getIEVersion()
<static> Number getNNVersion()
<static> Object getRelativePosition(childDiv,parentDiv,ignoreBorders)
childDiv
- Inner object (DOM Object)
parentDiv
- Outer / bounding object (DOM Object)
ignoreBorders
- Whether or not to factor in border size (boolean)
<static> Object getRemoteStyleClassProperty(doc,className,attrName)
doc
- Document to read style class attribute value from (DOM Document)
className
- Name of class containing attribute (string)
attrName
- Name of attribute value to retrieve (string)
<static> Array getScripts()
<static> String getServerFromURL(url)
sURL
- URL to parse (string)
<static> Object getStyleClass(className)
className
- Name of class to fetch (string)
<static> Object getStyleClassFromDocument(doc,className)
doc
- Document to read style class from (DOM Document)
className
- Name of class to fetch (string)
<static> Object getStyleClassProperty(className,attrName)
className
- Name of class containing attribute (string)
attrName
- Name of attribute value to retrieve (string)
<static> String getValueForStyleAttribute(s,attr)
s
- Style string to examine (string)
attr
- Name of attribute (string)
<static> Boolean isDefined(obj)
obj
- object to test (Object)
<static> Hash parseGet(url)
url
- URL to parse for query information (string)
<static> void scrollDivIntoView(object,container)
object
- Object to scroll into view (DOM Object)
container
- Outer container of object [default = document.body] (DOM Object)
<static> Number sortCaseInsensitive(aa,bb)
aa
- one item (string)
bb
- another item (string)
<static> Number sortForward(aa,bb)
aa
- one item (string)
bb
- another item (string)
<static> Hash sortHashByKeys(hash,preserveFirstKey,isCaseInsensitive,doReverseSort)
hash
- Associative Array to sort (Array)
preserveFirstKey
- Option to keep first key in place while sorting all others (boolean)
isCaseInsensitive
- Option to ignore case during sort (boolean)
doReverseSort
- Option to sort in reverse order (boolean)
<static> Number sortNumeric(a,b)
a
- one item (number)
b
- another item (number)
<static> Number sortReverse(aa,bb)
aa
- one item (string)
bb
- another item (string)
<static> Number sortReverseCaseInsensitive(aa,bb)
aa
- one item (string)
bb
- another item (string)
<static> void wait(ms)
ms
- Number of milliseconds to idle (integer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |