com.gargoylesoftware.htmlunit.javascript.host
Class BoxObject

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.BoxObject
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class BoxObject
extends SimpleScriptable

A JavaScript object for a BoxObject.

Version:
$Revision: 6701 $
Author:
Sam Hough
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
BoxObject()
          Creates a new instance.
BoxObject(HTMLElement element)
          Creates a new instance.
 
Method Summary
 HTMLElement jsxGet_element()
          Returns the element to which this box object corresponds.
 Object jsxGet_firstChild()
          Returns this box object's element's first child.
 int jsxGet_height()
          Returns the height of this box object's element, including padding, excluding margin and border.
 Object jsxGet_lastChild()
          Returns this box object's element's last child.
 Object jsxGet_nextSibling()
          Returns this box object's element's next sibling.
 Object jsxGet_previousSibling()
          Returns this box object's element's previous sibling.
 int jsxGet_screenX()
          Returns the screenX property.
 int jsxGet_screenY()
          Returns the screenY property.
 int jsxGet_width()
          Returns the width of this box object's element, including padding, excluding margin and border.
 int jsxGet_x()
          Returns the X position of this box object's element.
 int jsxGet_y()
          Returns the Y position of this box object's element.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxObject

public BoxObject()
Creates a new instance. JavaScript objects must have a default constructor.


BoxObject

public BoxObject(HTMLElement element)
Creates a new instance.

Parameters:
element - the element to which this box object corresponds
Method Detail

jsxGet_element

public HTMLElement jsxGet_element()
Returns the element to which this box object corresponds.

Returns:
the element to which this box object corresponds

jsxGet_firstChild

public Object jsxGet_firstChild()
Returns this box object's element's first child.

Returns:
this box object's element's first child

jsxGet_lastChild

public Object jsxGet_lastChild()
Returns this box object's element's last child.

Returns:
this box object's element's last child

jsxGet_nextSibling

public Object jsxGet_nextSibling()
Returns this box object's element's next sibling.

Returns:
this box object's element's next sibling

jsxGet_previousSibling

public Object jsxGet_previousSibling()
Returns this box object's element's previous sibling.

Returns:
this box object's element's previous sibling

jsxGet_x

public int jsxGet_x()
Returns the X position of this box object's element.

Returns:
the X position of this box object's element

jsxGet_y

public int jsxGet_y()
Returns the Y position of this box object's element.

Returns:
the Y position of this box object's element

jsxGet_screenX

public int jsxGet_screenX()
Returns the screenX property. Testing in FF2 suggests that this value is always the same as the value returned by the x property.

Returns:
the screenX property

jsxGet_screenY

public int jsxGet_screenY()
Returns the screenY property. Testing in FF2 suggests that this value is always equal to the value returned by the y property plus 121 (probably for the title bar, menu bar and toolbar).

Returns:
the screenY property

jsxGet_width

public int jsxGet_width()
Returns the width of this box object's element, including padding, excluding margin and border.

Returns:
the width of this box object's element, including padding, excluding margin and border

jsxGet_height

public int jsxGet_height()
Returns the height of this box object's element, including padding, excluding margin and border.

Returns:
the height of this box object's element, including padding, excluding margin and border


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.