|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gwtext.client.core.JsObject
com.gwtext.client.core.BaseElement
com.gwtext.client.core.ExtElement
public class ExtElement
Field Summary |
---|
Fields inherited from class com.gwtext.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
protected |
ExtElement()
|
|
ExtElement(com.google.gwt.user.client.Element elem)
Create an ExtElement wrapper around en existing DOM Element. |
|
ExtElement(com.google.gwt.user.client.Element elem,
boolean forceNew)
Create an ExtElement wrapper around an existing DOM Element. |
|
ExtElement(com.google.gwt.core.client.JavaScriptObject jsObj)
Create an ExtElement using an existing native element. |
Method Summary | |
---|---|
ExtElement |
appendChild(com.google.gwt.user.client.Element child)
Appends the passed element to this element. |
ExtElement |
appendTo(com.google.gwt.user.client.Element el)
Appends this element to the passed element. |
ExtElement |
blur()
Tries to blur the element. |
ExtElement |
boxWrap()
Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow. |
ExtElement |
boxWrap(java.lang.String boxClass)
Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow. |
ExtElement |
center()
Centers the Element in the viewport. |
ExtElement |
center(com.google.gwt.user.client.Element centerIn)
Centers the Element in another Element. |
com.google.gwt.user.client.Element |
child(java.lang.String selector)
Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id). |
ExtElement |
clearPositioning()
Clear positioning back to the default when the document was loaded. |
ExtElement |
clearPositioning(Position value)
Clear positioning back to the default when the document was loaded |
boolean |
contains(com.google.gwt.user.client.Element el)
Whether this element is an ancestor of the passed element. |
ExtElement |
createChild(DomConfig config)
Creates the passed DomHelper config and appends it to this element |
ExtElement |
createChild(DomConfig config,
com.google.gwt.user.client.Element insertBefore)
Creates the passed DomHelper config and appends inserts it before the passed child element. |
ExtElement |
createProxy(DomConfig config)
Creates a proxy element of this element. |
ExtElement |
createProxy(DomConfig config,
com.google.gwt.user.client.Element renderTo,
boolean matchBox)
Creates a proxy element of this element. |
ExtElement |
createProxy(java.lang.String cls)
Creates a proxy element of this element. |
ExtElement |
createProxy(java.lang.String cls,
com.google.gwt.user.client.Element renderTo,
boolean matchBox)
Creates a proxy element of this element. |
com.google.gwt.user.client.Element |
down(java.lang.String selector)
Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id). |
com.google.gwt.user.client.Element |
findParent(java.lang.String selector)
Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. |
com.google.gwt.user.client.Element |
findParent(java.lang.String selector,
com.google.gwt.user.client.Element container)
Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. |
com.google.gwt.user.client.Element |
findParent(java.lang.String selector,
int maxDepth)
Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. |
com.google.gwt.user.client.Element |
findParentNode(java.lang.String selector,
com.google.gwt.user.client.Element container)
Looks at parent nodes for a match of the passed simple selector (e.g. |
com.google.gwt.user.client.Element |
findParentNode(java.lang.String selector,
int maxDepth)
Looks at parent nodes for a match of the passed simple selector (e.g. |
static ExtElement |
fly(java.lang.String id)
Gets the globally shared flyweight Element, with the passed node as the active element. |
static ExtElement |
fly(java.lang.String id,
java.lang.String named)
Gets the globally shared flyweight ExtElement, with the passed node as the active element. |
ExtElement |
focus()
Tries to focus the element. |
static ExtElement |
get(java.lang.String id)
Static method to retrieve ExtElement objects. |
int[] |
getAlignToXY(com.google.gwt.user.client.Element element,
java.lang.String anchorPosition)
Gets the x,y coordinates to align this element with another element. |
int[] |
getAlignToXY(com.google.gwt.user.client.Element element,
java.lang.String anchorPosition,
int[] offesets)
Gets the x,y coordinates to align this element with another element. |
int[] |
getAnchorXY()
Gets the x,y coordinates specified by the anchor position on the element. |
int[] |
getAnchorXY(java.lang.String anchorPosition,
boolean local,
int width,
int height)
Gets the x,y coordinates specified by the anchor position on the element. |
java.lang.String |
getAttributeNS(java.lang.String namespace,
java.lang.String name)
Returns the value of a namespaced attribute from the element's underlying DOM node. |
int |
getBorderWidth(Side side)
Gets the width of the border for the specified side. |
int |
getBottom(boolean local)
Gets the bottom Y coordinate of the element (element Y position + element height) |
Box |
getBox()
Return a Box that can be used to set another elements size/location to match this element. |
Box |
getBox(boolean contentBox,
boolean local)
Return a Box that can be used to set another elements size/location to match this element. |
int[] |
getCenterXY()
Calculates the x, y to center this element on the screen |
int |
getClientWidth()
Return the client width of the element. |
java.lang.String |
getColor(java.lang.String attr,
java.lang.String defaultValue)
Return the CSS color for the specified CSS attribute. |
java.lang.String |
getColor(java.lang.String attr,
java.lang.String defaultValue,
java.lang.String prefix)
Return the CSS color for the specified CSS attribute. |
int |
getComputedHeight()
Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders when needed to simulate offsetHeight when offsets aren't available. |
int |
getComputedWidth()
Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders when needed to simulate offsetWidth when offsets aren't available. |
com.google.gwt.user.client.Element |
getDOM()
Retursn the underlying DOM Element. |
com.google.gwt.user.client.Element |
getFirstChild()
Return the first child of this element. |
int |
getFrameWidth(Side side)
Returns the sum width of the padding and borders for the passed side. |
int |
getHeight()
Returns the offset height of the element. |
int |
getHeight(boolean contentHeight)
Returns the offset height of the element. |
int |
getLeft()
Gets the left X coordinate |
int |
getLeft(boolean local)
Gets the left X coordinate. |
Margins |
getMargins()
Returns the margins of this element. |
int |
getPadding(Side side)
Gets the width of the padding for the specified side. |
com.google.gwt.user.client.Element |
getParentNode()
Return the parent node of this element, |
PositioningConfig |
getPositioning()
Gets a PositioningConfig object with all CSS positioning properties. |
Region |
getRegion()
Returns the region of the given element. |
int[] |
getScroll()
Returns the current scroll position of the element. |
Size |
getSize()
Returns the size of the element.. |
java.lang.String |
getStyle(java.lang.String property)
Normalizes currentStyle and computedStyle. |
int |
getTop()
Returns the top Y coordinate. |
int |
getTop(boolean local)
Returns the top Y coordinate. |
UpdateManager |
getUpdateManager()
Gets this element's UpdateManager . |
java.lang.String |
getValue()
Returns the value of the "value" attribute |
float |
getValueAsNumber()
Returns the value of the "value" attribute as a number. |
Size |
getViewSize()
Returns the width and height of the viewport. |
int |
getWidth()
Returns the offset width of the element. |
int |
getWidth(boolean contentWidth)
Returns the offset width of the element. |
int |
getX()
Gets the current X position of the element based on page coordinates. |
int[] |
getXY()
Gets the current position of the element based on page coordinates. |
int |
getY()
Gets the current Y position of the element based on page coordinates. |
boolean |
hasClass(java.lang.String className)
Checks if the specified CSS class exists on this element's DOM node. |
ExtElement |
insertAfter(com.google.gwt.user.client.Element el)
Inserts this element after the passed element in the DOM. |
ExtElement |
insertBefore(com.google.gwt.user.client.Element el)
Inserts this element before the passed element in the DOM. |
ExtElement |
insertFirst(DomConfig config)
Creates an element as the first child of the this element. |
ExtElement |
insertFirst(com.google.gwt.user.client.Element el)
Inserts an element as the first child of the this element. |
com.google.gwt.user.client.Element |
insertHtmlAfterBegin(java.lang.String html)
Inserts an html fragment into this element. |
com.google.gwt.user.client.Element |
insertHtmlAfterEnd(java.lang.String html)
Inserts an html fragment into this element. |
com.google.gwt.user.client.Element |
insertHtmlBeforeBegin(java.lang.String html)
Inserts an html fragment into this element. |
com.google.gwt.user.client.Element |
insertHtmlBeforeEnd(java.lang.String html)
Inserts an html fragment into this element. |
com.google.gwt.user.client.Element |
insertSibling(DomConfig config)
Created the passed DomHelper config as a sibling of this element. |
ExtElement |
insertSibling(DomConfig config,
boolean before)
Created the passed DomHelper config as a sibling of this element. |
com.google.gwt.user.client.Element |
insertSibling(com.google.gwt.user.client.Element el)
Inserts the passed element as a sibling of this element. |
ExtElement |
insertSibling(com.google.gwt.user.client.Element el,
boolean before)
Inserts the passed element as a sibling of this element. |
boolean |
is(java.lang.String selector)
Returns true if this element matches the passed simple selector (e.g. |
boolean |
isBorderBox()
Tests various css rules/browsers to determine if this element uses a border box |
boolean |
isDisplayed()
Returns true if display is not "none". |
boolean |
isMasked()
Returns true if this element is masked. |
boolean |
isScrollable()
Returns true if this element is scrollable. |
boolean |
isVisible()
Checks whether the element is currently visible using both visibility and display properties. |
boolean |
isVisible(boolean deep)
Checks whether the element is currently visible using both visibility and display properties. |
ExtElement |
mask()
Puts a mask over this element to disable user interaction. |
ExtElement |
mask(java.lang.String msg)
Puts a mask over this element to disable user interaction. |
ExtElement |
mask(java.lang.String msg,
boolean animatedIcon)
Puts a mask over this element to disable user interaction. |
ExtElement |
mask(java.lang.String msg,
java.lang.String msgClass)
Puts a mask over this element to disable user interaction. |
com.google.gwt.user.client.Element |
next()
Gets the next sibling, skipping text nodes. |
com.google.gwt.user.client.Element |
next(java.lang.String selector)
Gets the next sibling, skipping text nodes. |
void |
position()
Initializes positioning on this element. |
void |
position(Positioning pos,
int zIndex,
int x,
int y)
Initializes positioning on this element. |
com.google.gwt.user.client.Element |
prev()
Gets the previous sibling, skipping text nodes. |
com.google.gwt.user.client.Element |
prev(java.lang.String selector)
Gets the previous sibling, skipping text nodes. |
com.google.gwt.user.client.Element[] |
query(java.lang.String selector)
Selects child nodes based on the passed CSS selector (the selector should not contain an id). |
void |
removeChild(com.google.gwt.user.client.Element child)
Remove the specified child. |
ExtElement |
replace(com.google.gwt.user.client.Element el)
Replaces the passed element with this element. |
ExtElement |
scrollIntoView()
Scrolls this element into view within the passed container. |
ExtElement |
scrollIntoView(com.google.gwt.user.client.Element container,
boolean hscroll)
Scrolls this element into view within the passed container |
CompositeElement |
select(java.lang.String selector)
Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id). |
CompositeElement |
select(java.lang.String selector,
boolean unique)
Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id). |
BaseElement |
setPositioning(PositioningConfig posCfg)
Set positioning with an object returned by getPositioning(). |
void |
setScrollTop(int scrollTop)
Set the scroll top position. |
int[] |
translatePoints(int x,
int y)
Translates the passed page coordinates into left/top css values for this element |
ExtElement |
unclip()
Return clipping (overflow) to original clipping before clip() was called. |
void |
unmask()
Removes a previously applied mask. |
ExtElement |
up(java.lang.String selector)
Walks up the dom looking for a parent node that matches the passed simple selector (e.g. |
ExtElement |
up(java.lang.String selector,
com.google.gwt.user.client.Element container)
Walks up the dom looking for a parent node that matches the passed simple selector (e.g. |
ExtElement |
up(java.lang.String selector,
int maxDepth)
Walks up the dom looking for a parent node that matches the passed simple selector (e.g. |
void |
update(java.lang.String html,
boolean loadScripts,
Function callback)
Update the innerHTML of this element, optionally searching for and processing scripts. |
Methods inherited from class com.gwtext.client.core.JsObject |
---|
getJsObj, getProperties, isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ExtElement()
public ExtElement(com.google.gwt.core.client.JavaScriptObject jsObj)
jsObj
- native Element objectpublic ExtElement(com.google.gwt.user.client.Element elem)
elem
- the DOM Elementpublic ExtElement(com.google.gwt.user.client.Element elem, boolean forceNew)
elem
- the DOM ElementforceNew
- by default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance.
Passing true
will skip that check (useful for extending this class)Method Detail |
---|
public static ExtElement fly(java.lang.String id)
id
- the Element id
public static ExtElement fly(java.lang.String id, java.lang.String named)
id
- the Element idnamed
- allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_internal")
public static ExtElement get(java.lang.String id)
id
- the id of Element
public ExtElement appendChild(com.google.gwt.user.client.Element child)
child
- the child element
public ExtElement appendTo(com.google.gwt.user.client.Element el)
el
- the new parent element
public ExtElement blur()
public ExtElement boxWrap()
public ExtElement boxWrap(java.lang.String boxClass)
boxClass
- A base CSS class to apply to the containing wrapper element (defaults to 'x-box'). Note that there are a number of
CSS rules that are dependent on this name to make the overall effect work, so if you supply an alternate base class, make sure you also supply all of the necessary rules.
public ExtElement center()
public ExtElement center(com.google.gwt.user.client.Element centerIn)
centerIn
- the element in which to center the element.
public com.google.gwt.user.client.Element child(java.lang.String selector)
selector
- the CSS selector
public ExtElement clearPositioning()
public ExtElement clearPositioning(Position value)
value
- the position value
public boolean contains(com.google.gwt.user.client.Element el)
el
- the element to check
public ExtElement createChild(DomConfig config)
config
- DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be automatically generated with the specified attributes.
public ExtElement createChild(DomConfig config, com.google.gwt.user.client.Element insertBefore)
config
- DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be automatically generated with the specified attributes.insertBefore
- a child element of this element
public ExtElement createProxy(DomConfig config)
config
- DomHelper config object
public ExtElement createProxy(DomConfig config, com.google.gwt.user.client.Element renderTo, boolean matchBox)
config
- DomHelper config objectrenderTo
- The element render the proxy tomatchBox
- true to align and size the proxy to this element now (defaults to false)
public ExtElement createProxy(java.lang.String cls)
cls
- the class name of the proxy element
public ExtElement createProxy(java.lang.String cls, com.google.gwt.user.client.Element renderTo, boolean matchBox)
cls
- the class name of the proxy elementrenderTo
- The element render the proxy tomatchBox
- true to align and size the proxy to this element now (defaults to false)
public com.google.gwt.user.client.Element down(java.lang.String selector)
selector
- the CSS selector
public com.google.gwt.user.client.Element findParent(java.lang.String selector)
selector
- the simple selector to test
public com.google.gwt.user.client.Element findParent(java.lang.String selector, com.google.gwt.user.client.Element container)
selector
- the simple selector to testcontainer
- search until container element is reached
public com.google.gwt.user.client.Element findParent(java.lang.String selector, int maxDepth)
selector
- the simple selector to testmaxDepth
- the max depth to search as a number (defaults to 10)
public com.google.gwt.user.client.Element findParentNode(java.lang.String selector, com.google.gwt.user.client.Element container)
selector
- the simple selector to testcontainer
- search until container element is reached
public com.google.gwt.user.client.Element findParentNode(java.lang.String selector, int maxDepth)
selector
- the simple selector to testmaxDepth
- the max depth to search as a number (defaults to 10)
public ExtElement focus()
public int[] getAlignToXY(com.google.gwt.user.client.Element element, java.lang.String anchorPosition)
element
- The element to align toanchorPosition
- the element's anchor point
public int[] getAlignToXY(com.google.gwt.user.client.Element element, java.lang.String anchorPosition, int[] offesets)
element
- The element to align to.anchorPosition
- the element's anchor pointoffesets
- offset the positioning by [x, y]
public int[] getAnchorXY()
public int[] getAnchorXY(java.lang.String anchorPosition, boolean local, int width, int height)
anchorPosition
- the specified anchor position.local
- true to get the local (element top/left-relative) anchor position instead of page coordinateswidth
- width to use for calculating anchor positionheight
- height to use for calculating anchor position
public java.lang.String getAttributeNS(java.lang.String namespace, java.lang.String name)
namespace
- the namespace in which to look for the attributename
- the attribute name
public int getBorderWidth(Side side)
side
- the side
public int getBottom(boolean local)
local
- true to get the local css position instead of page coordinate
public Box getBox()
public Box getBox(boolean contentBox, boolean local)
contentBox
- if true a box for the content of the element is returned.local
- if true the element's left and top are returned instead of page x/y
public int[] getCenterXY()
public java.lang.String getColor(java.lang.String attr, java.lang.String defaultValue)
attr
- the css attributedefaultValue
- the default value to use when a valid color isn't found
public java.lang.String getColor(java.lang.String attr, java.lang.String defaultValue, java.lang.String prefix)
attr
- the css attributedefaultValue
- the default value to use when a valid color isn't foundprefix
- defaults to #. Use an empty string when working with YUI color anims.
public int getComputedHeight()
public int getComputedWidth()
public com.google.gwt.user.client.Element getDOM()
public int getFrameWidth(Side side)
side
- the side
public int getHeight()
public int getHeight(boolean contentHeight)
contentHeight
- true to get the height minus borders and padding
public int getLeft()
public int getLeft(boolean local)
local
- true to get the local css position instead of page coordinate
public Margins getMargins()
public com.google.gwt.user.client.Element next()
public com.google.gwt.user.client.Element next(java.lang.String selector)
selector
- Find the next sibling that matches the passed simple selector
public int getPadding(Side side)
side
- the side
public PositioningConfig getPositioning()
PositioningConfig
object with all CSS positioning properties. Useful along with setPostioning to get snapshot before
performing an update and then restoring the element.
public BaseElement setPositioning(PositioningConfig posCfg)
posCfg
- the position config
public com.google.gwt.user.client.Element prev()
public com.google.gwt.user.client.Element prev(java.lang.String selector)
selector
- Find the previous sibling that matches the passed simple selector
public Region getRegion()
public int[] getScroll()
public Size getSize()
public java.lang.String getStyle(java.lang.String property)
property
- the style property whose value is returned
public int getTop()
public int getTop(boolean local)
local
- true to get the local css position instead of page coordinate
public UpdateManager getUpdateManager()
UpdateManager
.
public java.lang.String getValue()
public float getValueAsNumber()
public Size getViewSize()
public int getWidth()
public int getWidth(boolean contentWidth)
contentWidth
- true to get the width minus borders and padding
public int getX()
public int[] getXY()
public int getY()
public boolean hasClass(java.lang.String className)
className
- the CSS class to check for
public ExtElement insertAfter(com.google.gwt.user.client.Element el)
el
- the element to insert after
public ExtElement insertBefore(com.google.gwt.user.client.Element el)
el
- the element to insert before
public ExtElement insertFirst(com.google.gwt.user.client.Element el)
el
- the element to insert
public ExtElement insertFirst(DomConfig config)
config
- DomHelper config to create element
public com.google.gwt.user.client.Element insertHtmlBeforeBegin(java.lang.String html)
html
- the html fragment
public com.google.gwt.user.client.Element insertHtmlAfterBegin(java.lang.String html)
html
- the html fragment
public com.google.gwt.user.client.Element insertHtmlBeforeEnd(java.lang.String html)
html
- the html fragment
public com.google.gwt.user.client.Element insertHtmlAfterEnd(java.lang.String html)
html
- the html fragment
public com.google.gwt.user.client.Element insertSibling(com.google.gwt.user.client.Element el)
el
- the element to insert
public ExtElement insertSibling(com.google.gwt.user.client.Element el, boolean before)
el
- the element to insertbefore
- insert before or after
public com.google.gwt.user.client.Element insertSibling(DomConfig config)
config
- the DomHelper config
public ExtElement insertSibling(DomConfig config, boolean before)
config
- the DomHelper configbefore
- to insert before or after
public boolean is(java.lang.String selector)
selector
- the simple selector to test
public boolean isBorderBox()
public boolean isDisplayed()
public boolean isMasked()
public boolean isScrollable()
public boolean isVisible()
public boolean isVisible(boolean deep)
deep
- true to walk the dom and see if parent elements are hidden (defaults to false)
public ExtElement mask()
public ExtElement mask(java.lang.String msg)
msg
- a message to display in the mask
public ExtElement mask(java.lang.String msg, boolean animatedIcon)
msg
- a message to display in the maskanimatedIcon
- true to add animated loading icon, false to skip
public ExtElement mask(java.lang.String msg, java.lang.String msgClass)
msg
- a message to display in the maskmsgClass
- a css class to apply to the msg element
public void position()
public void position(Positioning pos, int zIndex, int x, int y)
pos
- positioning to usezIndex
- the zIndex to applyx
- set the page X positiony
- set the page Y positionpublic com.google.gwt.user.client.Element[] query(java.lang.String selector)
selector
- the CSS selector
public ExtElement replace(com.google.gwt.user.client.Element el)
el
- the element to replace
public ExtElement scrollIntoView()
public ExtElement scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll)
container
- the container element to scroll (defaults to document.body)hscroll
- false to disable horizontal scroll (defaults to true)
public CompositeElement select(java.lang.String selector)
selector
- the CSS selector
public CompositeElement select(java.lang.String selector, boolean unique)
selector
- the CSS selectorunique
- true to create a unique ExtElement for each child (defaults to false, which creates a single shared flyweight object)
public int[] translatePoints(int x, int y)
x
- the page xy
- the page y
public ExtElement unclip()
public void unmask()
public void update(java.lang.String html, boolean loadScripts, Function callback)
html
- the new HTMLloadScripts
- true to look for and process scriptscallback
- for async script loading you can be notified when the update completespublic ExtElement up(java.lang.String selector)
selector
- the simple selector to test
public ExtElement up(java.lang.String selector, com.google.gwt.user.client.Element container)
selector
- the simple selector to testcontainer
- the container to stop at
public ExtElement up(java.lang.String selector, int maxDepth)
selector
- the simple selector to testmaxDepth
- The max depth to search (defaults to 10 || document.body)
public com.google.gwt.user.client.Element getFirstChild()
public com.google.gwt.user.client.Element getParentNode()
public void removeChild(com.google.gwt.user.client.Element child)
child
- the childpublic int getClientWidth()
public void setScrollTop(int scrollTop)
scrollTop
- the scroll top position
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |