Double maxBoundX() { final List<Double> boundsValues = getVisibleGridWidgets() .map(gridWidget -> gridWidget.getX() + gridWidget.getWidth()) .collect(Collectors.toList()); addExtraBounds(boundsValues, bounds -> bounds.getX() + bounds.getWidth()); return maxValue(boundsValues); }
public void setBounds(final Bounds bounds) { this.minX = bounds.getX(); this.minY = bounds.getY(); this.maxX = minX + bounds.getWidth(); this.maxY = minY + bounds.getHeight(); }
private Bounds makeVisibleBounds() { final Bounds bounds = mock(Bounds.class); doReturn(VISIBLE_BOUND_WIDTH).when(bounds).getWidth(); doReturn(VISIBLE_BOUND_HEIGHT).when(bounds).getHeight(); return bounds; }
Double maxBoundX() { final List<Double> boundsValues = getVisibleGridWidgets() .map(gridWidget -> gridWidget.getX() + gridWidget.getWidth()) .collect(Collectors.toList()); addExtraBounds(boundsValues, bounds -> bounds.getX() + bounds.getWidth()); return maxValue(boundsValues); }
private Bounds makeVisibleBounds() { final Bounds bounds = mock(Bounds.class); doReturn(VISIBLE_BOUND_WIDTH).when(bounds).getWidth(); doReturn(VISIBLE_BOUND_HEIGHT).when(bounds).getHeight(); return bounds; }
public void setBounds(final Bounds bounds) { this.minX = bounds.getX(); this.minY = bounds.getY(); this.maxX = minX + bounds.getWidth(); this.maxY = minY + bounds.getHeight(); }
private void updateBounds() { final Bounds bounds = getBounds(); this.minX = bounds.getX(); this.minY = bounds.getY(); this.maxX = this.minX + bounds.getWidth(); this.maxY = this.minY + bounds.getHeight(); }
private void updateBounds() { final Bounds bounds = view.getBounds(); this.minX = bounds.getX(); this.minY = bounds.getY(); this.maxX = this.minX + bounds.getWidth(); this.maxY = this.minY + bounds.getHeight(); }
private void updateBounds() { final Bounds bounds = view.getBounds(); this.minX = bounds.getX(); this.minY = bounds.getY(); this.maxX = this.minX + bounds.getWidth(); this.maxY = this.minY + bounds.getHeight(); }
private double getDecisionTableX(final GuidedDecisionTableView.Presenter dtPresenter) { final Bounds bounds = getView().getBounds(); final double x = bounds.getX() + (bounds.getWidth() - dtPresenter.getView().getWidth()) / 2; return x; }
private double getDecisionTableX(final GuidedDecisionTableView.Presenter dtPresenter) { final Bounds bounds = getView().getBounds(); final double x = bounds.getX() + (bounds.getWidth() - dtPresenter.getView().getWidth()) / 2; return x; }
Double deltaX() { return bounds().maxBoundX() - bounds().minBoundX() - getVisibleBounds().getWidth(); }
Double deltaX() { return bounds().maxBoundX() - bounds().minBoundX() - getVisibleBounds().getWidth(); }
private Transform getTransform( final Bounds bounds ) { final Transform t = new Transform(); t.scale( (double) RADAR_WIDTH / bounds.getWidth(), (double) RADAR_HEIGHT / bounds.getHeight() ).translate( -bounds.getX(), -bounds.getY() ); return t; }
private Transform getTransform( final Bounds bounds ) { final Transform t = new Transform(); t.scale( (double) RADAR_WIDTH / bounds.getWidth(), (double) RADAR_HEIGHT / bounds.getHeight() ).translate( -bounds.getX(), -bounds.getY() ); return t; }
@Override public void setModellerBounds( final Bounds bounds ) { this.minX = bounds.getX(); this.maxX = minX + bounds.getWidth(); this.minY = bounds.getY(); this.maxY = minY + bounds.getHeight(); this.radarLayer.getViewport().setTransform( getTransform( bounds ) ); }
@Override public void setModellerBounds( final Bounds bounds ) { this.minX = bounds.getX(); this.maxX = minX + bounds.getWidth(); this.minY = bounds.getY(); this.maxY = minY + bounds.getHeight(); this.radarLayer.getViewport().setTransform( getTransform( bounds ) ); }
private double getCellScrollDeltaX(final GridWidget gridWidget) { final GridData gridModel = gridWidget.getModel(); final List<GridColumn<?>> columns = gridModel.getColumns(); final GridData.SelectedCell origin = gridModel.getSelectedCellsOrigin(); final int uiColumnIndex = ColumnIndexUtilities.findUiColumnIndex(columns, origin.getColumnIndex()); double dx = 0; final Bounds bounds = gridLayer.getVisibleBounds(); final double columnWidth = columns.get(uiColumnIndex).getWidth(); final double gridCellX = gridWidget.getX() + gridWidget.getRendererHelper().getColumnOffset(uiColumnIndex); if (gridCellX + columnWidth >= bounds.getX() + bounds.getWidth()) { dx = bounds.getX() + bounds.getWidth() - gridCellX - columnWidth; } else if (gridCellX <= bounds.getX()) { dx = bounds.getX() - gridCellX; } return dx; }
@Override public void setVisibleBounds( final Bounds bounds ) { radarLayer.remove( visibleBounds ); visibleBounds.setLocation( new Point2D( bounds.getX(), bounds.getY() ) ); visibleBounds.setHeight( bounds.getHeight() ); visibleBounds.setWidth( bounds.getWidth() ); radarLayer.add( visibleBounds ); visibleBounds.moveToTop(); radarLayer.batch(); }
@Override public void setVisibleBounds( final Bounds bounds ) { radarLayer.remove( visibleBounds ); visibleBounds.setLocation( new Point2D( bounds.getX(), bounds.getY() ) ); visibleBounds.setHeight( bounds.getHeight() ); visibleBounds.setWidth( bounds.getWidth() ); radarLayer.add( visibleBounds ); visibleBounds.moveToTop(); radarLayer.batch(); }