Skip to content

Commit

Permalink
🔖 [RELEASE] Modules: core, components, release
Browse files Browse the repository at this point in the history
!!Corrective force push!!

Signed-off-by: palexdev <alessandro.parisi406@gmail.com>
  • Loading branch information
palexdev committed Oct 31, 2024
1 parent 3bed520 commit 7fbd62e
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 81 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jdk=11
testJdk=17

# Modules
mfx=11.26.4
mfxcore=11.10.4
mfx=11.26.5
mfxcore=11.10.5
mfxeffects=11.4.1
mfxlocalization=11.1.0
mfxresources=11.11.1
Expand Down
15 changes: 15 additions & 0 deletions modules/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[//]: ##[Unreleased]

## [11.26.5] - 31-10-2024

### Added

- MFXProgressIndicator: allow to disable determinate progress animations

### Changed

- MFXCircularProgressIndicatorSkin: since the arcMultiplier depends on the layout, it should be a property, and the
progress should be adjusted every time it changes

### Fixed

- MFXProgressIndicator skins: take into account progress not starting as indeterminate

## [11.26.4] - 27-10-2024

### 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.26.4
VERSION_NAME=11.26.5

POM_NAME=mfxcomponents
POM_DESCRIPTION=Material Design/Modern components for JavaFX
Expand Down
92 changes: 46 additions & 46 deletions modules/components/src/test/java/app/Showcase.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

package app;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Supplier;

import app.others.ui.*;
import fr.brouillard.oss.cssfx.CSSFX;
import io.github.palexdev.mfxcomponents.controls.buttons.MFXButton;
Expand Down Expand Up @@ -57,11 +62,6 @@
import javafx.stage.Stage;
import org.scenicview.ScenicView;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Supplier;

public class Showcase extends Application implements MultipleViewApp<String> {
//================================================================================
// Properties
Expand Down Expand Up @@ -113,7 +113,7 @@ protected void layoutChildren() {
.applyOn(sp);

Size ws = UIUtils.getWindowSize();
Scene scene = new Scene(new StackPane(sp), ws.getWidth(), ws.getHeight());
Scene scene = new Scene(new StackPane(sp), ws.getWidth(), ws.getHeight());
loadStyleSheet(scene);
stage.setScene(scene);
stage.setTitle("Buttons Playground");
Expand All @@ -124,7 +124,7 @@ protected void layoutChildren() {
String iconDesc = themeVariant.get().equals("light") ? "fas-sun" : "fas-moon";
themeVariant.set(newVariant);
loadStyleSheet(scene);
themeSwitcher.setIcon(new MFXFontIcon(iconDesc));
themeSwitcher.setIcon(new MFXFontIcon(iconDesc));
});
sp.getChildren().add(themeSwitcher);

Expand Down Expand Up @@ -186,7 +186,7 @@ private Node tbView() {
private Node fabView() {
VBox box = new VBox(50);
box.setAlignment(Pos.TOP_CENTER);
box.setPadding(InsetsBuilder.all(10));
box.setPadding(InsetsBuilder.uniform(10).get());
Node def = createFabsView("Floating Action Buttons", (s, i) -> new MFXFab(i));
Node surf = createFabsView("Floating Action Buttons (Surface)", (s, i) -> new MFXFab(i).setVariants(FABVariants.SURFACE));
Node sdy = createFabsView("Floating Action Buttons (Secondary)", (s, i) -> new MFXFab(i).setVariants(FABVariants.SECONDARY));
Expand All @@ -204,7 +204,7 @@ private Node extendedFabView() {
};
VBox box = new VBox(50);
box.setAlignment(Pos.TOP_CENTER);
box.setPadding(InsetsBuilder.all(10));
box.setPadding(InsetsBuilder.uniform(10).get());
Node def = createExtendedFabView("Extended FABs", generator);
Node surf = createExtendedFabView("Extended FABs (Surface)", generator.andThen(f -> f.setVariants(FABVariants.SURFACE)));
Node sdy = createExtendedFabView("Extended FABs (Secondary)", generator.andThen(f -> f.setVariants(FABVariants.SECONDARY)));
Expand All @@ -222,7 +222,7 @@ private Node iconButtonsView() {

VBox box = new VBox(50);
box.setAlignment(Pos.TOP_CENTER);
box.setPadding(InsetsBuilder.all(10));
box.setPadding(InsetsBuilder.uniform(10).get());
Node standard = createIconButtonsView("Standard IconButtons", generator);
Node filled = createIconButtonsView("Filled IconButtons", generator.andThen(b -> b.addVariants(IconButtonVariants.FILLED)));
Node filledTonal = createIconButtonsView("Filled Tonal IconButtons", generator.andThen(b -> b.addVariants(IconButtonVariants.FILLED_TONAL)));
Expand Down Expand Up @@ -253,8 +253,8 @@ private Node createButtonsView(String title, double length, BiFunction<String, N
MFXButton btn2 = generator.apply("Hovered", null);
MFXButton btn3 = generator.apply("Focused", null);
MFXButton btn4 = generator.apply("Pressed", null);
MFXButton btn5 = generator.apply("Icon Left", FontAwesomeSolid.random());
MFXButton btn6 = generator.apply("Icon Right", FontAwesomeSolid.random());
MFXButton btn5 = generator.apply("Icon Left", FontAwesomeSolid.random());
MFXButton btn6 = generator.apply("Icon Right", FontAwesomeSolid.random());
btn6.setContentDisplay(ContentDisplay.RIGHT);

btn1.setDisable(true);
Expand All @@ -277,15 +277,15 @@ private Node createFabsView(String title, double length, BiFunction<String, MFXF
TitledFlowPane defTfp = new TitledFlowPane(title);
defTfp.setMaxWidth(length);

MFXFab btn0 = generator.apply("Enabled", FontAwesomeSolid.random());
MFXFab btn1 = generator.apply("Disabled", FontAwesomeSolid.random());
MFXFab btn2 = generator.apply("Hovered", FontAwesomeSolid.random());
MFXFab btn3 = generator.apply("Focused", FontAwesomeSolid.random());
MFXFab btn4 = generator.apply("Pressed", FontAwesomeSolid.random());
MFXFab btn5 = generator.apply("Small", FontAwesomeSolid.random());
MFXFab btn6 = generator.apply("Large", FontAwesomeSolid.random());
MFXFab btn7 = generator.apply("Large Lowered", FontAwesomeSolid.random());
MFXFab btn8 = generator.apply("Lowered Large", FontAwesomeSolid.random());
MFXFab btn0 = generator.apply("Enabled", FontAwesomeSolid.random());
MFXFab btn1 = generator.apply("Disabled", FontAwesomeSolid.random());
MFXFab btn2 = generator.apply("Hovered", FontAwesomeSolid.random());
MFXFab btn3 = generator.apply("Focused", FontAwesomeSolid.random());
MFXFab btn4 = generator.apply("Pressed", FontAwesomeSolid.random());
MFXFab btn5 = generator.apply("Small", FontAwesomeSolid.random());
MFXFab btn6 = generator.apply("Large", FontAwesomeSolid.random());
MFXFab btn7 = generator.apply("Large Lowered", FontAwesomeSolid.random());
MFXFab btn8 = generator.apply("Lowered Large", FontAwesomeSolid.random());

btn1.setDisable(true);
btn2.setMouseTransparent(true);
Expand All @@ -300,7 +300,7 @@ private Node createFabsView(String title, double length, BiFunction<String, MFXF
btn8.addVariants(FABVariants.LOWERED, FABVariants.LARGE);

btn8.addEventFilter(MouseEvent.MOUSE_PRESSED, e -> {
btn8.setIcon(FontAwesomeSolid.random());
btn8.setIcon(FontAwesomeSolid.random());
e.consume();
});

Expand All @@ -316,15 +316,15 @@ private Node createExtendedFabView(String title, double length, BiFunction<Strin
TitledFlowPane defTfp = new TitledFlowPane(title);
defTfp.setMaxWidth(length);

MFXFab btn0 = generator.apply("Enabled", FontAwesomeSolid.random());
MFXFab btn1 = generator.apply("Disabled", FontAwesomeSolid.random());
MFXFab btn2 = generator.apply("Hovered", FontAwesomeSolid.random());
MFXFab btn3 = generator.apply("Focused", FontAwesomeSolid.random());
MFXFab btn4 = generator.apply("Pressed", FontAwesomeSolid.random());
MFXFab btn5 = generator.apply("Text Only", FontAwesomeSolid.random());
MFXFab btn6 = generator.apply("Expandable", FontAwesomeSolid.random());
MFXFab btn7 = generator.apply("Change Icon", FontAwesomeSolid.random());
MFXFab btn8 = generator.apply("Lowered Text Only", FontAwesomeSolid.random());
MFXFab btn0 = generator.apply("Enabled", FontAwesomeSolid.random());
MFXFab btn1 = generator.apply("Disabled", FontAwesomeSolid.random());
MFXFab btn2 = generator.apply("Hovered", FontAwesomeSolid.random());
MFXFab btn3 = generator.apply("Focused", FontAwesomeSolid.random());
MFXFab btn4 = generator.apply("Pressed", FontAwesomeSolid.random());
MFXFab btn5 = generator.apply("Text Only", FontAwesomeSolid.random());
MFXFab btn6 = generator.apply("Expandable", FontAwesomeSolid.random());
MFXFab btn7 = generator.apply("Change Icon", FontAwesomeSolid.random());
MFXFab btn8 = generator.apply("Lowered Text Only", FontAwesomeSolid.random());

btn1.setDisable(true);
btn2.setMouseTransparent(true);
Expand All @@ -342,7 +342,7 @@ private Node createExtendedFabView(String title, double length, BiFunction<Strin

btn6.setExtended(false);
btn6.setOnAction(e -> btn6.setExtended(!btn6.isExtended()));
btn7.setOnAction(e -> btn7.setIcon(FontAwesomeSolid.random()));
btn7.setOnAction(e -> btn7.setIcon(FontAwesomeSolid.random()));

defTfp.add(btn0, btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8);
return defTfp;
Expand All @@ -357,11 +357,11 @@ private Node createIconButtonsView(String title, double length, BiFunction<Boole
defTfp.setMaxWidth(length);

// As toggles
MFXIconButton btn0 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn1 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn2 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn3 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn4 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn0 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn1 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn2 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn3 = generator.apply(false, FontAwesomeSolid.random());
MFXIconButton btn4 = generator.apply(false, FontAwesomeSolid.random());
btn1.setMouseTransparent(true);
btn1.pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true);
btn2.setMouseTransparent(true);
Expand All @@ -371,11 +371,11 @@ private Node createIconButtonsView(String title, double length, BiFunction<Boole
btn4.setDisable(true);

// Standard
MFXIconButton btn5 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn6 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn7 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn8 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn9 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn5 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn6 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn7 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn8 = generator.apply(true, FontAwesomeSolid.random());
MFXIconButton btn9 = generator.apply(true, FontAwesomeSolid.random());
btn6.setMouseTransparent(true);
btn6.pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true);
btn7.setMouseTransparent(true);
Expand Down Expand Up @@ -407,12 +407,12 @@ private Node createSegmentedButtonsView(String title) {

MFXSegmentedButton wIcons = new MFXSegmentedButton();
for (int i = 0; i < 5; i++) {
wIcons.addSegment(FontAwesomeSolid.random(), "Segment " + i);
wIcons.addSegment(FontAwesomeSolid.random(), "Segment " + i);
}

MFXSegmentedButton wDisabled = new MFXSegmentedButton();
for (int i = 0; i < 5; i++) {
wDisabled.addSegment(FontAwesomeSolid.random(), "Segment " + i);
wDisabled.addSegment(FontAwesomeSolid.random(), "Segment " + i);
}
wDisabled.getSegments().get(1).setDisable(true);
wDisabled.getSegments().get(2).setDisable(true);
Expand All @@ -425,7 +425,7 @@ private Node createCheckboxesView(String title) {
TitledFlowPane defTP = new TitledFlowPane(title);
defTP.setMaxWidth(350);
List<Supplier<MFXCheckbox>> generators = new ArrayList<>(List.of(
MFXCheckbox::new,
MFXCheckbox::new,
() -> {
MFXCheckbox c = new MFXCheckbox();
c.setDisable(true);
Expand Down Expand Up @@ -460,7 +460,7 @@ private Node createCheckboxesView(String title) {
for (Supplier<MFXCheckbox> g : generators) {
MFXCheckbox c = g.get();
c.setAllowIndeterminate(true);
c.setState(TriState.INDETERMINATE);
c.setState(TriState.INDETERMINATE);
defTP.add(c);
}

Expand Down
10 changes: 7 additions & 3 deletions modules/components/src/test/java/app/buttons/FABTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package app.buttons;

import java.util.function.Supplier;

import io.github.palexdev.mfxcomponents.controls.buttons.MFXButton;
import io.github.palexdev.mfxcomponents.controls.fab.MFXFab;
import io.github.palexdev.mfxcomponents.controls.fab.MFXFabBase;
Expand Down Expand Up @@ -49,8 +51,6 @@
import javafx.stage.Stage;
import org.scenicview.ScenicView;

import java.util.function.Supplier;

import static io.github.palexdev.mfxcomponents.theming.enums.FABVariants.*;

public class FABTest extends Application {
Expand Down Expand Up @@ -97,7 +97,11 @@ public void start(Stage primaryStage) {
String theme = MFXResources.load("themes/material/md-purple-" + variant + ".css");
//String theme = MFXThemeManager.LIGHT.load();
pane.getStylesheets().add(theme);
pane.setPadding(InsetsBuilder.of(15, 5, 15, 5));
pane.setPadding(InsetsBuilder.build()
.withVertical(15)
.withHorizontal(5)
.get()
);

ScrollPane sp = new ScrollPane(pane);
sp.setFitToWidth(true);
Expand Down
2 changes: 1 addition & 1 deletion modules/components/src/test/java/app/popups/PopupTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void start(Stage primaryStage) {
anchors.getItems().removeAll(Pos.BASELINE_CENTER, Pos.BASELINE_LEFT, Pos.BASELINE_RIGHT);
anchors.getSelectionModel().select(Pos.BOTTOM_CENTER);
StackPane.setAlignment(anchors, Pos.TOP_CENTER);
StackPane.setMargin(anchors, InsetsBuilder.top(20));
StackPane.setMargin(anchors, InsetsBuilder.top(20).get());

MFXButton button = new MFXButton("Show Popup").filled();

Expand Down
10 changes: 5 additions & 5 deletions modules/components/src/test/java/interactive/TestCheckboxes.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

package interactive;

import java.util.List;
import java.util.concurrent.TimeoutException;
import java.util.stream.IntStream;

import io.github.palexdev.mfxcomponents.controls.checkbox.MFXCheckbox;
import io.github.palexdev.mfxcomponents.controls.checkbox.TriState;
import io.github.palexdev.mfxcomponents.theming.MaterialThemes;
Expand All @@ -37,10 +41,6 @@
import org.testfx.framework.junit5.ApplicationExtension;
import org.testfx.framework.junit5.Start;

import java.util.List;
import java.util.concurrent.TimeoutException;
import java.util.stream.IntStream;

import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(ApplicationExtension.class)
Expand Down Expand Up @@ -289,7 +289,7 @@ MFXCheckbox[] getCheckboxes(int n) {
private HBox setupStage() {
HBox box = new HBox(20);
box.setAlignment(Pos.CENTER_LEFT);
box.setPadding(InsetsBuilder.all(5));
box.setPadding(InsetsBuilder.uniform(5).get());
try {
Scene scene = new Scene(box, 400, 200);
MaterialThemes.PURPLE_LIGHT.applyOn(scene);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package interactive;

import java.util.concurrent.TimeoutException;

import io.github.palexdev.mfxcomponents.controls.buttons.MFXButton;
import io.github.palexdev.mfxcomponents.controls.fab.MFXFab;
import io.github.palexdev.mfxcomponents.theming.MaterialThemes;
Expand All @@ -34,8 +36,6 @@
import org.testfx.framework.junit5.ApplicationExtension;
import org.testfx.framework.junit5.Start;

import java.util.concurrent.TimeoutException;

import static org.junit.jupiter.api.Assertions.assertEquals;

@ExtendWith(ApplicationExtension.class)
Expand Down Expand Up @@ -90,7 +90,7 @@ void testLargeFab(FxRobot robot) {
assertEquals(96, fab.getLayoutBounds().getWidth());
assertEquals(96, fab.getLayoutBounds().getHeight());

robot.interact(() -> fab.setPrefSize(70, 70));
robot.interact(() -> fab.setMinSize(70, 70));
assertEquals(70, fab.getLayoutBounds().getWidth());
assertEquals(70, fab.getLayoutBounds().getHeight());
}
Expand Down
6 changes: 6 additions & 0 deletions modules/core/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.10.5] - 31-10-2024

### Changed

- Removed CornerRadiusBuilder and reworked InsetsBuilder

## [11.10.4] - 24-10-2024

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

POM_NAME=mfxcore
POM_DESCRIPTION=Core components for MaterialFX
Expand Down
Loading

0 comments on commit 7fbd62e

Please sign in to comment.