public int getVerticalScrollPosition() { if (scrollAncestor != null) { return scrollAncestor.getVerticalScrollPosition(); } else { return Window.getScrollTop(); } }
public void onScroll( ScrollEvent event ) { headerWidget.setScrollPosition( scrollPanel.getHorizontalScrollPosition() ); sidebarWidget.setScrollPosition( scrollPanel.getVerticalScrollPosition() ); }
public void onScroll( ScrollEvent event ) { headerWidget.setScrollPosition( scrollPanel.getHorizontalScrollPosition() ); sidebarWidget.setScrollPosition( scrollPanel.getVerticalScrollPosition() ); }
private void calcSpacerHeight() { int verticalScrollPosition = scrollAncestor.getVerticalScrollPosition(); // properties and palette spacer if (verticalScrollPosition > FormDesignerConstants.MAX_VERTICAL_SCROLL_POSITION) { int height = verticalScrollPosition - FormDesignerConstants.MAX_VERTICAL_SCROLL_POSITION; spacer.setHeight(height + "px"); paletteSpacer.setHeight(height + "px"); } else { spacer.setHeight("0px"); paletteSpacer.setHeight("0px"); } }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToBottom(); } } }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToButton(); } } }
@UiHandler("revisionsPanel") public void onPanelScrolled(ScrollEvent ignored) { // We cannot rely on exact equality of scroll positions because GWT sometimes round such values // and it is possible that the actual max scroll position is a pixel less then declared. if (revisionsPanel.getMaximumVerticalScrollPosition() - revisionsPanel.getVerticalScrollPosition() <= 1) { // to avoid autoscrolling to selected item revisionsPanel.getElement().focus(); delegate.onScrolledToBottom(); } } }
private void updatePermanentAppGroupBorder() { permanentAppScrollPanel.removeStyleName(PERMANENT_APP_GROUP_BORDER_BOTTOM); permanentAppScrollPanel.removeStyleName(PERMANENT_APP_GROUP_BORDER_TOP); int maxScrollPosition = getPermanentAppGroupMaxScrollTop(); if (maxScrollPosition > 0) { int verticalScrollPosition = permanentAppScrollPanel.getVerticalScrollPosition(); if (verticalScrollPosition > 0) { permanentAppScrollPanel.addStyleName(PERMANENT_APP_GROUP_BORDER_TOP); } if (verticalScrollPosition < maxScrollPosition) { permanentAppScrollPanel.addStyleName(PERMANENT_APP_GROUP_BORDER_BOTTOM); } } }
private void addLoginButton(HorizontalPanel panel, SanTargetModel rootModel) { final UiCommandButton loginButton = new UiCommandButton(); loginButton.setCommand(rootModel.getLoginCommand()); loginButton.setTitle(constants.storageIscsiPopupLoginButtonLabel()); loginButton.setIcon(IconType.ARROW_RIGHT); loginButton.addClickHandler(event -> { treeScrollPosition = treeContainer.getVerticalScrollPosition(); loginButton.getCommand().execute(); }); loginButton.getElement().getStyle().setFloat(Float.RIGHT); loginButton.getElement().getStyle().setMarginRight(6, Unit.PX); panel.add(loginButton); panel.setCellVerticalAlignment(loginButton, HasVerticalAlignment.ALIGN_MIDDLE); panel.setCellWidth(loginButton, "35px"); //$NON-NLS-1$ }
public void resize() { int initialScrollTop = scroller.getVerticalScrollPosition(); int viewportWidth = getScrollableWidth(); int scrollerHeight = getScrollableHeight();