本文整理了Java中com.google.gwt.dom.client.Element.getAbsoluteRight()
方法的一些代码示例,展示了Element.getAbsoluteRight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getAbsoluteRight()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getAbsoluteRight
[英]Gets an element's absolute right 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: org.eclipse.che.core/che-core-ide-app
@Override
public void onMouseOver(MouseOverEvent event) {
final Element panel = event.getRelativeElement();
tooltip
.getStyle()
.setProperty("top", (panel.getAbsoluteTop() + panel.getOffsetHeight() + 9) + "px");
tooltip
.getStyle()
.setProperty(
"right",
(Document.get().getClientWidth() - panel.getAbsoluteRight() - 2) + "px");
}
},
代码示例来源: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();
}
}
});
代码示例来源:origin: fr.putnami.pwt/pwt
public void popup(Widget container, Widget relativeTo) {
this.setVisible(true);
StyleUtils.addStyle(this, InputDatePicker.STYLE_POPUP);
RootPanel.get().add(this);
Element positioningElement = this.getElement();
Element relativeElement = relativeTo.getElement();
int targetHeight = relativeElement.getOffsetHeight();
int targetTop = relativeElement.getAbsoluteTop();
int positioningWidth = positioningElement.getOffsetWidth();
int targetRight = relativeElement.getAbsoluteRight();
Style elementStyle = positioningElement.getStyle();
elementStyle.setPosition(Position.ABSOLUTE);
elementStyle.setLeft(targetRight - positioningWidth, Unit.PX);
elementStyle.setTop(targetTop + targetHeight, Unit.PX);
StyleUtils.addStyle(this, InputDatePicker.STYLE_FADE);
StyleUtils.addStyle(this, InputDatePicker.STYLE_SHOW);
this.setFocus(true);
if (this.popupBlurHandler == null) {
this.popupBlurHandler = this.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
InputDatePicker.this.hide();
}
});
}
}
代码示例来源:origin: Putnami/putnami-web-toolkit
public void popup(Widget container, Widget relativeTo) {
this.setVisible(true);
StyleUtils.addStyle(this, InputDatePicker.STYLE_POPUP);
RootPanel.get().add(this);
Element positioningElement = this.getElement();
Element relativeElement = relativeTo.getElement();
int targetHeight = relativeElement.getOffsetHeight();
int targetTop = relativeElement.getAbsoluteTop();
int positioningWidth = positioningElement.getOffsetWidth();
int targetRight = relativeElement.getAbsoluteRight();
Style elementStyle = positioningElement.getStyle();
elementStyle.setPosition(Position.ABSOLUTE);
elementStyle.setLeft(targetRight - positioningWidth, Unit.PX);
elementStyle.setTop(targetTop + targetHeight, Unit.PX);
StyleUtils.addStyle(this, InputDatePicker.STYLE_FADE);
StyleUtils.addStyle(this, InputDatePicker.STYLE_SHOW);
this.setFocus(true);
if (this.popupBlurHandler == null) {
this.popupBlurHandler = this.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
InputDatePicker.this.hide();
}
});
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
int right = splitter.getAbsoluteRight();
内容来源于网络,如有侵权,请联系作者删除!