/** * Returns the maximum bounds (subject to a minimum) enclosed by the provided collection of Decision Tables. * @param dtPresenters The collection of Decision Tables to check. Cannot be null. Can be empty, in which case the minimum bounds is returned. * @return The maximum bounds enclosed by the Decision Tables. */ public Bounds getBounds( final Set<GuidedDecisionTableView.Presenter> dtPresenters ) { double minX = BOUNDS_MIN_X; double minY = BOUNDS_MIN_Y; double maxX = BOUNDS_MAX_X; double maxY = BOUNDS_MAX_Y; for ( GuidedDecisionTableView.Presenter dtPresenter : dtPresenters ) { final GuidedDecisionTableView dtView = dtPresenter.getView(); minX = Math.min( dtView.getX() - BOUNDS_PADDING, minX ); minY = Math.min( dtView.getY() - BOUNDS_PADDING, minY ); maxX = Math.max( dtView.getX() + dtView.getWidth() + BOUNDS_PADDING, maxX ); maxY = Math.max( dtView.getY() + dtView.getHeight() + BOUNDS_PADDING, maxY ); } bounds.setX( minX ); bounds.setY( minY ); bounds.setWidth( maxX - minX ); bounds.setHeight( maxY - minY ); return bounds; }
renderingInformation); final MultiPath selector = theme.getSelector() .M(bounds.getX() + 0.5, bounds.getY() + 0.5) .L(bounds.getX() + 0.5, height) .L(width, height) .L(width, bounds.getY() + GuidedDecisionTableViewImpl.HEADER_CAPTION_HEIGHT) .L(bounds.getX() + captionWidth, bounds.getY() + GuidedDecisionTableViewImpl.HEADER_CAPTION_HEIGHT) .L(bounds.getX() + captionWidth, bounds.getY() + 0.5) .L(bounds.getX() + GuidedDecisionTableViewImpl.HEADER_CAPTION_WIDTH, bounds.getY() + 0.5) .L(bounds.getX() + 0.5, bounds.getY() + 0.5) .setListening(false); rc.getGroup().add(selector);
/** * Find the x-offset relative to the GridWidget origin where Floating columns are positioned. * @return */ private double getFloatingColumnOffset() { final Bounds bounds = getVisibleBounds(); return bounds.getX() - view.getAbsoluteX(); }
/** * Find the y-offset relative to the GridWidget origin where Floating Header is positioned. * @return */ private double getHeaderOffsetY() { final double vpY = getVisibleBounds().getY(); if (view.isSelected()) { if (view.getAbsoluteY() < vpY && view.getAbsoluteY() + view.getHeight() > vpY + view.getRenderer().getHeaderHeight()) { return vpY - view.getAbsoluteY(); } } return 0.0; }
Double deltaX() { return bounds().maxBoundX() - bounds().minBoundX() - getVisibleBounds().getWidth(); }
Double deltaY() { return bounds().maxBoundY() - bounds().minBoundY() - getVisibleBounds().getHeight(); }
/** * Returns the maximum bounds (subject to a minimum) enclosed by the provided collection of Decision Tables. * @param dtPresenters The collection of Decision Tables to check. Cannot be null. Can be empty, in which case the minimum bounds is returned. * @return The maximum bounds enclosed by the Decision Tables. */ public Bounds getBounds( final Set<GuidedDecisionTableView.Presenter> dtPresenters ) { double minX = BOUNDS_MIN_X; double minY = BOUNDS_MIN_Y; double maxX = BOUNDS_MAX_X; double maxY = BOUNDS_MAX_Y; for ( GuidedDecisionTableView.Presenter dtPresenter : dtPresenters ) { final GuidedDecisionTableView dtView = dtPresenter.getView(); minX = Math.min( dtView.getX() - BOUNDS_PADDING, minX ); minY = Math.min( dtView.getY() - BOUNDS_PADDING, minY ); maxX = Math.max( dtView.getX() + dtView.getWidth() + BOUNDS_PADDING, maxX ); maxY = Math.max( dtView.getY() + dtView.getHeight() + BOUNDS_PADDING, maxY ); } bounds.setX( minX ); bounds.setY( minY ); bounds.setWidth( maxX - minX ); bounds.setHeight( maxY - minY ); return bounds; }
renderingInformation); final MultiPath selector = theme.getSelector() .M(bounds.getX() + 0.5, bounds.getY() + 0.5) .L(bounds.getX() + 0.5, height) .L(width, height) .L(width, bounds.getY() + GuidedDecisionTableViewImpl.HEADER_CAPTION_HEIGHT) .L(bounds.getX() + captionWidth, bounds.getY() + GuidedDecisionTableViewImpl.HEADER_CAPTION_HEIGHT) .L(bounds.getX() + captionWidth, bounds.getY() + 0.5) .L(bounds.getX() + GuidedDecisionTableViewImpl.HEADER_CAPTION_WIDTH, bounds.getY() + 0.5) .L(bounds.getX() + 0.5, bounds.getY() + 0.5) .setListening(false); rc.getGroup().add(selector);
/** * Find the x-offset relative to the GridWidget origin where Floating columns are positioned. * @return */ private double getFloatingColumnOffset() { final Bounds bounds = getVisibleBounds(); return bounds.getX() - view.getAbsoluteX(); }
/** * Find the y-offset relative to the GridWidget origin where Floating Header is positioned. * @return */ private double getHeaderOffsetY() { final double vpY = getVisibleBounds().getY(); if (view.isSelected()) { if (view.getAbsoluteY() < vpY && view.getAbsoluteY() + view.getHeight() > vpY + view.getRenderer().getHeaderHeight()) { return vpY - view.getAbsoluteY(); } } return 0.0; }
Double deltaX() { return bounds().maxBoundX() - bounds().minBoundX() - getVisibleBounds().getWidth(); }
Double deltaY() { return bounds().maxBoundY() - bounds().minBoundY() - getVisibleBounds().getHeight(); }