Method Summary |
|
public static void | addEventPreview(EventPreview preview) Adds an event preview to the preview stack. |
public static void | appendChild(Element parent, Element child) Appends one element to another's list of children. |
public static boolean | compare(Element elem1, Element elem2) Compares two elements for equality (note that reference equality is not
sufficient to determine equality among elements on most browsers). |
public static Element | createAnchor() Creates an HTML A element. |
public static Element | createButton() Creates an HTML BUTTON element. |
public static Element | createCaption() Creates an HTML CAPTION element. |
public static Element | createCol() Creates an HTML COL element. |
public static Element | createColGroup() Creates an HTML COLGROUP element. |
public static Element | createDiv() Creates an HTML DIV element. |
public static Element | createElement(String tagName) Creates an HTML element. |
public static Element | createFieldSet() Creates an HTML FIELDSET element. |
public static Element | createForm() Creates an HTML FORM element. |
public static Element | createIFrame() Creates an HTML IFRAME element. |
public static Element | createImg() Creates an HTML IMG element. |
public static Element | createInputCheck() Creates an HTML INPUT type='CHECK' element. |
public static Element | createInputPassword() Creates an HTML INPUT type='PASSWORD' element. |
public static Element | createInputRadio(String name) Creates an HTML INPUT type='RADIO' element. |
public static Element | createInputText() Creates an HTML INPUT type='TEXT' element. |
public static Element | createLabel() Creates an HTML LABEL element. |
public static Element | createLegend() Creates an HTML LEGEND element. |
public static Element | createOptions() Creates an HTML OPTIONS element. |
public static Element | createSelect() Creates a single-selection HTML SELECT element. |
public static Element | createSelect(boolean multiple) Creates an HTML SELECT element. |
public static Element | createSpan() Creates an HTML SPAN element. |
public static Element | createTBody() Creates an HTML TBODY element. |
public static Element | createTD() Creates an HTML TD element. |
public static Element | createTFoot() Creates an HTML TFOOT element. |
public static Element | createTH() Creates an HTML TH element. |
public static Element | createTHead() Creates an HTML THEAD element. |
public static Element | createTR() Creates an HTML TR element. |
public static Element | createTable() Creates an HTML TABLE element. |
public static Element | createTextArea() Creates an HTML TEXTAREA element. |
static void | dispatchEvent(Event evt, Element elem, EventListener listener) This method is called directly by native code when any event is fired. |
public static void | eventCancelBubble(Event evt, boolean cancel) Cancels bubbling for the given event. |
public static boolean | eventGetAltKey(Event evt) Gets whether the ALT key was depressed when the given event occurred. |
public static int | eventGetButton(Event evt) Gets the mouse buttons that were depressed when the given event occurred. |
public static int | eventGetClientX(Event evt) Gets the mouse x-position within the browser window's client area. |
public static int | eventGetClientY(Event evt) Gets the mouse y-position within the browser window's client area. |
public static boolean | eventGetCtrlKey(Event evt) Gets whether the CTRL key was depressed when the given event occurred. |
public static Event | eventGetCurrentEvent() Gets the current event that is being fired. |
public static Element | eventGetCurrentTarget(Event evt) Gets the current target element of the given event. |
public static Element | eventGetFromElement(Event evt) Gets the element from which the mouse pointer was moved (only valid for
Event.ONMOUSEOVER ). |
public static int | eventGetKeyCode(Event evt) Gets the key code associated with this event.
For
Event.ONKEYPRESS , this method returns the Unicode value of the
character generated. |
public static boolean | eventGetMetaKey(Event evt) Gets whether the META key was depressed when the given event occurred. |
public static int | eventGetMouseWheelVelocityY(Event evt) Gets the velocity of the mouse wheel associated with the event along the Y
axis.
The velocity of the event is an artifical measurement for relative
comparisons of wheel activity. |
public static boolean | eventGetRepeat(Event evt) Gets the key-repeat state of this event. |
public static int | eventGetScreenX(Event evt) Gets the mouse x-position on the user's display. |
public static int | eventGetScreenY(Event evt) Gets the mouse y-position on the user's display. |
public static boolean | eventGetShiftKey(Event evt) Gets whether the shift key was depressed when the given event occurred. |
public static Element | eventGetTarget(Event evt) Returns the element that was the actual target of the given event. |
public static Element | eventGetToElement(Event evt) Gets the element to which the mouse pointer was moved (only valid for
Event.ONMOUSEOUT ). |
public static int | eventGetType(Event evt) Gets the enumerated type of this event (as defined in
Event ). |
public static String | eventGetTypeString(Event evt) Gets the type of the given event as a string. |
public static void | eventPreventDefault(Event evt) Prevents the browser from taking its default action for the given event. |
public static void | eventSetKeyCode(Event evt, char key) Sets the key code associated with the given keyboard event. |
public static String | eventToString(Event evt) Returns a stringized version of the event. |
public static int | getAbsoluteLeft(Element elem) Gets an element's absolute left coordinate in the document's coordinate
system. |
public static int | getAbsoluteTop(Element elem) Gets an element's absolute top coordinate in the document's coordinate
system. |
public static String | getAttribute(Element elem, String attr) Gets any named attribute from an element, as a string. |
public static boolean | getBooleanAttribute(Element elem, String attr) Gets a boolean attribute on the given element. |
public static Element | getCaptureElement() Gets the element that currently has mouse capture. |
public static Element | getChild(Element parent, int index) Gets an element's n-th child element. |
public static int | getChildCount(Element parent) Gets the number of child elements present in a given parent element. |
public static int | getChildIndex(Element parent, Element child) Gets the index of a given child element within its parent. |
public static String | getElementAttribute(Element elem, String attr) Gets the named attribute from the element. |
public static Element | getElementById(String id) Gets the element associated with the given unique id within the entire
document. |
public static String | getElementProperty(Element elem, String prop) Gets any named property from an element, as a string. |
public static boolean | getElementPropertyBoolean(Element elem, String prop) Gets any named property from an element, as a boolean. |
public static int | getElementPropertyInt(Element elem, String prop) Gets any named property from an element, as an int. |
public static int | getEventsSunk(Element elem) Gets the current set of events sunk by a given element. |
public static Element | getFirstChild(Element elem) Gets the first child element of the given element. |
public static String | getImgSrc(Element img) Gets the src attribute of an img element. |
public static String | getInnerHTML(Element elem) Gets an HTML representation of an element's children. |
public static String | getInnerText(Element elem) Gets the text contained within an element. |
public static int | getIntAttribute(Element elem, String attr) Gets an integer attribute on a given element. |
public static int | getIntStyleAttribute(Element elem, String attr) Gets an integer attribute on a given element's style. |
public static Element | getNextSibling(Element elem) Gets an element's next sibling element. |
public static Element | getParent(Element elem) Gets an element's parent element. |
public static String | getStyleAttribute(Element elem, String attr) Gets an attribute of the given element's style. |
public static void | insertBefore(Element parent, Element child, Element before) Inserts an element as a child of the given parent element, before another
child of that parent. |
public static void | insertChild(Element parent, Element child, int index) Inserts an element as a child of the given parent element. |
public static void | insertListItem(Element select, String item, String value, int index) Creates an <option> element and inserts it as a child
of the specified <select> element. |
public static boolean | isOrHasChild(Element parent, Element child) Determine whether one element is equal to, or the child of, another. |
static boolean | previewEvent(Event evt) This method is called directly by native code when event preview is being
used. |
public static void | releaseCapture(Element elem) Releases mouse capture on the given element. |
public static void | removeChild(Element parent, Element child) Removes a child element from the given parent element. |
public static void | removeElementAttribute(Element elem, String attr) Removes the named attribute from the given element. |
public static void | removeEventPreview(EventPreview preview) Removes an element from the preview stack. |
public static void | scrollIntoView(Element elem) Scrolls the given element into view.
This method crawls up the DOM hierarchy, adjusting the scrollLeft and
scrollTop properties of each scrollable element to ensure that the
specified element is completely in view. |
public static void | setAttribute(Element elem, String attr, String value) Sets an attribute on the given element. |
public static void | setBooleanAttribute(Element elem, String attr, boolean value) Sets a boolean attribute on the given element. |
public static void | setCapture(Element elem) Sets mouse-capture on the given element. |
public static void | setElementAttribute(Element elem, String attr, String value) Sets an attribute on a given element. |
public static void | setElementProperty(Element elem, String prop, String value) Sets a property on the given element. |
public static void | setElementPropertyBoolean(Element elem, String prop, boolean value) Sets a boolean property on the given element. |
public static void | setElementPropertyInt(Element elem, String prop, int value) Sets an int property on the given element. |
public static void | setEventListener(Element elem, EventListener listener) Sets the
EventListener to receive events for the given element. |
public static void | setImgSrc(Element img, String src) Sets the src attribute of an img element. |
public static void | setInnerHTML(Element elem, String html) Sets the HTML contained within an element. |
public static void | setInnerText(Element elem, String text) Sets the text contained within an element. |
public static void | setIntAttribute(Element elem, String attr, int value) Sets an integer attribute on the given element. |
public static void | setIntStyleAttribute(Element elem, String attr, int value) Sets an integer attribute on the given element's style. |
public static void | setOptionText(Element select, String text, int index) Sets the option text of the given select object. |
public static void | setStyleAttribute(Element elem, String attr, String value) Sets an attribute on the given element's style. |
public static void | sinkEvents(Element elem, int eventBits) Sets the current set of events sunk by a given element. |
public static String | toString(Element elem) Returns a stringized version of the element. |
public static int | windowGetClientHeight() Gets the height of the browser window's client area excluding the scroll
bar. |
public static int | windowGetClientWidth() Gets the width of the browser window's client area excluding the vertical
scroll bar. |