Skip to content

Conversation

@mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Dec 3, 2025

The following interpolator factories don't follow the standard method naming convention:

  • Interpolator.SPLINE(double, double, double, double)
  • Interpolator.TANGENT(Duration, double, Duration, double)
  • Interpolator.TANGENT(Duration, double)
  • Interpolator.STEPS(int, StepPosition)

New methods named ofSpline, ofTangent, and ofSteps are added. The existing methods are deprecated (not for removal) in favor of the correctly-named methods. This change is in line with the new ofLinear method added with #1977.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request matching fixVersion jfx26 to be approved (needs to be created)
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8373038: Interpolator factories should follow method naming convention (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1996/head:pull/1996
$ git checkout pull/1996

Update a local copy of the PR:
$ git checkout pull/1996
$ git pull https://git.openjdk.org/jfx.git pull/1996/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1996

View PR using the GUI difftool:
$ git pr show -t 1996

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1996.diff

Using Webrev

Link to Webrev Comment

@mstr2
Copy link
Collaborator Author

mstr2 commented Dec 3, 2025

/reviewers 2
/csr

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 3, 2025

👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 3, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Ready for review label Dec 3, 2025
@openjdk
Copy link

openjdk bot commented Dec 3, 2025

@mstr2
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label Dec 3, 2025
@openjdk
Copy link

openjdk bot commented Dec 3, 2025

@mstr2 has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@mstr2 please create a CSR request for issue JDK-8373038 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@mlbridge
Copy link

mlbridge bot commented Dec 3, 2025

Webrevs

@andy-goryachev-oracle
Copy link
Contributor

This change makes sense from purely esthetic reasons, though it probably won't be noticed by the app developers as they mostly deal with the interpolators via CSS (and there is no change there, as far as I can tell).

Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm


/**
* Creates an {@code Interpolator}, which {@link #curve(double) curve()} is
* Use {@link #ofSpline(double, double, double, double)}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe something like "This poorly named method is deprecated in favor of ..." or words to that extent?

or keep the original description?

private static final double SWIPE_THRESHOLD = 0.30;
private static final double TOUCH_THRESHOLD = 15;
private static final Interpolator interpolator = Interpolator.SPLINE(0.4829, 0.5709, 0.6803, 0.9928);
private static final Interpolator interpolator = Interpolator.ofSpline(0.4829, 0.5709, 0.6803, 0.9928);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off-topic: shouldn't this interpolator be specified by the stylesheet (i.e. to be able to modify the transition if needed)?

More of a question for @kevinrushforth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

csr Need approved CSR to integrate pull request rfr Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants