| java.lang.Object net.mygwt.ui.client.MyDOM
MyDOM | public class MyDOM (Code) | | Provides additional static methods that allow you to manipulate the browser's
Document Object Model (DOM).
See Also: DOM |
Method Summary | |
public static void | addEventsSunk(Element elem, int event) Adds the event type to the element's sunk events. | public static void | addStyleName(Element elem, String style) Adds a style name to the element. | public static void | alignTo(Element elem, Element align, String pos, int[] offsets) Aligns the element with another element relative to the specified anchor
points. | native public static void | applyStyles(Element elem, String styles) Sets multiple style on the given element. | public static void | center(Element elem) Centers the element. | public static void | clip(Element elem) Clips overflow on the element. | public static Element | create(String html) Creates an element form the given markup. | native public static void | disable(Element elem) Disable the element. | native public static void | disableContextMenu(Element elem, boolean disable) Enables and disables the browsers default context menu for the specified
element.A circular reference will be created when disabling text selection.
Disabling should be cleared when the element is detached. | public static void | disableTextSelection(Element elem, boolean disable) Enables or disables text selection for the element. | native public static void | enable(Element elem) Enable the element. | native public static String | escapeHTML(String html) Removes script and javascript code from the given html markup. | native public static Element | findChild(String style, Element elem) Returns the first child with a matching style name. | public static Element | findParent(String style, Element elem, int maxDepth) Finds the first parent element with the given style name. | public static Element | findParentWithId(Element elem, int maxDepth) Finds the first parent element with an id. | public static Point | getAlignToXY(Element elem, Element align, String pos, int[] offsets) Returns the x,y coordinates to align this element with another element. | public static Point | getAnchorXY(Element elem, String anchor, boolean local) Returns the x,y coordinates specified by the anchor position on the
element.
Parameters: elem - the element Parameters: anchor - the specified anchor position (defaults to "c"). | native public static String | getAnyElementProperty(Element elem, String property) Gets any named property from an element, as a string. | native public static Element | getBody() Returns the body element. | native public static int | getBodyScrollLeft() Returns the body elements horizontal scroll. | native public static int | getBodyScrollTop() Return the body elements vertical scroll. | public static int | getBorderWidth(Element elem, int sides) Returns the total border width of the specified sides. | public static int | getBottom(Element elem, boolean local) Returns the bottom Y coordinate of the element (element Y position +
element height). | public static Rectangle | getBounds(Element elem) Returns the element's bounds. | public static Rectangle | getBounds(Element elem, boolean content) Returns the element's bounds. | public static int | getComputedHeight(Element elem) Returns either the offsetHeight or the height of this element based on it's
CSS height. | public static int | getComputedWidth(Element elem) Returns either the offsetWidth or the width of this element based on it's
CSS width. | public static int | getDecorationWidth(Element elem, int sides) Returns the total width of borders and padding for the specified sides. | native public static Element | getDocument() Returns the document element. | native public static Element | getHead() | public static int | getHeight(Element elem) Returns the element's offset height in pixels. | public static int | getHeight(Element elem, boolean contentHeight) Returns the element's height. | public static String | getId(Element elem) Returns the element's id. | public static int | getIntStyleAttribute(Element elem, String attr) Returns the element's style attribute value. | public static int | getLeft(Element elem) Returns the left X coordinate. | public static int | getPaddingWidth(Element elem, int sides) Returns the total padding width of the given sides. | public static Region | getRegion(Element elem) Returns the region of the given element. | public static int | getRight(Element elem, boolean local) Returns the right X coordinate of the element (element X position + element
width). | public static int | getScrollBarWidth() Returns the width of the scroll bar. | native public static int | getScrollHeight(Element elem) Returns the element's scroll height. | public static int | getScrollLeft(Element elem) Returns the element's horizontal scroll position. | public static int | getScrollTop(Element elem) Returns the element's vertical scroll position. | native public static int | getScrollWidth(Element elem) Returns the element's scroll width. | public static Size | getSize(Element elem) Returns the elements size. | public static String | getStyleName(Element elem) | public static Element | getSubChild(Element elem, int depth) Returns the element's sub child. | public static int | getTop(Element elem) Returns the top Y coordinate. | public static String | getUniqueID() Returns an unique id. | public static String | getValue(Element elem) Returns the the "value" attribute. | native public static Size | getViewportSize() Returns the viewports size. | public static int | getWidth(Element elem) Returns the element's offset width in pixels. | public static int | getWidth(Element elem, boolean contentWidth) Returns the element's width. | public static int | getX(Element elem) Gets the current X position of the element based on page coordinates. | public static Point | getXY(Element elem) Returns the current position of the element based on page coordinates. | public static int | getY(Element elem) Returns the current Y position of the element based on page coordinates. | public static int | getZIndex() Returns the current max z-index. | public static boolean | hasClass(Element elem, String className) Checks if the specified CSS class exists on this element's DOM node. | native static void | init() This function can be replaced to plugin an alternate function to handle XSS exploits. | native public static void | insertAfter(Element elem, Element after) Inserts this element after the passed element in the DOM. | native public static void | insertBefore(Element elem, Element before) Inserts the element before the passed element in the DOM. | public static boolean | isHScrollBarShowing(Element container) | public static boolean | isVScrollBarShowing(Element container) | public static boolean | isVisibility(Element elem) Returns true if the element is visible using the css
'visibiliy' attribute. | public static boolean | isVisible(Element elem) Checks whether the element is currently visible using both visibility and
display properties. | public static boolean | isVisibleBox() Determines if the visible box or content area is set when sizing elements. | public static void | makePositionable(Element elem) Makes an element positionable. | public static void | makePositionable(Element elem, boolean absolute) Makes an element positionable. | public static Point | offsetsTo(Element elem, Element to) Returns the offsets between two elements. | public static void | removeChildren(Element elem) Removes all the elements children. | public static void | removeFromParent(Element elem) Removes the element from it's parent. | public static void | removeStyleName(Element elem, String style) Removes a style name. | native public static void | scrollIntoView(Element elem, Element container, boolean hscroll) Scrolls the element into view. | public static void | setBorders(Element elem, boolean show) Adds or removes a border. | public static void | setBounds(Element elem, int x, int y, int width, int height) | public static void | setBounds(Element elem, int x, int y, int width, int height, boolean adjust) Sets the widgets size and location to the rectangular area specified by the
arguments. | public static void | setBounds(Element elem, Rectangle rect) Sets the elements size and location to the specified rectangle. | public static void | setBounds(Element elem, Rectangle rect, boolean adjust) Sets the widgets size and location to the specified rectangle. | public static void | setDoubleStyleAttribute(Element elem, String style, double value) Sets the elements style attribute. | native public static void | setFocus(Element elem, boolean focused) Sets the focus state of the element. | public static void | setHeight(Element elem, int height) Sets the element's height. | public static void | setHeight(Element elem, int height, boolean adjust) Sets the element's height. | native public static void | setInnerHTML(Element elem, String html) Sets the HTML contained within an element. | native public static void | setInnerHTML(Element elem, String html, boolean escape) Sets the HTML contained within an element. | public static void | setLeft(Element elem, int left) Sets the element's left position directly using CSS style (instead of
MyDOM.setX ). | public static void | setLeftTop(Element elem, int left, int top) Sets the element's left position directly using CSS style. | public static void | setLocation(Element elem, int x, int y) Sets the element position using page coordinates. | public static void | setScrollLeft(Element elem, int left) Sets the element's scroll left value. | public static void | setScrollTop(Element elem, int top) Sets the element's scroll top value. | public static void | setSize(Element elem, int width, int height) Set the size of the element. | public static void | setSize(Element elem, int width, int height, boolean adjust) Set the size of the element. | public static void | setStyleAttribute(Element elem, String attr, String value) Sets the element's style attribute. | public static void | setStyleName(Element elem, String style) Sets the element's style name. | public static void | setStyleName(Element elem, String style, boolean add) This convenience method adds or removes a style name for a given element. | public static void | setTop(Element elem, int top) Sets the element's top position directly using CSS style (instead of
MyDOM.setY ). | public static void | setValue(Element elem, String value) Sets the element's value property. | public static void | setVisibility(Element elem, boolean visible) Sets the elements css 'visibility' property. | public static void | setVisible(Element elem, boolean visible) Sets the element's css 'display' property. | public static void | setWidth(Element elem, int width) Sets the element's width. | public static void | setWidth(Element elem, int width, boolean adjust) Sets the element's width. | public static void | setX(Element elem, int x) Set the x position of the element. | public static void | setXY(Element elem, Point point) Sets the position of the element. | public static void | setY(Element elem, int y) Set the y position of an html element in page coordinates, regardless of
how the element is positioned. | public static void | setZIndex(Element elem, int index) Sets the element's z-index. | public static void | unwrap(Element wrapper, Element child, Rectangle bounds) Unwraps the child element. | public static void | unwrap(Element wrapper, Element child, Rectangle bounds, int index) Unwraps the child element. | public static Rectangle | wrap(Element elem, Element wrapper) Wraps the element with the specified wrapper. |
addEventsSunk | public static void addEventsSunk(Element elem, int event)(Code) | | Adds the event type to the element's sunk events.
Parameters: elem - the element Parameters: event - the events to add |
addStyleName | public static void addStyleName(Element elem, String style)(Code) | | Adds a style name to the element.
Parameters: elem - the element Parameters: style - the style to be added |
alignTo | public static void alignTo(Element elem, Element align, String pos, int[] offsets)(Code) | | Aligns the element with another element relative to the specified anchor
points. Two values from the table below should be passed separated by a
dash, the first value is used as the element's anchor point, and the second
value is used as the target's anchor point.
In addition to the anchor points, the position parameter also supports the
"?" character. If "?" is passed at the end of the position string, the
element will attempt to align as specified, but the position will be
adjusted to constrain to the viewport if necessary. Note that the element
being aligned might be swapped to align to a different position than that
specified in order to enforce the viewport constraints.
- Following are all of the supported anchor positions:
Value Description
----- -----------------------------
tl The top left corner (default)
t The center of the top edge
tr The top right corner
l The center of the left edge
c In the center of the element
r The center of the right edge
bl The bottom left corner
b The center of the bottom edge
br The bottom right corner
Parameters: elem - the element to be aligned Parameters: align - the element to align to Parameters: pos - the position to align to Parameters: offsets - the offsets or null |
applyStyles | native public static void applyStyles(Element elem, String styles)(Code) | | Sets multiple style on the given element.
Parameters: elem - the element Parameters: styles - the styles |
center | public static void center(Element elem)(Code) | | Centers the element.
Parameters: elem - the element |
clip | public static void clip(Element elem)(Code) | | Clips overflow on the element.
|
create | public static Element create(String html)(Code) | | Creates an element form the given markup.
Parameters: html - the markup the new element |
disable | native public static void disable(Element elem)(Code) | | Disable the element.
|
disableContextMenu | native public static void disableContextMenu(Element elem, boolean disable)(Code) | | Enables and disables the browsers default context menu for the specified
element.A circular reference will be created when disabling text selection.
Disabling should be cleared when the element is detached. See the
Component source for an example.
Parameters: elem - the element Parameters: disable - true to disable |
disableTextSelection | public static void disableTextSelection(Element elem, boolean disable)(Code) | | Enables or disables text selection for the element. A circular reference
will be created when disabling text selection. Disabling should be cleared
when the element is detached. See the Component source for
an example.
Parameters: elem - the element Parameters: disable - true to disable |
enable | native public static void enable(Element elem)(Code) | | Enable the element.
Parameters: elem - the element |
escapeHTML | native public static String escapeHTML(String html)(Code) | | Removes script and javascript code from the given html markup.
Parameters: html - the html the updated html |
findChild | native public static Element findChild(String style, Element elem)(Code) | | Returns the first child with a matching style name.
Parameters: style - the style Parameters: elem - the element the matching element or null |
findParent | public static Element findParent(String style, Element elem, int maxDepth)(Code) | | Finds the first parent element with the given style name.
Parameters: style - the style name Parameters: elem - the start element Parameters: maxDepth - the max amount of parent to search the matching element |
findParentWithId | public static Element findParentWithId(Element elem, int maxDepth)(Code) | | Finds the first parent element with an id.
Parameters: elem - the start element Parameters: maxDepth - the max amount of parent to search the matching element |
getAlignToXY | public static Point getAlignToXY(Element elem, Element align, String pos, int[] offsets)(Code) | | Returns the x,y coordinates to align this element with another element. See
MyDOM.alignTo for more info on the supported position values.
Parameters: elem - the align to be aligned Parameters: align - the element to align to Parameters: pos - the position, see alignTo Parameters: offsets - the optional offsets the the point |
getAnchorXY | public static Point getAnchorXY(Element elem, String anchor, boolean local)(Code) | | Returns the x,y coordinates specified by the anchor position on the
element.
Parameters: elem - the element Parameters: anchor - the specified anchor position (defaults to "c"). SeeMyDOM.alignTo for details on supported anchor positions. Parameters: local - true to get the local (elementtop/left-relative) anchor position instead of page coordinates the position |
getAnyElementProperty | native public static String getAnyElementProperty(Element elem, String property)(Code) | | Gets any named property from an element, as a string.
Parameters: elem - the element whose attribute is to be retrieved Parameters: property - the name of the property the property value |
getBody | native public static Element getBody()(Code) | | Returns the body element.
the body |
getBodyScrollLeft | native public static int getBodyScrollLeft()(Code) | | Returns the body elements horizontal scroll.
the scroll amount in pixels |
getBodyScrollTop | native public static int getBodyScrollTop()(Code) | | Return the body elements vertical scroll.
the scroll amount in pixels |
getBorderWidth | public static int getBorderWidth(Element elem, int sides)(Code) | | Returns the total border width of the specified sides.
Parameters: elem - the element Parameters: sides - can be any combination of LEFT, RIGHT, TOP, BOTTOM the width of the sides passed added together |
getBottom | public static int getBottom(Element elem, boolean local)(Code) | | Returns the bottom Y coordinate of the element (element Y position +
element height).
Parameters: elem - the element Parameters: local - true to get the local css position instead ofpage coordinate the bottom value |
getBounds | public static Rectangle getBounds(Element elem)(Code) | | Returns the element's bounds.
Parameters: elem - the element the elements bounds |
getBounds | public static Rectangle getBounds(Element elem, boolean content)(Code) | | Returns the element's bounds.
Parameters: elem - the element Parameters: content - true to adjust for box model issues the elements bounds |
getComputedHeight | public static int getComputedHeight(Element elem)(Code) | | Returns either the offsetHeight or the height of this element based on it's
CSS height.
Parameters: elem - the element the height |
getComputedWidth | public static int getComputedWidth(Element elem)(Code) | | Returns either the offsetWidth or the width of this element based on it's
CSS width.
Parameters: elem - the element the width |
getDecorationWidth | public static int getDecorationWidth(Element elem, int sides)(Code) | | Returns the total width of borders and padding for the specified sides.
Parameters: elem - the element Parameters: sides - can be any combination of LEFT, RIGHT, TOP, BOTTOM the width in pixels |
getDocument | native public static Element getDocument()(Code) | | Returns the document element.
the docuemnt |
getHead | native public static Element getHead()(Code) | | |
getHeight | public static int getHeight(Element elem)(Code) | | Returns the element's offset height in pixels. This is the total height of
the object, including decorations such as border, margin, and padding.
Parameters: elem - the element the element's offset height |
getHeight | public static int getHeight(Element elem, boolean contentHeight)(Code) | | Returns the element's height.
Parameters: elem - the element Parameters: contentHeight - true to get the height minus bordersand padding the element's height |
getId | public static String getId(Element elem)(Code) | | Returns the element's id.
Parameters: elem - the element the id |
getIntStyleAttribute | public static int getIntStyleAttribute(Element elem, String attr)(Code) | | Returns the element's style attribute value.
Parameters: elem - the element Parameters: attr - the attribute name the attribute value |
getLeft | public static int getLeft(Element elem)(Code) | | Returns the left X coordinate.
Parameters: elem - the element the left value |
getPaddingWidth | public static int getPaddingWidth(Element elem, int sides)(Code) | | Returns the total padding width of the given sides.
Parameters: elem - the element Parameters: sides - can be any combination of LEFT, RIGHT, TOP, BOTTOM the padding |
getRegion | public static Region getRegion(Element elem)(Code) | | Returns the region of the given element. The element must be part of the
DOM tree to have a region.
Parameters: elem - the element a region containing top, left, bottom, right |
getRight | public static int getRight(Element elem, boolean local)(Code) | | Returns the right X coordinate of the element (element X position + element
width).
Parameters: elem - the element Parameters: local - true to get the local css position instead ofpage coordinate the right value |
getScrollBarWidth | public static int getScrollBarWidth()(Code) | | Returns the width of the scroll bar.
the scroll bar width |
getScrollHeight | native public static int getScrollHeight(Element elem)(Code) | | Returns the element's scroll height.
Parameters: elem - the element the scroll height |
getScrollLeft | public static int getScrollLeft(Element elem)(Code) | | Returns the element's horizontal scroll position.
Parameters: elem - the element the scroll amount in pixels |
getScrollTop | public static int getScrollTop(Element elem)(Code) | | Returns the element's vertical scroll position.
Parameters: elem - the element the scroll amount in pixel |
getScrollWidth | native public static int getScrollWidth(Element elem)(Code) | | Returns the element's scroll width.
Parameters: elem - the element the scroll width |
getSize | public static Size getSize(Element elem)(Code) | | Returns the elements size.
Parameters: elem - the element the size |
getStyleName | public static String getStyleName(Element elem)(Code) | | |
getSubChild | public static Element getSubChild(Element elem, int depth)(Code) | | Returns the element's sub child.
Parameters: elem - the element Parameters: depth - the child node depth the child element |
getTop | public static int getTop(Element elem)(Code) | | Returns the top Y coordinate.
Parameters: elem - the element the top value |
getUniqueID | public static String getUniqueID()(Code) | | Returns an unique id.
the id |
getValue | public static String getValue(Element elem)(Code) | | Returns the the "value" attribute.
Parameters: elem - the element the value |
getViewportSize | native public static Size getViewportSize()(Code) | | Returns the viewports size.
the size |
getWidth | public static int getWidth(Element elem)(Code) | | Returns the element's offset width in pixels. This is the total width of
the element, including decorations such as border, margin, and padding.
Parameters: elem - the element the element's offset width |
getWidth | public static int getWidth(Element elem, boolean contentWidth)(Code) | | Returns the element's width.
Parameters: elem - the element Parameters: contentWidth - true to get the width minus borders andpadding the element's width |
getX | public static int getX(Element elem)(Code) | | Gets the current X position of the element based on page coordinates.
Element must be part of the DOM tree to have page coordinates.
Parameters: elem - the element the x coordinate |
getXY | public static Point getXY(Element elem)(Code) | | Returns the current position of the element based on page coordinates.
Element must be part of the DOM tree to have page coordinates.
Parameters: elem - the element the current location |
getY | public static int getY(Element elem)(Code) | | Returns the current Y position of the element based on page coordinates.
Element must be part of the DOM tree to have page coordinates.
Parameters: elem - the element the y coordinate |
getZIndex | public static int getZIndex()(Code) | | Returns the current max z-index.
the z-index |
hasClass | public static boolean hasClass(Element elem, String className)(Code) | | Checks if the specified CSS class exists on this element's DOM node.
Parameters: elem - the element Parameters: className - the CSS class to check for true if the class exists, else false |
init | native static void init()(Code) | | This function can be replaced to plugin an alternate function to handle XSS exploits.
|
insertAfter | native public static void insertAfter(Element elem, Element after)(Code) | | Inserts this element after the passed element in the DOM.
Parameters: elem - the element Parameters: after - the element to insert after |
insertBefore | native public static void insertBefore(Element elem, Element before)(Code) | | Inserts the element before the passed element in the DOM.
Parameters: elem - the element to be inserted Parameters: before - the element to insert before |
isHScrollBarShowing | public static boolean isHScrollBarShowing(Element container)(Code) | | Returns true if the horizontal scroll bar is present
Parameters: container - the container element the vertical scroll bar state |
isVScrollBarShowing | public static boolean isVScrollBarShowing(Element container)(Code) | | Returns true if the vertical scroll bar is present
Parameters: container - the container element the vertical scroll bar state |
isVisibility | public static boolean isVisibility(Element elem)(Code) | | Returns true if the element is visible using the css
'visibiliy' attribute.
Parameters: elem - the element the visible state |
isVisible | public static boolean isVisible(Element elem)(Code) | | Checks whether the element is currently visible using both visibility and
display properties.
true if the element is currently visible, elsefalse |
isVisibleBox | public static boolean isVisibleBox()(Code) | | Determines if the visible box or content area is set when sizing elements.
true for visible box sizing |
makePositionable | public static void makePositionable(Element elem)(Code) | | Makes an element positionable.
Parameters: elem - the element |
makePositionable | public static void makePositionable(Element elem, boolean absolute)(Code) | | Makes an element positionable.
Parameters: elem - the element Parameters: absolute - true to position absolute |
offsetsTo | public static Point offsetsTo(Element elem, Element to)(Code) | | Returns the offsets between two elements. Both element must be part of the
DOM tree and not have display:none to have page coordinates.
Parameters: elem - the element Parameters: to - the to element the xy page offsets |
removeChildren | public static void removeChildren(Element elem)(Code) | | Removes all the elements children.
Parameters: elem - the element |
removeFromParent | public static void removeFromParent(Element elem)(Code) | | Removes the element from it's parent.
Parameters: elem - the element |
removeStyleName | public static void removeStyleName(Element elem, String style)(Code) | | Removes a style name.
Parameters: elem - the element Parameters: style - the style to be removed |
scrollIntoView | native public static void scrollIntoView(Element elem, Element container, boolean hscroll)(Code) | | Scrolls the element into view.
Parameters: elem - the element to scroll Parameters: container - the container element Parameters: hscroll - false to disable horizontal scrolling. |
setBorders | public static void setBorders(Element elem, boolean show)(Code) | | Adds or removes a border. The style name 'my-border' is added to the widget
to display a border.
Parameters: elem - the element Parameters: show - the show state |
setBounds | public static void setBounds(Element elem, int x, int y, int width, int height)(Code) | | |
setBounds | public static void setBounds(Element elem, int x, int y, int width, int height, boolean adjust)(Code) | | Sets the widgets size and location to the rectangular area specified by the
arguments.
Parameters: elem - the element Parameters: x - the x coordinate Parameters: y - the y coordinate Parameters: width - the width Parameters: height - the height Parameters: adjust - true to adjust for box model issues |
setBounds | public static void setBounds(Element elem, Rectangle rect)(Code) | | Sets the elements size and location to the specified rectangle.
Parameters: elem - the element Parameters: rect - the rectangle |
setBounds | public static void setBounds(Element elem, Rectangle rect, boolean adjust)(Code) | | Sets the widgets size and location to the specified rectangle.
Parameters: elem - the element Parameters: adjust - true to adjust for box model issues Parameters: rect - the rectangle |
setDoubleStyleAttribute | public static void setDoubleStyleAttribute(Element elem, String style, double value)(Code) | | Sets the elements style attribute.
Parameters: elem - the element Parameters: style - the style Parameters: value - the new double value |
setFocus | native public static void setFocus(Element elem, boolean focused)(Code) | | Sets the focus state of the element.
Parameters: focused - the new focus state |
setHeight | public static void setHeight(Element elem, int height)(Code) | | Sets the element's height.
Parameters: elem - the element Parameters: height - the new height |
setHeight | public static void setHeight(Element elem, int height, boolean adjust)(Code) | | Sets the element's height.
Parameters: elem - the element Parameters: height - the new height Parameters: adjust - true to adjust for box model issue |
setInnerHTML | native public static void setInnerHTML(Element elem, String html)(Code) | | Sets the HTML contained within an element. The specified html will be
escaped for XSS exploits if
MyGWT.enableEscapeHTML(boolean) has
been enabled.
Parameters: elem - the element Parameters: html - the html |
setInnerHTML | native public static void setInnerHTML(Element elem, String html, boolean escape)(Code) | | Sets the HTML contained within an element. The specified html will be
escaped for XSS exploits if
MyGWT.enableEscapeHTML(boolean) has
been enabled.
Parameters: elem - the element Parameters: html - the html Parameters: escape - true to escape html for XSS exploits. |
setLeft | public static void setLeft(Element elem, int left)(Code) | | Sets the element's left position directly using CSS style (instead of
MyDOM.setX ).
Parameters: elem - the element Parameters: left - the left value |
setLeftTop | public static void setLeftTop(Element elem, int left, int top)(Code) | | Sets the element's left position directly using CSS style.
Parameters: elem - the element Parameters: left - the left value Parameters: top - the top value |
setLocation | public static void setLocation(Element elem, int x, int y)(Code) | | Sets the element position using page coordinates.
Parameters: elem - the element Parameters: x - the x coordinate value Parameters: y - the y coordinate value |
setScrollLeft | public static void setScrollLeft(Element elem, int left)(Code) | | Sets the element's scroll left value.
Parameters: elem - the element Parameters: left - the value |
setScrollTop | public static void setScrollTop(Element elem, int top)(Code) | | Sets the element's scroll top value.
Parameters: elem - the element Parameters: top - the value |
setSize | public static void setSize(Element elem, int width, int height)(Code) | | Set the size of the element. Values equal to My.DEFAULT are ignored.
Parameters: elem - the element Parameters: width - the new width Parameters: height - the new height |
setSize | public static void setSize(Element elem, int width, int height, boolean adjust)(Code) | | Set the size of the element. Values equal to My.DEFAULT are ignored.
Parameters: elem - the element Parameters: width - the new width Parameters: height - the new height Parameters: adjust - true to adjust for box model issues |
setStyleAttribute | public static void setStyleAttribute(Element elem, String attr, String value)(Code) | | Sets the element's style attribute.
Parameters: elem - the element Parameters: attr - the attribute Parameters: value - the value |
setStyleName | public static void setStyleName(Element elem, String style)(Code) | | Sets the element's style name.
Parameters: elem - the element Parameters: style - the style name |
setStyleName | public static void setStyleName(Element elem, String style, boolean add)(Code) | | This convenience method adds or removes a style name for a given element.
This method is typically used to add and remove secondary style names, but
it can be used to remove primary stylenames as well, but that is not
recommended.
Parameters: elem - the element whose style is to be modified Parameters: style - the secondary style name to be added or removed Parameters: add - true to add the given style, false to remove it |
setTop | public static void setTop(Element elem, int top)(Code) | | Sets the element's top position directly using CSS style (instead of
MyDOM.setY ).
Parameters: elem - the element Parameters: top - the top value |
setValue | public static void setValue(Element elem, String value)(Code) | | Sets the element's value property.
Parameters: elem - the element Parameters: value - the value |
setVisibility | public static void setVisibility(Element elem, boolean visible)(Code) | | Sets the elements css 'visibility' property. Behavior is different than
using the 'display' property.
Parameters: elem - the element Parameters: visible - true to show, false to hide |
setVisible | public static void setVisible(Element elem, boolean visible)(Code) | | Sets the element's css 'display' property.
Parameters: elem - the element Parameters: visible - true to show, false to hide |
setWidth | public static void setWidth(Element elem, int width)(Code) | | Sets the element's width.
Parameters: elem - the element Parameters: width - the new width value |
setWidth | public static void setWidth(Element elem, int width, boolean adjust)(Code) | | Sets the element's width.
Parameters: elem - the element Parameters: adjust - true to adjust for box model issues Parameters: width - the new width value |
setX | public static void setX(Element elem, int x)(Code) | | Set the x position of the element.
Parameters: elem - the element Parameters: x - the x coordinate |
setXY | public static void setXY(Element elem, Point point)(Code) | | Sets the position of the element.
Parameters: elem - the element Parameters: point - the position |
setY | public static void setY(Element elem, int y)(Code) | | Set the y position of an html element in page coordinates, regardless of
how the element is positioned. The element must be part of the DOM tree to
have page coordinates.
Parameters: elem - the element Parameters: y - the y coordinate |
setZIndex | public static void setZIndex(Element elem, int index)(Code) | | Sets the element's z-index.
Parameters: elem - the element Parameters: index - the z-index |
unwrap | public static void unwrap(Element wrapper, Element child, Rectangle bounds)(Code) | | Unwraps the child element.
Parameters: wrapper - the wrapper element Parameters: child - the child element Parameters: bounds - the size |
unwrap | public static void unwrap(Element wrapper, Element child, Rectangle bounds, int index)(Code) | | Unwraps the child element.
Parameters: wrapper - the wrapper element Parameters: child - the child element Parameters: bounds - the size Parameters: index - the insert location |
wrap | public static Rectangle wrap(Element elem, Element wrapper)(Code) | | Wraps the element with the specified wrapper. The wrapper will have the
same size and position of the element. The original bounds can be used to
'unwrap' the element.
Parameters: wrapper - the wrapper element the original bounds |
|
|