Skip to content

Commit

Permalink
🔖 Bump and release modules: [components, effects, release]
Browse files Browse the repository at this point in the history
🔖 Bump components and release modules to version 11.24.1
🔖 Bump effects module to version 11.3.1

[Project]
⬆️ Upgrade Gradle from RC to stable release

[Effects Module]
- Animations Package
♻️ Moved some methods from ConsumerTransition to a base class, FluentTransition. Custom transitions that want to use fluent API can extend this
✨ Big improvements to MomentumTransition.
  1) Make it extend FluentTransition
  2) Allow negative displacements by separating the sign from the value in a new variable called 'direction'
  3) Up until now, Interpolators had almost no effect on the transition because the 'frac' value was not being used. Modified the deltaFrameTime computation to use the 'frac' parameter instead of the current time property

  [Components Module]
  📝 Just a bunch of grammar fixes

Signed-off-by: palexdev <alessandro.parisi406@gmail.com>
  • Loading branch information
palexdev committed Oct 19, 2023
1 parent 2f01805 commit 4332a56
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jdk=11
testJdk=17

# Modules
mfx=11.24.0
mfx=11.24.1
mfxcore=11.8.0
mfxeffects=11.3.0
mfxeffects=11.3.1
mfxlocalization=11.1.0
mfxresources=11.9.1

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions modules/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[//]: ##[Unreleased]

## [11.24.1] - 19-10-2023

### Changed

- Just a bunch of grammar fixes

## [11.24.0] - 04-10-2023

### Added
Expand Down
2 changes: 1 addition & 1 deletion modules/components/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Maven #
#--------------------------------------#
POM_ARTIFACT_ID=mfxcomponents
VERSION_NAME=11.24.0
VERSION_NAME=11.24.1

POM_NAME=mfxcomponents
POM_DESCRIPTION=Material Design/Modern components for JavaFX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
* }
* </pre>
* <p></p>
* Last but not least, there are method to also delete any deployed resource: {@link #clean(Theme)} and {@link #cleanAll()}.
* Last but not least, there are methods to also delete any deployed resource: {@link #clean(Theme)} and {@link #cleanAll()}.
*/
public class Deployer {
//================================================================================
Expand Down Expand Up @@ -208,7 +208,7 @@ private void unzip(Theme theme, ZipFile zf, ZipEntry entry, Path destDir) throws
}

/**
* Utility method to delete a path whether it is a file or directory, in other words what Java should have already had
* Utility method to delete a path whether it is a file or directory, in other words, what Java should have already had
* in their java.io/java.nio mess.
*/
private void delete(Path path) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* clumsy when it comes to new features, it's a shame really.
* <p></p>
* This builder is an attempt at supporting such use cases, and while it's true that the goal can be achieved, it doesn't come
* without some caveats which I will discuss later on.
* without any caveats that I will discuss later on.
* <p>
* The mechanism is rather simple, you can specify a set of themes with {@link #themes(Theme...)}, these will be merged into
* a single stylesheet by the {@link #build()} method. The result is a {@link CSSFragment} object that, once converted to
Expand All @@ -74,15 +74,15 @@
* make the process fail. Report any issue, and I'll see if anything can be done to fix it.
* <p></p>
* Imports and URL resources are supported only if the {@link Theme}s have been deployed and their assets are now accessible
* on the filesystem. The processor will attempt at converting any 'local' resource to a path on the disk, and this is
* on the filesystem. The processor will attempt to convert any 'local' resource to a path on the disk, and this is
* another delicate point of the whole process as the attempt may fail for unexpected reasons.
* <p></p>
* The whole process can be a bit slow, although considering how big are JavaFX's and MaterialFX's themes, and also
* considering that now they have to deploy their resources on the disk first, it's really not that bad.
* On my main PCs I didn't notice any major slowdowns, at max 1s. On my tablet, which by the way it's an Android tablet
* on which I installed Windows so take into account that, I noticed the same average. Of course mileage may vary!
* On my main PCs I didn't notice any major slowdowns, at max 1s. On my tablet, which by the way, it's an Android tablet
* on which I installed Windows, so take into account that, I noticed the same average. Mileage may vary!
* <p>
* Such operations, can be enabled/disabled with: {@link #setResolveAssets(boolean)}, {@link #setDeploy(boolean)}.
* Such operations can be enabled/disabled with: {@link #setResolveAssets(boolean)}, {@link #setDeploy(boolean)}.
*/
public class UserAgentBuilder {
//================================================================================
Expand All @@ -107,7 +107,7 @@ public static UserAgentBuilder builder() {
//================================================================================

/**
* Allows to specify all the themes that will be merged by {@link #build()}.
* Allows specifying all the themes that will be merged by {@link #build()}.
* <p>
* The themes are stored in a {@link LinkedHashSet}, ensuring insertion order and avoiding duplicates.
*/
Expand Down Expand Up @@ -240,7 +240,7 @@ enum Type {
* It's super important to add the 'file:///' protocol so that the CSS parser can correctly find the resource
* <p> - URLs are resolved by {@link #resolveResource(Theme, String)}. If the resource was found in the deployed
* of the theme (see {@link Deployer}), then the URL directive is converted as follows (without quotes):
* "url("PATH_ON_THE_DISK");". If the URL points to a network resource then there's no need to convert it.
* "url("PATH_ON_THE_DISK");". If the URL points to a network resource, then there's no need to convert it.
*
* @return the pre-processed theme's data
*/
Expand Down
16 changes: 16 additions & 0 deletions modules/effects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[//]: ##[Unreleased]

## [11.3.1] - 19-10-2023

### Added

- Added base class, FluentTransition, for Transitions that want to use fluent API

### Changed

- Make ConsumerTransition extend from FluentTransition
- Make MomentumTransition extend from FluentTransition
- MomentumTransition: allow negative displacements by separating the sign from the value in a new variable called '
direction'
- MomentumTransition: Up until now, Interpolators had almost no effect on the transition because the 'frac' value was
not being used. Modified the deltaFrameTime computation to use the 'frac' parameter instead of the current time
property

## [11.3.0] - 25-09-2023

### Added
Expand Down
2 changes: 1 addition & 1 deletion modules/effects/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Maven #
#--------------------------------------#
POM_ARTIFACT_ID=mfxeffects
VERSION_NAME=11.3.0
VERSION_NAME=11.3.1

POM_NAME=mfxeffects
POM_DESCRIPTION=Effects extracted from MaterialFX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,19 @@

package io.github.palexdev.mfxeffects.animations;

import io.github.palexdev.mfxeffects.animations.base.FluentTransition;
import io.github.palexdev.mfxeffects.enums.Interpolators;
import javafx.animation.Interpolator;
import javafx.animation.Transition;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.util.Duration;

import java.util.function.Consumer;

/**
* A simple implementation of {@link Transition} that allows to specify
* A simple implementation of {@link FluentTransition} that allows specifying
* what to do when the {@link #interpolate(double)} method is called by using
* a {@link Consumer}.
*/
public class ConsumerTransition extends Transition {
public class ConsumerTransition extends FluentTransition {
//================================================================================
// Properties
//================================================================================
Expand All @@ -42,22 +40,6 @@ public class ConsumerTransition extends Transition {
// Methods
//================================================================================

/**
* Sets the transition duration.
*/
public ConsumerTransition setDuration(Duration duration) {
this.setCycleDuration(duration);
return this;
}

/**
* Sets the transition duration in milliseconds.
*/
public ConsumerTransition setDuration(double millis) {
this.setCycleDuration(Duration.millis(millis));
return this;
}

/**
* Sets the consumer used by the {@link #interpolate(double)} method.
*/
Expand All @@ -66,31 +48,6 @@ public ConsumerTransition setInterpolateConsumer(Consumer<Double> interpolateCon
return this;
}

/**
* Sets the transition's interpolator.
*/
public ConsumerTransition setInterpolatorFluent(Interpolator interpolator) {
this.setInterpolator(interpolator);
return this;
}

public ConsumerTransition setInterpolatorFluent(Interpolators interpolator) {
return setInterpolatorFluent(interpolator.toInterpolator());
}

/**
* Sets the transition's delay.
*/
public ConsumerTransition setDelayFluent(Duration duration) {
this.setDelay(duration);
return this;
}

public ConsumerTransition setOnFinishedFluent(EventHandler<ActionEvent> handler) {
setOnFinished(handler);
return this;
}

/**
* Calls {@link #setInterpolateConsumer(Consumer)} and then starts the animation.
*/
Expand Down Expand Up @@ -127,42 +84,42 @@ public static ConsumerTransition of(Consumer<Double> interpolateConsumer) {
/**
* Creates a new {@code ConsumerTransition} with the given consumer and duration.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, Duration duration) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, Duration duration) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration);
}

/**
* Creates a new {@code ConsumerTransition} with the given consumer and duration in milliseconds.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, double duration) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, double duration) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration);
}

/**
* Creates a new {@code ConsumerTransition} with the given consumer, duration and interpolator.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolator interpolator) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolator interpolator) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration).setInterpolatorFluent(interpolator);
}

/**
* Creates a new {@code ConsumerTransition} with the given consumer, duration in milliseconds and interpolator.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolator interpolator) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolator interpolator) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration).setInterpolatorFluent(interpolator);
}

/**
* Creates a new {@code ConsumerTransition} with the given consumer, duration and interpolator.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolators interpolator) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolators interpolator) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration).setInterpolatorFluent(interpolator.toInterpolator());
}

/**
* Creates a new {@code ConsumerTransition} with the given consumer, duration in milliseconds and interpolator.
*/
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolators interpolator) {
public static FluentTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolators interpolator) {
return (new ConsumerTransition()).setInterpolateConsumer(interpolateConsumer).setDuration(duration).setInterpolatorFluent(interpolator.toInterpolator());
}
}
Loading

0 comments on commit 4332a56

Please sign in to comment.