com.google.gwt.dom.client.Element.getAbsoluteBottom()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(273)

本文整理了Java中com.google.gwt.dom.client.Element.getAbsoluteBottom()方法的一些代码示例,展示了Element.getAbsoluteBottom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getAbsoluteBottom()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getAbsoluteBottom

Element.getAbsoluteBottom介绍

[英]Gets an element's absolute bottom coordinate in the document's coordinate system.
[中]获取元素在文档坐标系中的绝对底部坐标。

代码示例

代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib

  1. public static boolean isMouseCursorWithinElement(Element element, int mousePosX, int mousePosY){
  2. int elementTop = element.getAbsoluteTop();
  3. int elementLeft = element.getAbsoluteLeft();
  4. int elementBottom = element.getAbsoluteBottom();
  5. int elementRight = element.getAbsoluteRight();
  6. if (mousePosX > elementLeft && mousePosX < elementRight && mousePosY > elementTop && mousePosY < elementBottom) {
  7. return true;
  8. }
  9. return false;
  10. }

代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib

  1. private void calculateMoveRestriction(DragObject dragObject){
  2. isMouseMoveAxisX = dragOptionsCache.contains(DragOption.MOVE_AXIS_X) && (!dragOptionsCache.contains(DragOption.BLOCK_WIDGET));
  3. isMouseMoveAxisY = dragOptionsCache.contains(DragOption.MOVE_AXIS_Y) && (!dragOptionsCache.contains(DragOption.BLOCK_WIDGET));;
  4. isMouseMoveRestricted = (isMouseMoveAxisX != isMouseMoveAxisY) || (dragOptionsCache.contains(DragOption.BLOCK_WIDGET));
  5. if (dragObject.getContainerElement()!= null) {
  6. Element container = dragObject.getContainerElement();
  7. Element dragged = dragObject.getDragElement();
  8. maxMousePositionX = container.getAbsoluteRight() - dragged.getClientWidth();
  9. maxMousePositionY = container.getAbsoluteBottom() - dragged.getClientHeight();
  10. minMousePositionX = container.getAbsoluteLeft();
  11. minMousePositionY = container.getAbsoluteTop();
  12. isMouseMoveRestricted = true;
  13. }
  14. }

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

  1. @Override
  2. public void execute() {
  3. PopupPanel panel = getPopupPanel();
  4. if (box.isAttached())
  5. {
  6. Element e = box.getElement();
  7. panel.setWidth((e.getAbsoluteRight() - e.getAbsoluteLeft() - 2) + Unit.PX.getType());
  8. panel.setPopupPosition(e.getAbsoluteLeft(), e.getAbsoluteBottom());
  9. }
  10. else
  11. {
  12. panel.hide();
  13. }
  14. }
  15. });

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

  1. @Override
  2. public void execute() {
  3. PopupPanel panel = getPopupPanel();
  4. if (box.isAttached())
  5. {
  6. Element e = box.getElement();
  7. panel.setWidth((e.getAbsoluteRight() - e.getAbsoluteLeft() - 2) + Unit.PX.getType());
  8. panel.setPopupPosition(e.getAbsoluteLeft(), e.getAbsoluteBottom());
  9. }
  10. else
  11. {
  12. panel.hide();
  13. }
  14. }
  15. });

相关文章

Element类方法