public class CmsPositionBean
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
CmsPositionBean.Area
Position area.
|
构造器和说明 |
---|
CmsPositionBean()
Constructor.
|
CmsPositionBean(CmsPositionBean model)
Copy constructor.
|
限定符和类型 | 方法和说明 |
---|---|
static CmsPositionBean |
generatePositionInfo(com.google.gwt.dom.client.Element element)
Collects the position information of the given UI object and returns a position info bean.
|
static CmsPositionBean |
generatePositionInfo(com.google.gwt.user.client.ui.UIObject uiObject)
Collects the position information of the given UI object and returns a position info bean.
|
CmsPositionBean.Area |
getArea(int absLeft,
int absTop,
int offset)
Returns over which area of this the given position is.
|
int |
getHeight()
Returns the height.
|
static CmsPositionBean |
getInnerDimensions(com.google.gwt.dom.client.Element panel)
Returns a position info representing the dimensions of all visible child elements of the given panel (excluding elements with position:absolute).
|
static CmsPositionBean |
getInnerDimensions(com.google.gwt.dom.client.Element panel,
int levels,
boolean includeSelf)
Returns a position info representing the dimensions of all visible child elements of the given panel (excluding elements with position:absolute).
|
int |
getLeft()
Returns the left.
|
int |
getTop()
Returns the top.
|
int |
getWidth()
Returns the width.
|
boolean |
isOverElement(int absLeft,
int absTop)
Returns if given position is inside the position beans coordinates.
|
boolean |
isOverTopHalf(int absTop)
Returns if given absolute top is above the vertical middle of the position beans coordinates.
|
void |
setHeight(int height)
Sets the height.
|
void |
setLeft(int left)
Sets the left.
|
void |
setTop(int top)
Sets the top.
|
void |
setWidth(int width)
Sets the width.
|
java.lang.String |
toString() |
public CmsPositionBean()
public CmsPositionBean(CmsPositionBean model)
model
- the model to copypublic static CmsPositionBean generatePositionInfo(com.google.gwt.dom.client.Element element)
element
- the object to read the position data frompublic static CmsPositionBean generatePositionInfo(com.google.gwt.user.client.ui.UIObject uiObject)
uiObject
- the object to read the position data frompublic static CmsPositionBean getInnerDimensions(com.google.gwt.dom.client.Element panel)
panel
- the panelpublic static CmsPositionBean getInnerDimensions(com.google.gwt.dom.client.Element panel, int levels, boolean includeSelf)
panel
- the panellevels
- the levels to traverse down the DOM treeincludeSelf
- true
to include the outer dimensions of the given panelpublic CmsPositionBean.Area getArea(int absLeft, int absTop, int offset)
null
if the provided position is not within this position.absLeft
- the left positionabsTop
- the right positionoffset
- the border offsetpublic int getHeight()
public int getLeft()
public int getTop()
public int getWidth()
public boolean isOverElement(int absLeft, int absTop)
absLeft
- the absolute left positionabsTop
- the absolute top positionpublic boolean isOverTopHalf(int absTop)
absTop
- the absolute top positionpublic void setHeight(int height)
height
- the height to setpublic void setLeft(int left)
left
- the left to setpublic void setTop(int top)
top
- the top to setpublic void setWidth(int width)
width
- the width to setpublic java.lang.String toString()
toString
在类中 java.lang.Object
Object.toString()