private int getClientLeft() { return Window.getScrollLeft(); }
static void onScroll() { if (scrollHandlersInitialized) { fireEvent(new Window.ScrollEvent(getScrollLeft(), getScrollTop())); } }
int windowRight = Window.getClientWidth() + Window.getScrollLeft(); int windowLeft = Window.getScrollLeft(); int windowRight = Window.getClientWidth() + Window.getScrollLeft(); int windowLeft = Window.getScrollLeft();
private int getClientLeft() { return Window.getScrollLeft(); }
@Override public int getScrollLeft() { return Window.getScrollLeft(); }
setPopupPosition(Math.max(Window.getScrollLeft() + left, 0), Math.max( Window.getScrollTop() + top, 0));
/** * By default this method centers the popup horizontally. * You can override this method to change the horizontal position of the popup. * @param popupWidth the width of the popup * @return the left position of the popup */ protected int getLeft(int popupWidth) { return ((Window.getClientWidth() - popupWidth) / 2) + Window.getScrollLeft(); }
private boolean canFitOnRightEdge(int popupWidth) { return getRightEdge(popupWidth) >= Window.getScrollLeft(); } }
int x = event.getClientX() - senderElem.getAbsoluteLeft() + senderElem.getPropertyInt("scrollLeft") + Window.getScrollLeft(); int y = event.getClientY() - senderElem.getAbsoluteTop() + senderElem.getPropertyInt("scrollTop")
private boolean canFitOnLeftEdge(int popupWidth) { int windowRight = Window.getClientWidth() + Window.getScrollLeft(); return windowRight - popupWidth > widget.getAbsoluteLeft(); }
int clientX = event.getClientX() + Window.getScrollLeft(); int clientY = event.getClientY() + Window.getScrollTop(); int rowLeft = hoveringRow.getAbsoluteLeft();
static void onScroll() { if (scrollHandlersInitialized) { fireEvent(new Window.ScrollEvent(getScrollLeft(), getScrollTop())); } }
static void onScroll() { if (scrollHandlersInitialized) { fireEvent(new Window.ScrollEvent(getScrollLeft(), getScrollTop())); } }
@Override public void execute() { resizeDialog(); int left = (Window.getClientWidth() - getOffsetWidth()) >> 1; int top = (Window.getClientHeight() - getOffsetHeight()) >> 1; setPopupPosition(Math.max(Window.getScrollLeft() + left, 0), Math.max( Window.getScrollTop() + top, 0)); } });
@Override public void showContextMenu(Event event) { if (enabled && actionKeys != null) { // Show context menu if there are registered action handlers int left = WidgetUtil.getTouchOrMouseClientX(event) + Window.getScrollLeft(); int top = WidgetUtil.getTouchOrMouseClientY(event) + Window.getScrollTop(); showContextMenu(left, top); } }
@Override public void showContextMenu(Event event) { if (_delegate.contextMenuEnabled && enabled && (_delegate.customContextMenu != null || actionKeys != null)) { // Show context menu if there are registered action handlers int left = WidgetUtil.getTouchOrMouseClientX(event) + Window.getScrollLeft(); int top = WidgetUtil.getTouchOrMouseClientY(event) + Window.getScrollTop(); selectRowForContextMenuActions(event); showContextMenu(left, top); } }
@Override public void showContextMenu(Event event) { if (_delegate.contextMenuEnabled && enabled && (_delegate.customContextMenu != null || actionKeys != null)) { // Show context menu if there are registered action handlers int left = WidgetUtil.getTouchOrMouseClientX(event) + Window.getScrollLeft(); int top = WidgetUtil.getTouchOrMouseClientY(event) + Window.getScrollTop(); selectRowForContextMenuActions(event); showContextMenu(left, top); } }
@Override public void onStop(IDragStopEvent event) { element.fireEvent(new PositionChangeEvent(oldX, oldY, element.getRelativeX()+element.getUIPanel().getScrollLeft()+Window.getScrollLeft(), element.getRelativeY()+element.getUIPanel().getScrollTop()+Window.getScrollTop())); }
@Override public void onDoubleClick(DoubleClickEvent event) { //select actual connector HashMap<String,ISelectable> selectedElements = new HashMap<String,ISelectable>(); selectedElements.put(connector.getId(), connector); connector.getUIPanel().setSelectedElements(selectedElements); Point p = new Point(mouseX+connector.getUIPanel().getScrollLeft()+Window.getScrollLeft()-connector.getUIPanel().getAbsoluteLeft(), mouseY+connector.getUIPanel().getScrollTop()+Window.getScrollTop()-connector.getUIPanel().getAbsoluteTop()); Point p2 = new Point(mouseX,mouseY); ClosestPoints closestPoints = getClosestPoints(p2); connector.fireEvent(new AddWayPointEvent(p, closestPoints .getMinPoint(), closestPoints.getMaxPoint())); } });
public void onMouseMove(MouseMoveEvent event) { docker.setVisible(true); docker.setX(event.getClientX()-getUIPanel().getAbsoluteLeft()+getUIPanel().getScrollLeft()+Window.getScrollLeft()); docker.setY(event.getClientY()-getUIPanel().getAbsoluteTop()+getUIPanel().getScrollTop()+Window.getScrollTop()); docker.toBack(); timer.cancel(); } });