本文整理了Java中com.google.gwt.user.client.ui.Widget.getAbsoluteLeft()
方法的一些代码示例,展示了Widget.getAbsoluteLeft()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.getAbsoluteLeft()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Widget
类名称:Widget
方法名:getAbsoluteLeft
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected int getTargetPosition() {
return target.getAbsoluteLeft();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public void handleDrag(int absX, int absY) {
Widget moveTarget = LoggingPopup.this;
RootPanel.get().setWidgetPosition(moveTarget,
moveTarget.getAbsoluteLeft() + absX,
moveTarget.getAbsoluteTop() + absY);
}
}
代码示例来源:origin: errai/errai
@Override
public int getLeft() {
return source.getAbsoluteLeft();
}
代码示例来源:origin: kiegroup/appformer
@Override
protected int getTargetPosition() {
return target.getAbsoluteLeft();
}
代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client
private int getContentAbsoluteLeft() {
return contentArea.getAbsoluteLeft();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
protected int getTargetPosition() {
return target.getAbsoluteLeft();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
protected int getTargetPosition() {
return target.getAbsoluteLeft();
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* Returns the horizontal position of the component's left edge.
*
* @return The x coordinate of the component location
*/
public int getX()
{
return getWidget().getAbsoluteLeft();
}
代码示例来源:origin: geogebra/geogebra
private int getX(TouchEvent<?> event) {
Touch touch = getRelevantTouch(event);
return touch == null ? 0
: (touch.getClientX() - widget.getAbsoluteLeft());
}
代码示例来源:origin: ArcBees/GWTP
private boolean canFitOnLeftEdge(int popupWidth) {
int windowRight = Window.getClientWidth() + Window.getScrollLeft();
return windowRight - popupWidth > widget.getAbsoluteLeft();
}
代码示例来源:origin: ArcBees/GWTP
protected int getLtrLeft(int popupWidth) {
if (!canFitOnLeftEdge(popupWidth) && (canFitOnRightEdge(popupWidth) || clipToWindow)) {
return Math.max(0, getRightEdge(popupWidth));
} else {
return widget.getAbsoluteLeft();
}
}
代码示例来源:origin: ArcBees/GWTP
protected int getRtlLeft(int popupWidth) {
if (!canFitOnRightEdge(popupWidth) && (canFitOnLeftEdge(popupWidth) || !clipToWindow)) {
return widget.getAbsoluteLeft();
} else {
return Math.max(0, getRightEdge(popupWidth));
}
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly
private int getLeftPosition(final Widget widget) {
int left = widget.getAbsoluteLeft();
// if left is negative (due to scrolling) we try to align with the parent
// to make sure the notifications are always visible
if (left < 0 && widget.getParent() != null) {
left = getLeftPosition(widget.getParent());
}
return Math.max(left,
0);
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-bs2
private int getLeftPosition( final Widget widget ) {
int left = widget.getAbsoluteLeft();
// if left is negative (due to scrolling) we try to align with the parent
// to make sure the notifications are always visible
if ( left < 0 && widget.getParent() != null ) {
left = getLeftPosition( widget.getParent() );
}
return Math.max(left, 0);
}
代码示例来源:origin: kiegroup/appformer
private int getLeftPosition(final Widget widget) {
int left = widget.getAbsoluteLeft();
// if left is negative (due to scrolling) we try to align with the parent
// to make sure the notifications are always visible
if (left < 0 && widget.getParent() != null) {
left = getLeftPosition(widget.getParent());
}
return Math.max(left,
0);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public void handleDrag(int absX, int absY) {
Widget moveTarget = LoggingPopup.this;
RootPanel.get().setWidgetPosition(moveTarget,
moveTarget.getAbsoluteLeft() + absX,
moveTarget.getAbsoluteTop() + absY);
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public void handleDrag(int absX, int absY) {
Widget moveTarget = LoggingPopup.this;
RootPanel.get().setWidgetPosition(moveTarget,
moveTarget.getAbsoluteLeft() + absX,
moveTarget.getAbsoluteTop() + absY);
}
}
代码示例来源:origin: com.allen-sauer.gwt.dnd/gwt-dnd
private void internalSetReference(Widget reference) {
// this.reference = reference;
if (reference == null || reference == RootPanel.get()) {
referenceAdjustLeft = 0;
referenceAdjustTop = 0;
} else {
referenceAdjustLeft = reference.getAbsoluteLeft()
+ DOMUtil.getBorderLeft(reference.getElement());
referenceAdjustTop = reference.getAbsoluteTop()
+ DOMUtil.getBorderTop(reference.getElement());
}
}
代码示例来源:origin: com.allen-sauer.gwt.dnd/gwt-dnd
private void internalSetWidget(Widget widget) {
// this.widget = widget;
if (widget == null || widget == RootPanel.get()) {
widgetLeft = 0;
widgetTop = 0;
} else {
widgetLeft = widget.getAbsoluteLeft() - widget.getElement().getScrollLeft();
widgetTop = widget.getAbsoluteTop() - widget.getElement().getScrollTop();
}
}
代码示例来源:origin: org.eagle-i/eagle-i-search-gwt
private void showToolTip(final String toolTipText, final DecoratedPopupPanel simplePopup, final MouseOverEvent event) {
simplePopup.setStyleName( "fakeTooltip" );
simplePopup.setWidget( new HTML( toolTipText ) );
final Widget source = (Widget)event.getSource();
final int left = source.getAbsoluteLeft() + 10;
final int top = source.getAbsoluteTop() + 10;
simplePopup.setPopupPosition( left, top );
// Show the popup
if ( !simplePopup.isShowing() ) {
simplePopup.show();
}
}
内容来源于网络,如有侵权,请联系作者删除!