本文整理了Java中com.google.gwt.dom.client.Element.getAbsoluteBottom()
方法的一些代码示例,展示了Element.getAbsoluteBottom()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getAbsoluteBottom()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getAbsoluteBottom
[英]Gets an element's absolute bottom coordinate in the document's coordinate system.
[中]获取元素在文档坐标系中的绝对底部坐标。
代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib
public static boolean isMouseCursorWithinElement(Element element, int mousePosX, int mousePosY){
int elementTop = element.getAbsoluteTop();
int elementLeft = element.getAbsoluteLeft();
int elementBottom = element.getAbsoluteBottom();
int elementRight = element.getAbsoluteRight();
if (mousePosX > elementLeft && mousePosX < elementRight && mousePosY > elementTop && mousePosY < elementBottom) {
return true;
}
return false;
}
代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib
private void calculateMoveRestriction(DragObject dragObject){
isMouseMoveAxisX = dragOptionsCache.contains(DragOption.MOVE_AXIS_X) && (!dragOptionsCache.contains(DragOption.BLOCK_WIDGET));
isMouseMoveAxisY = dragOptionsCache.contains(DragOption.MOVE_AXIS_Y) && (!dragOptionsCache.contains(DragOption.BLOCK_WIDGET));;
isMouseMoveRestricted = (isMouseMoveAxisX != isMouseMoveAxisY) || (dragOptionsCache.contains(DragOption.BLOCK_WIDGET));
if (dragObject.getContainerElement()!= null) {
Element container = dragObject.getContainerElement();
Element dragged = dragObject.getDragElement();
maxMousePositionX = container.getAbsoluteRight() - dragged.getClientWidth();
maxMousePositionY = container.getAbsoluteBottom() - dragged.getClientHeight();
minMousePositionX = container.getAbsoluteLeft();
minMousePositionY = container.getAbsoluteTop();
isMouseMoveRestricted = true;
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
@Override
public void execute() {
PopupPanel panel = getPopupPanel();
if (box.isAttached())
{
Element e = box.getElement();
panel.setWidth((e.getAbsoluteRight() - e.getAbsoluteLeft() - 2) + Unit.PX.getType());
panel.setPopupPosition(e.getAbsoluteLeft(), e.getAbsoluteBottom());
}
else
{
panel.hide();
}
}
});
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
@Override
public void execute() {
PopupPanel panel = getPopupPanel();
if (box.isAttached())
{
Element e = box.getElement();
panel.setWidth((e.getAbsoluteRight() - e.getAbsoluteLeft() - 2) + Unit.PX.getType());
panel.setPopupPosition(e.getAbsoluteLeft(), e.getAbsoluteBottom());
}
else
{
panel.hide();
}
}
});
内容来源于网络,如有侵权,请联系作者删除!