| Defined In: | Layer.js |
| Class: | Ext.Layer |
| Extends: | Ext.Element |
| 属性 | 定义者 | |
|---|---|---|
|
dom: this.
DOM元素
DOM元素
|
Element | |
|
id: this.
DOM元素之ID
DOM元素之ID
|
Element | |
|
originalDisplay:
元素默认的显示模式(默认为"")
元素默认的显示模式(默认为"")
|
Element | |
|
defaultUnit:
CSS值的单位。如不指定则默认为px。
CSS值的单位。如不指定则默认为px。
|
Element | |
|
VISIBILITY:
Visibility mode constant - Use vi...
Visibility mode constant - Use visibility to hide element
显示模式(Visibility mode)的常量 - 使用Visibility来隐藏元素
|
Element | |
|
DISPLAY:
Visibility mode constant - Use di...
Visibility mode constant - Use display to hide element
显示模式(Visibility mode)的常量 - 使用Display来隐藏元素
|
Element | |
| 方法 | 定义者 | |
|---|---|---|
Layer
(
Object config,
[String/HTMLElement existingEl]
)
: Ext.Layer
构造器
构造器
参数项:
|
Layer | |
setZIndex
(
Number zindex
)
: this
设置层的z-index和调整全部的阴影和垫片(shim) z-in...
设置层的z-index和调整全部的阴影和垫片(shim) z-indexes。
层本身的z-index是会自动+2,所以它总会是在其他阴影和垫片上面(这时阴影元素会分配z-index+1,垫片的就是原本传入的z-index)。
参数项:
|
Layer | |
Element
(
String/HTMLElement element,
Boolean forceNew,
String/HTMLElement element,
[Boolean forceNew]
)
: Ext.Element
构造器
构造器
参数项:
|
Element | |
|
setVisibilityMode
(
)
: Ext.Element
设置元素的可见模式。
当调用setVisible()时,会确定可...
设置元素的可见模式。
当调用setVisible()时,会确定可见模式究竟是“可见性visibility”的还是“显示display”的。
参数项:
|
Element | |
enableDisplayMode
(
[String display]
)
: Ext.Element
调用setVisibilityMode(Element.DISPL...
调用setVisibilityMode(Element.DISPLAY)的快捷方式
参数项:
|
Element | |
findParent
(
String selector,
Number/Mixed maxDepth,
HTMLElement The,
[Number/String/HTMLElement/Element maxDepth],
[Boolean returnEl]
)
: HTMLElement
Looks at this node and then at pa...
Looks at this node and then at parent nodes for
a match of the passed simple selector (e.g. div.some-class or span:first-child)
search as a number or element (defaults to 10 || document.body)
/
定位此节点并按照传入的简易选择符(如 div.some-class or span:first-child)查找父节点。
参数项:
|
Element | |
span
(
String selector,
Number/Mixed maxDepth,
Boolean returnEl
)
: HTMLElement
Looks at parent nodes for a match...
Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
search as a number or element (defaults to 10 || document.body)
参数项:
|
Element | |
findParentNode
(
String simpleSelector,
[Number/String/HTMLElement/Element maxDepth],
[Boolean returnEl]
)
: HTMLElement
按照简易选择符查找父节点。选择符如 div.some-class...
按照简易选择符查找父节点。选择符如 div.some-class or span:first-child。
参数项:
|
Element | |
up
(
String selector,
Ext.Element The,
[Number/String/HTMLElement/Element maxDepth],
[Boolean returnEl]
)
: Ext.Element
Walks up the dom looking for a pa...
Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
This is a shortcut for findParentNode() that always returns an Ext.Element.
search as a number or element (defaults to 10 || document.body)
传入一个选择符的参数,按照选择符并沿着dom查找父节点。选择符应是简易的选择符,如 div.some-class or span:first-child。
参数项:
|
Element | |
is
(
Boolean True
)
: Boolean
Returns true if this element matc...
Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
返回true,如果这个元素就是传入的简易选择符参数(如 div.some-class或span:first-child)
参数项:
|
Element | |
animate
(
Object args,
Float duration,
Function onComplete,
String easing,
Ext.Element this,
[Float duration],
[Function onComplete],
[String easing],
[String animType]
)
: Ext.Element
Perform animation on this element...
Perform animation on this element.
在元素上执行动画
参数项:
|
Element | |
clean
(
Boolean forceReclean,
[Boolean forceReclean]
)
Removes worthless text nodes
kee...
Removes worthless text nodes
keeps track if it has been cleaned already so
you can call this over and over. However, if you update the element and
need to force a reclean, you can pass true.
移除无用的文本节点
元素会追踪自己是否已被清除了,所以你可以不断地调用这个方法
然而,如果你需要更新元素而且需要强制清除,你可以传入true的参数。
参数项:
|
Element | |
scrollIntoView
(
Mixed container,
Ext.Element this,
[Boolean hscroll]
)
: Ext.Element
Scrolls this element into view wi...
Scrolls this element into view within the passed container.
传入一个容器(container)参数,把元素滚动到容器的视图(View)。
参数项:
|
Element | |
autoHeight
(
Boolean animate,
Float duration,
Function onComplete,
Ext.Element this,
[Float duration],
[Function onComplete],
[String easing]
)
: Ext.Element
Measures the element's content he...
Measures the element's content height and updates height to match. Note: this function uses setTimeout so
the new height may not be available immediately.
测量元素其内容的实际高度,使元素之高度适合。
注:改函数使用setTimeout所以新高度或者不会立即有效。
参数项:
|
Element | |
contains
(
Boolean True
)
: Boolean
Returns true if this element is a...
Returns true if this element is an ancestor of the passed element
返回true,如果这个元素是传入元素的父级元素(ancestor)
参数项:
|
Element | |
isVisible
(
Boolean True
)
: Boolean
Checks whether the element is cur...
Checks whether the element is currently visible using both visibility and display properties.
检查当前该元素是否都使用属性visibility和属性display来显示。
参数项:
|
Element | |
select
(
String selector,
CompositeElement/CompositeElementLite The,
Boolean unique
)
: CompositeElement/CompositeElementLite
Creates a Ext.CompositeElement fo...
Creates a Ext.CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符为子节点创建一个Ext.CompositeElement组合元素。(选择符不应有id)
参数项:
|
Element | |
query
(
Array An
)
: Array
Selects child nodes based on the ...
Selects child nodes based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符选取其子节点(选择符不应有id)
参数项:
|
Element | |
child
(
String selector,
HTMLElement/Ext.Element The,
[Boolean returnDom]
)
: HTMLElement/Ext.Element
Selects a single child at any dep...
Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符,不限定深度,选取单个子节点(选择符不应有id)
参数项:
|
Element | |
down
(
String selector,
HTMLElement/Ext.Element The,
[Boolean returnDom]
)
: HTMLElement/Ext.Element
child based on the passed CSS sel...
child based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符,"直接"选取单个子节点(选择符不应有id)
参数项:
|
Element | |
initDD
(
String group,
Object config,
Ext.dd.DD The,
Object config,
Object overrides
)
: Ext.dd.DD
Initializes a Ext.dd.DD drag drop...
Initializes a Ext.dd.DD drag drop object for this element.
为这个元素初始化Ext.dd.DD对象
参数项:
|
Element | |
initDDProxy
(
String group,
Object config,
Ext.dd.DDProxy The,
Object config,
Object overrides
)
: Ext.dd.DDProxy
Initializes a Ext.dd.DDProxy obje...
Initializes a Ext.dd.DDProxy object for this element.
为这个元素初始化Ext.dd.DDProxy对象
参数项:
|
Element | |
initDDTarget
(
@link Ext.dd.DDTarget object,
String group,
Object config,
Ext.dd.DDTarget The,
Object config,
Object overrides
)
: Ext.dd.DDTarget
Initializes a {@link Ext.dd.DDTar...
Initializes a {@link Ext.dd.DDTarget} object for this element.
为这个元素初始化{@link Ext.dd.DDTarget}对象
参数项:
|
Element | |
setVisible
(
Boolean visible,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Sets the visibility of the elemen...
Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
设置元素可见性(参阅细节)。
如果visibilityMode 被设置成 Element.DISPLAY,
那么它会使用display属性来隐藏元素,否则它会使用visibility。默认是使用 visibility属性。
参数项:
|
Element | |
|
isDisplayed
(
)
: Boolean
Returns true if display is not "n...
Returns true if display is not "none"
如果属性display不是"none"就返回true
参数项:
|
Element | |
toggle
(
Ext.Element this
)
: Ext.Element
Toggles the element's visibility ...
Toggles the element's visibility or display, depending on visibility mode.
轮回元素visibility或display,取决于visibility mode。
参数项:
|
Element | |
setDisplayed
(
Ext.Element this
)
: Ext.Element
Sets the CSS display property. Us...
Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
设置Css display属性。如果value为true,则使用originalDisplay。
参数项:
|
Element | |
|
focus
(
)
: Ext.Element
Tries to focus the element. Any e...
Tries to focus the element. Any exceptions are caught and ignored.
使这个元素得到焦点。忽略任何已捕获的异常。
参数项:
|
Element | |
|
blur
(
)
: Ext.Element
Tries to blur the element. Any ex...
Tries to blur the element. Any exceptions are caught and ignored.
使这个元素失去焦点。忽略任何已捕获的异常。
参数项:
|
Element | |
addClass
(
Ext.Element this
)
: Ext.Element
Adds one or more CSS classes to t...
Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
为元素添加CSS类(CSS Class)。重复的类会被忽略。
参数项:
|
Element | |
radioClass
(
Ext.Element this
)
: Ext.Element
Adds one or more CSS classes to t...
Adds one or more CSS classes to this element and removes the same class(es) from all siblings.
添加一个或多个className到这个元素,并移除其兄弟(siblings)节点上所有的样式。
参数项:
|
Element | |
removeClass
(
Ext.Element this
)
: Ext.Element
Removes one or more CSS classes f...
Removes one or more CSS classes from the element.
移除元素的CSS类
参数项:
|
Element | |
toggleClass
(
Ext.Element this
)
: Ext.Element
Toggles the specified CSS class o...
Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).
轮换(Toggles)--添加或移除指定的CSS类(如果已经存在的话便删除,否则就是新增加)。
参数项:
|
Element | |
hasClass
(
Boolean True
)
: Boolean
Checks if the specified CSS class...
Checks if the specified CSS class exists on this element's DOM node.
检查某个CSS类是否存在这个元素的DOM节点上
参数项:
|
Element | |
replaceClass
(
String oldClassName,
Ext.Element this,
String newClassName
)
: Ext.Element
Replaces a CSS class on the eleme...
Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added.
在这个元素身上替换CSS类。如果旧的CSS名称不存在,新的就会加入。
参数项:
|
Element | |
getStyles
(
String arg1,
String arg2,
String args
)
: Object
给出一些CSS属性名,得到其值
如 el.getStyles('...
给出一些CSS属性名,得到其值
如 el.getStyles('color', 'font-size', 'width')会返回
{'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.
参数项:
|
Element | |
getStyle
(
String The
)
: String
Normalizes currentStyle and compu...
Normalizes currentStyle and computedStyle.
常规化当前样式和计算样式。
参数项:
|
Element | |
setStyle
(
String/Object property,
Ext.Element this,
[String value]
)
: Ext.Element
Wrapper for setting style propert...
Wrapper for setting style properties,
also takes single object parameter of multiple styles.
以打包的方式设置样式属性,也可以用一个对象参数包含多个样式。
参数项:
|
Element | |
applyStyles
(
Ext.Element this
)
: Ext.Element
|
Element | |
|
getX
(
)
: Number
Gets the current X position of th...
Gets the current X position of the element based on page coordinates.
Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标的X位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
|
Element | |
|
getY
(
)
: Number
Gets the current Y position of th...
Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标的Y位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
|
Element | |
|
getXY
(
)
: Array
Gets the current position of the ...
Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标当前的位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
|
Element | |
getOffsetsTo
(
Mixed element
)
: Array
Returns the offsets of this eleme...
Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.
参数项:
|
Element | |
setX
(
Number The,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Sets the X position of the elemen...
Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素基于页面坐标的X位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
setY
(
Number The,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Sets the Y position of the elemen...
Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素基于页面坐标的Y位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
setLeft
(
Ext.Element this
)
: Ext.Element
|
Element | |
setTop
(
Ext.Element this
)
: Ext.Element
Sets the element's top position d...
Sets the element's top position directly using CSS style (instead of {@link #setY}).
直接使用CSS样式(代替{@link #setY}),设定元素的top位置。
参数项:
|
Element | |
setRight
(
Ext.Element this
)
: Ext.Element
Sets the element's CSS right styl...
Sets the element's CSS right style.
设置元素CSS Right的样式
参数项:
|
Element | |
setBottom
(
Ext.Element this
)
: Ext.Element
Sets the element's CSS bottom sty...
Sets the element's CSS bottom style.
设置元素CSS Bottom的样式
参数项:
|
Element | |
setXY
(
Array pos,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element ...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
setLocation
(
Number x,
Number y,
Ext.Element this,
Number y,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element ...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
moveTo
(
Number x,
Number y,
Ext.Element this,
Number y,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element ...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
|
getRegion
(
)
: Region
Returns the region of the given e...
Returns the region of the given element.
The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
返回给出元素的区域。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
|
Element | |
getHeight
(
Number The
)
: Number
Returns the offset height of the ...
Returns the offset height of the element
返回元素的偏移(offset)高度
参数项:
|
Element | |
getWidth
(
Number The
)
: Number
Returns the offset width of the e...
Returns the offset width of the element
返回元素的偏移(offset)宽度
参数项:
|
Element | |
|
display
(
)
: Number
Returns either the offsetWidth or...
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. This may not work on display:none elements
if a width has not been set using CSS.
参数项:
|
Element | |
|
getComputedHeight
(
)
: Number
当偏移值不可用时就模拟一个出来。该方法返回由padding或bor...
当偏移值不可用时就模拟一个出来。该方法返回由padding或borders调整过的元素CSS高度,也可能是偏移的高度。
如果不用CSS设置高度而且是display:none的元素,有可能不能正常工作。
参数项:
|
Element | |
|
getComputedWidth
(
)
: Number
当偏移值不可用时就模拟一个出来。该方法返回由padding或bor...
当偏移值不可用时就模拟一个出来。该方法返回由padding或borders调整过的元素CSS宽度,也可能是偏移的宽度。
如果不用CSS设置宽度而且是display:none的元素,有可能不能正常工作。
参数项:
|
Element | |
getSize
(
Object An
)
: Object} An object containing the element's size {width: (element width), height: (element height)
Returns the size of the element.
...
Returns the size of the element.
返回元素尺寸大小。
参数项:
|
Element | |
|
getViewSize
(
)
: Object} An object containing the viewport's size {width: (viewport width), height: (viewport height)
Returns the width and height of t...
Returns the width and height of the viewport.
返回视图的高度和宽度。
参数项:
|
Element | |
getValue
(
Boolean asNumber,
Boolean asNumber
)
: String/Number
Returns the value of the "value" ...
Returns the value of the "value" attribute
返回“值的”属性值
参数项:
|
Element | |
setWidth
(
Number width,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Set the width of the element
设置元...
Set the width of the element
设置元素的宽度
参数项:
|
Element | |
setHeight
(
Number height,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Set the height of the element
设置...
Set the height of the element
设置元素的高度
参数项:
|
Element | |
setSize
(
Number width,
Number height,
Ext.Element this,
Number height,
[Boolean/Object animate]
)
: Ext.Element
Set the size of the element. If a...
Set the size of the element. If animation is true, both width an height will be animated concurrently.
设置元素的大小尺寸。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
参数项:
|
Element | |
setBounds
(
Number x,
Number y,
Number width,
Number height,
Ext.Element this,
Number y,
Number width,
Number height,
[Boolean/Object animate]
)
: Ext.Element
Sets the element's position and s...
Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
一次过设置元素的位置和大小。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
参数项:
|
Element | |
setRegion
(
Ext.lib.Region region,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Sets the element's position and s...
Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently.
设置元素的位置并调整大小到指定的位置。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
参数项:
|
Element | |
addListener
(
String/HTMLElement eventName,
Function handler,
[Object scope]
)
为该组件加入事件句柄(event handler)。跟简写方式#o...
为该组件加入事件句柄(event handler)。跟简写方式#on是一样的。
通常你会更多的使用元素本身Ext.Element#removeListener的方法。
参数项:
|
Element | |
removeListener
(
String eventName,
Function fn
)
: Ext.Element
从这个元素上移除事件句柄(event handler),跟简写方式...
从这个元素上移除事件句柄(event handler),跟简写方式{@link #un}是一样的。
举例:
参数项:
|
Element | |
|
removeAllListeners
(
)
: Ext.Element
Removes all previous added listen...
Removes all previous added listeners from this element
在该元素身上移除所有已加入的侦听器
参数项:
|
Element | |
relayEvent
(
String eventName,
Object object
)
Create an event handler on this e...
Create an event handler on this element
创建此元素的事件句柄,由此元素接替另外的对象触发和处理事件。
such that when the event fires and is handled by this element,
it will be relayed to another object
(i.e., fired again as if it originated from that object instead).
参数项:
|
Element | |
setOpacity
(
Float opacity,
Ext.Element this,
[Boolean/Object animate]
)
: Ext.Element
Set the opacity of the element
...
Set the opacity of the element
设置元素透明度
参数项:
|
Element | |
getLeft
(
Boolean local,
Boolean local
)
: Number
Gets the left X coordinate
获取X坐标
Gets the left X coordinate
获取X坐标
参数项:
|
Element | |
getRight
(
Boolean local,
Boolean local
)
: Number
Gets the right X coordinate of th...
Gets the right X coordinate of the element (element X position + element width)
获取元素的右X坐标 (元素X位置 + 元素宽度)
参数项:
|
Element | |
getTop
(
Boolean local,
Boolean local
)
: Number
Gets the top Y coordinate
获取顶部...
Gets the top Y coordinate
获取顶部Y坐标
参数项:
|
Element | |
getBottom
(
Boolean local,
Boolean local
)
: Number
Gets the bottom Y coordinate of t...
Gets the bottom Y coordinate of the element (element Y position + element height)
获取元素的底部Y坐标 (元素Y位置 + 元素宽度)
参数项:
|
Element | |
position
(
String pos,
Number zIndex,
Number x,
Number y,
[String pos],
[Number zIndex],
[Number x],
[Number y]
)
Initializes positioning on this e...
Initializes positioning on this element. If a desired position is not passed, it will make the
the element positioned relative IF it is not already positioned.
初始化元素的定位。
如果不传入一个特定的定位,而又还没定位的话,将会使这个元素 相对(relative)定位
参数项:
|
Element | |
clearPositioning
(
Ext.Element this
)
: Ext.Element
Clear positioning back to the def...
Clear positioning back to the default when the document was loaded
当文档加载后清除位置并复位到默认
参数项:
|
Element | |
|
getPositioning
(
)
: Object
Gets an object with all CSS posit...
Gets an object with all CSS positioning properties. Useful along with setPostioning to get
snapshot before performing an update and then restoring the element.
获取一个包含CSS定位的对象
有用的技巧:连同setPostioning一起,可在更新执行之前,先做一个快照(snapshot),之后便可恢复该元素。
参数项:
|
Element | |
getBorderWidth
(
Number The
)
: Number
Gets the width of the border(s) f...
Gets the width of the border(s) for the specified side(s)
passing lr would get the border (l)eft width + the border (r)ight width.
获取指定边(side(s))的 border(s)宽度
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
参数项:
|
Element | |
getPadding
(
Number The
)
: Number
Gets the width of the padding(s) ...
Gets the width of the padding(s) for the specified side(s)
passing lr would get the padding (l)eft + the padding (r)ight.
获取指定边(side(s))的padding宽度
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
参数项:
|
Element | |
setPositioning
(
Object posCfg
)
: Ext.Element
Set positioning with an object re...
Set positioning with an object returned by getPositioning().
由getPositioning()返回的对象去设置定位
参数项:
|
Element | |
setLeftTop
(
String left,
String top
)
: Ext.Element
Quick set left and top adding def...
Quick set left and top adding default units
快速设置left和top(采用默认单位)
参数项:
|
Element | |
move
(
String direction,
Number distance,
Ext.Element this,
Number distance,
[Boolean/Object animate]
)
: Ext.Element
Move this element relative to its...
Move this element relative to its current position.
移动这个元素到相对于当前的位置。
参数项:
|
Element | |
| clip ( ) : Ext.Element | Element | |
|
unclip
(
)
: Ext.Element
Return clipping (overflow) to ori...
Return clipping (overflow) to original clipping before clip() was called
在调用clip()之前,返回原始的裁剪部分(溢出的)
参数项:
|
Element | |
getAnchorXY
(
String anchor,
Boolean local,
Object size,
[String anchor],
[Object size],
[Boolean local]
)
: Array
Gets the x,y coordinates specifie...
Gets the x,y coordinates specified by the anchor position on the element.
for details on supported anchor positions.
of page coordinates
{width: (target width), height: (target height)} (defaults to the element's current size)
返回X、Y坐标,由元素已标记好的位置(anchor position)指定。
{width: (目标宽度), height: (目标高度)} (默认为元素当前大小)
参数项:
|
Element | |
getAlignToXY
(
@link #alignTo for,
Mixed element,
String position,
Array offsets,
String/HTMLElement/Ext.Element element,
String position,
[Array offsets]
)
: Array
Gets the x,y coordinates to align...
Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
supported position values.
获取该元素对齐另一个元素时候的x,y坐标。参阅 {@link #alignTo}了解可支持的位置值。
参数项:
|
Element | |
alignTo
(
Mixed element,
String position,
Array offsets,
Ext.Element this,
String position,
[Array offsets],
[Boolean/Object animate]
)
: Ext.Element
Aligns this element with another ...
Aligns this element with another element relative to the specified anchor points. If the other element is the
document it aligns it to the viewport.
The position parameter is optional, and can be specified in any one of the following formats:
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 cornerExample Usage: 使用范例:
参数项:
|
Element | |
anchorTo
(
Mixed element,
String position,
Array offsets,
Boolean/Object animate,
Boolean/Number monitorScroll,
Ext.Element this,
String position,
[Array offsets],
[Boolean/Object animate],
[Boolean/Number monitorScroll],
Function callback
)
: Ext.Element
Anchors an element to another ele...
Anchors an element to another element and realigns it when the window is resized.
is a number, it is used as the buffer delay (defaults to 50ms).
标记一个元素到另外一个元素,并当window resiz时重新对齐。
参数项:
|
Element | |
|
clearOpacity
(
)
: Ext.Element
Clears any opacity settings from ...
Clears any opacity settings from this element. Required in some cases for IE.
清除这个元素的透明度设置。IE有时候会用到
参数项:
|
Element | |
hide
(
Ext.Element this
)
: Ext.Element
Hide this element - Uses display ...
Hide this element - Uses display mode to determine whether to use "display" or "visibility". See #setVisible.
隐藏此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 #setVisible.
参数项:
|
Element | |
show
(
Ext.Element this
)
: Ext.Element
Show this element - Uses display ...
Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
显示此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 {@link #setVisible}.
参数项:
|
Element | |
update
(
String html,
Boolean loadScripts,
Ext.Element this,
[Boolean loadScripts],
Function callback
)
: Ext.Element
Update the innerHTML of this elem...
Update the innerHTML of this element, optionally searching for and processing scripts
更新该元素的innerHTML,遇到脚本可以执行。
参数项:
|
Element | |
load
(
String/Function url,
String/Object params,
Function callback,
Ext.Element this,
[Function callback],
[Boolean discardUrl]
)
: Ext.Element
Direct access to the Updater Ext....
Direct access to the Updater Ext.Updater#update method (takes the same parameters).
直接访问Updater的Ext.Updater#update方法(相同的参数)
参数项:
|
Element | |
|
getUpdater
(
)
: Ext.Updater
Gets this element's Updater
获取...
Gets this element's Updater
获取这个元素的UpdateManager
参数项:
|
Element | |
|
unselectable
(
)
: Ext.Element
Disables text selection for this ...
Disables text selection for this element (normalized across browsers)
禁止该元素的文本可被选择(可跨浏览器)。
参数项:
|
Element | |
|
getCenterXY
(
)
: Array
Calculates the x, y to center thi...
Calculates the x, y to center this element on the screen
计算该元素的x,y到屏幕中心的值
参数项:
|
Element | |
center
(
Mixed centerIn,
[String/HTMLElement/Ext.Element centerIn]
)
Centers the Element in either the...
Centers the Element in either the viewport, or another Element.
在视图或其他元素中,居中元素。
参数项:
|
Element | |
|
isBorderBox
(
)
: Boolean
Tests various css rules/browsers ...
Tests various css rules/browsers to determine if this element uses a border box
测试不同的CSS规则/浏览器以确定该元素是否使用Border Box
参数项:
|
Element | |
getBox
(
x, y, width, height that,
Boolean contentBox,
Object box,
[Boolean local]
)
: Object} box An object in the format {x, y, width, height
Return a box {x, y, width, height...
Return a box {x, y, width, height} that can be used to set another elements
size/location to match this element.
返回一个BOX {x, y, width, height},可用于匹配其他元素的大小/位置。
参数项:
|
Element | |
getFrameWidth
(
String sides
)
: Number
Returns the sum width of the padd...
Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
for more information about the sides.
传入的“side”的参数,统计边框和内补丁(padding & borders)的宽度并返回该值。
参阅getBorderWidth()以得到更多sides的资料
参数项:
|
Element | |
setBox
(
Object box,
Boolean adjust,
Ext.Element this,
[Boolean adjust],
[Boolean/Object animate]
)
: Ext.Element
Sets the element's box. Use getBo...
Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
设置元素之Box。使用getBox() 在其他对象身上获取box对象。
如果动画为true,那么高度和宽度都会同时出现动画效果。
参数项:
|
Element | |
|
repaint
(
)
: Ext.Element
Forces the browser to repaint thi...
Forces the browser to repaint this element
强制浏览器重新渲染该元素
参数项:
|
Element | |
getMargins
(
String sides,
[String sides]
)
: Object/Number
Returns an object with properties...
Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
then it returns the calculated width of the sides (see getPadding)
返回该元素的top、left、right 和 bottom 属性,以表示margin(外补丁)。
若有sides参数传入,即返回已计算好的sides宽度。
参数项:
|
Element | |
createProxy
(
String/Object config,
String/HTMLElement renderTo,
Ext.Element The,
[String/HTMLElement renderTo],
[Boolean matchBox]
)
: Ext.Element
Creates a proxy element of this e...
Creates a proxy element of this element
创建代理(Proxy),即元素的元素
参数项:
|
Element | |
mask
(
String msg,
Element The,
[String msgCls]
)
: Element
Puts a mask over this element to ...
Puts a mask over this element to disable user interaction. Requires core.css.
This method can only be applied to elements which accept child nodes.
在元素身上遮上一个蒙板(mask),以禁止用户操作。须core.css。
这个方法只能用于接受子节点(child nodes)的元素。
参数项:
|
Element | |
|
unmask
(
)
Removes a previously applied mask...
Removes a previously applied mask.
移除之前的蒙板。
如果removeEl是true,则蒙板会被摧毁,否则放在缓存cache中。
参数项:
|
Element | |
|
isMasked
(
)
: Boolean
Returns true if this element is m...
Returns true if this element is masked
返回true表示为这个元素应用了蒙板。
参数项:
|
Element | |
|
createShim
(
)
: Ext.Element
Creates an iframe shim for this e...
Creates an iframe shim for this element to keep selects and other windowed objects from
showing through.
创建一个iframe垫片来使得select和其他windowed对象在该元素显示之下。
参数项:
|
Element | |
|
remove
(
)
Removes this element from the DOM...
Removes this element from the DOM and deletes it from the cache
从DOM里面移除该元素,并从缓存中删除。
参数项:
|
Element | |
hover
(
Function overFn,
Function outFn,
Ext.Element this,
Function outFn,
[Object scope]
)
: Ext.Element
Sets up event handlers to call th...
Sets up event handlers to call the passed functions when the mouse is over this element.
Automatically filters child element mouse events.
设置事件句柄,当鼠标在此元素之上作用的Css样式类。自动过滤因mouseout事件引起在子元素上的轻移(Flicker)
参数项:
|
Element | |
addClassOnOver
(
String className,
[Boolean preventFlicker]
)
: Ext.Element
Sets up event handlers to add and...
Sets up event handlers to add and remove a css class when the mouse is over this element
设置事件句柄,当此鼠标位于元素上方时作用的CSS样式类。
参数项:
|
Element | |
addClassOnFocus
(
String className
)
: Ext.Element
Sets up event handlers to add and...
Sets up event handlers to add and remove a css class when this element has the focus
设置事件句柄,当此元素得到焦点(focus)时作用的CSS样式类。
参数项:
|
Element | |
addClassOnClick
(
String className
)
: Ext.Element
Sets up event handlers to add and...
Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)
当鼠标在该元素上面按下接着松开(即单击效果),设置event handlers来添加和移除css类。
参数项:
|
Element | |
swallowEvent
(
String eventName,
[Ext.Element this],
[Boolean preventDefault]
)
: Ext.Element
Stops the specified event from bu...
Stops the specified event from bubbling and optionally prevents the default action
事件上报(bubbling)的过程中停止特定的事件,阻止默认动作(可选的)。
参数项:
|
Element | |
parent
(
String selector,
Boolean returnDom
)
: Ext.Element/HTMLElement
Gets the parent node for this ele...
Gets the parent node for this element, optionally chaining up trying to match a selector
获取此节点的父级元素
参数项:
|
Element | |
next
(
String selector,
Boolean returnDom
)
: Ext.Element/HTMLElement
Gets the next sibling, skipping t...
Gets the next sibling, skipping text nodes
获取下一个兄弟节点,跳过文本节点
参数项:
|
Element | |
prev
(
String selector,
Boolean returnDom
)
: Ext.Element/HTMLElement
Gets the previous sibling, skippi...
Gets the previous sibling, skipping text nodes
获取上一个兄弟节点,跳过文本节点
参数项:
|
Element | |
first
(
String selector,
Boolean returnDom
)
: Ext.Element/HTMLElement
Gets the first child, skipping te...
Gets the first child, skipping text nodes
获取第一个子元素,跳过文本节点
参数项:
|
Element | |
last
(
String selector,
Boolean returnDom
)
: Ext.Element/HTMLElement
获取最后一个子元素,跳过文本节点
获取最后一个子元素,跳过文本节点
参数项:
|
Element | |
appendChild
(
String/HTMLElement/Array/Element/CompositeElement el
)
: Ext.Element
Appends the passed element(s) to ...
Appends the passed element(s) to this element
传入一个或多个元素,加入到该元素
参数项:
|
Element | |
createChild
(
Object config,
HTMLElement insertBefore,
[Ext.Element The],
[HTMLElement insertBefore],
[Boolean returnDom]
)
: Ext.Element
Creates the passed DomHelper conf...
Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.
automatically generated with the specified attributes.
传入一个DomHelper配置项对象的参数,将其创建并加入其到该元素;
可选地,可指定在其子元素(哪个子元素由参数传入)之前的地方插入。
参数项:
|
Element | |
appendTo
(
Ext.Element this
)
: Ext.Element
Appends this element to the passe...
Appends this element to the passed element
传入元素的参数,将该元素加入到传入的元素
参数项:
|
Element | |
insertBefore
(
Ext.Element this
)
: Ext.Element
Inserts this element before the p...
Inserts this element before the passed element in the DOM
传入元素的参数,将该元素的DOM插入其之前
参数项:
|
Element | |
insertAfter
(
Ext.Element this
)
: Ext.Element
Inserts this element after the pa...
Inserts this element after the passed element in the DOM
传入元素的参数,将该元素的DOM插入其之后
参数项:
|
Element | |
insertFirst
(
Ext.Element The
)
: Ext.Element
Inserts (or creates) an element (...
Inserts (or creates) an element (or DomHelper config) as the first child of the this element
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的第一个子元素
参数项:
|
Element | |
insertSibling
(
Mixed/Object/Array el,
String where,
Ext.Element the,
[String where],
[Boolean returnDom]
)
: Ext.Element
Inserts (or creates) the passed e...
Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的兄弟节点。
参数项:
|
Element | |
wrap
(
Object config,
HTMLElement/Element The,
[Boolean returnDom]
)
: HTMLElement/Element
Creates and wraps this element wi...
Creates and wraps this element with another element
创建和打包(warp)该元素和其他元素
参数项:
|
Element | |
replace
(
Ext.Element this
)
: Ext.Element
Replaces the passed element with ...
Replaces the passed element with this element
用于当前这个元素替换传入的元素
参数项:
|
Element | |
replaceWith
(
Mixed/Object el
)
: Ext.Element
Replaces this element with the pa...
Replaces this element with the passed element
用传入的元素替换这个元素。
参数项:
|
Element | |
insertHtml
(
String where,
String html,
HTMLElement/Ext.Element The,
String html,
Boolean returnEl
)
: HTMLElement/Ext.Element
Inserts an html fragment into thi...
Inserts an html fragment into this element
插入HTML片断到这个元素
参数项:
|
Element | |
set
(
Object o,
Ext.Element this,
[Boolean useSet]
)
: Ext.Element
Sets the passed attributes as att...
Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
传入属性(attributes)的参数,使之成为该元素的属性(一个样式的属性可以是字符串,对象或函数function)
参数项:
|
Element | |
addKeyListener
(
Number/Array/Object/String key,
Function fn,
Ext.KeyMap The,
Function fn,
[Object scope]
)
: Ext.KeyMap
Convenience method for constructi...
Convenience method for constructing a KeyMap
{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
构建KeyMap的快捷方式
参数项:
|
Element | |
addKeyMap
(
Ext.KeyMap The
)
: Ext.KeyMap
Creates a KeyMap for this element...
Creates a KeyMap for this element
为该元素创建一个KeyMap
参数项:
|
Element | |
|
isScrollable
(
)
: Boolean
Returns true if this element is s...
Returns true if this element is scrollable.
返回true表示为该元素是可滚动的
参数项:
|
Element | |
scrollTo
(
String side,
Number value,
Element this,
Number value,
[Boolean/Object animate]
)
: Element
Scrolls this element the specifie...
Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
滚动该元素到指定的滚动点(scroll point)。
它不会边界检查所以若果你滚动到一个不合理的值时它也会试着去做。
要自动检查边界,请使用scroll()。
参数项:
|
Element | |
scroll
(
String direction,
Number distance,
Boolean Returns,
Number distance,
[Boolean/Object animate]
)
: Boolean
Scrolls this element the specifie...
Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
within this element's scrollable range.
was scrolled as far as it could go.
滚动该元素到指定的方向。须确认元素可滚动的范围,以免滚动超出元素可滚动的范围。
参数项:
|
Element | |
translatePoints
(
Number/Array x,
Object An,
Number y
)
: Object} An object with left and top properties. e.g. {left: (value), top: (value)
Translates the passed page coordi...
Translates the passed page coordinates into left/top css values for this element
传入一个页面坐标的参数,将其翻译到元素的CSS left/top值。
参数项:
|
Element | |
|
getScroll
(
)
: Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)
Returns the current scroll positi...
Returns the current scroll position of the element.
返回元素当前滚动的位置。
参数项:
|
Element | |
getColor
(
String attr,
String defaultValue,
String prefix,
String attr,
String defaultValue,
[String prefix]
)
Return the CSS color for the spec...
Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values
are convert to standard 6 digit hex color.
color anims.
为指定的CSS属性返回CSS颜色。RGB、三位数(像#fff)和有效值都被转换到标准六位十六进制的颜色
参数项:
|
Element | |
boxWrap
(
Ext.Element this
)
: Ext.Element
Wraps the specified element with ...
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. Example usage:
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.
将指定的元素打包到一个特定的样式/markup块,渲染成为斜纹背景、圆角和四边投影的灰色容器。
用法举例:
注意有许多依赖该CSS规则来产生整体的效果。
所以你提供一个交替的基样式,必须保证你所提供的都是所需的规则。
参数项:
|
Element | |
getAttributeNS
(
String namespace,
String The,
String name
)
: String
Returns the value of a namespaced...
Returns the value of a namespaced attribute from the element's underlying DOM node.
在DOM节点中的某个元素,返回其一个命名空间属性的值。
参数项:
|
Element | |
on
(
String eventName,
Function fn,
Object scope,
Object options,
String eventName,
Function fn,
[Object scope],
[Object options]
)
Appends an event handler (shortha...
Appends an event handler (shorthand for #addListener).
@member Ext.Element
@method on
加入一个事件句柄(addListener的简写方式)
@member Ext.Element
@method on
参数项:
|
Element | |
un
(
String eventName,
Function fn,
String eventName,
Function fn
)
: Ext.Element
Removes an event handler from thi...
Removes an event handler from this element (shorthand for {@link #removeListener}).
从这个元素上移除一个event handler({@link #removeListener}的简写方式)
@member Ext.Element
@method un
参数项:
|
Element | |
|
autoBoxAdjust
(
)
true to automatically adjust widt...
true to automatically adjust width and height settings for box-model issues (default to true)
true表示为自动调整由box-mode问题引起的高度和宽度设置(默认true)。
参数项:
|
Element | |
get
(
Element The
)
: Element
Static method to retrieve Element...
Static method to retrieve Element objects. Uses simple caching to consistently return the same object.
Automatically fixes if an object was recreated with the same id via AJAX or DOM.
Shorthand of Ext.Element#get
获取元素对象的静态方法。
如果是相同的对象的话,只是从缓存中提取。
@member Ext
@method get
参数项:
|
Element | |
fly
(
String/HTMLElement el,
Element The,
[String named]
)
: Element
Gets the globally shared flyweigh...
Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
the dom node can be overwritten by other code.
Shorthand of Ext.Element#fly
prevent conflicts (e.g. internally Ext uses "_internal")
获取共享元的元素,传入的节点会成为活动元素。
不保存该元素的引用(reference)-可由其它代码重写dom节点。
Ext.Element#fly的简写方式。
@static
@member Ext
@method fly
参数项:
|
Element | |