> lsvCssMetaData = new ArrayList<>(ListView.getClassCssMetaData());
+ Collections.addAll(lsvCssMetaData, HIDE_SCROLLBARS, DEPTH_LEVEL);
+ cssMetaDataList = Collections.unmodifiableList(lsvCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXNotification.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXNotification.java
index 9ae30e77..145a37a5 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXNotification.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXNotification.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXPasswordField.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXPasswordField.java
index 81286b33..55484a03 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXPasswordField.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXPasswordField.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -122,7 +122,9 @@ protected void defaultIcon() {
* simply calling JavaFX methods.
*/
@Override
- protected void defaultContextMenu() {}
+ protected void defaultContextMenu() {
+ setMFXContextMenu(MFXContextMenu.Builder.build(this).install());
+ }
/**
* @return the un-masked text
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressBar.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressBar.java
index 30d99c7b..68ad8532 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressBar.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressBar.java
@@ -1,35 +1,50 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
import io.github.palexdev.materialfx.MFXResourcesLoader;
+import io.github.palexdev.materialfx.beans.NumberRange;
import io.github.palexdev.materialfx.skins.MFXProgressBarSkin;
+import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
import javafx.css.*;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.Skin;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import static io.github.palexdev.materialfx.utils.NodeUtils.isPseudoClassActive;
+
/**
* This is the implementation of a progress bar following Google's material design guidelines.
*
* Extends {@code ProgressBar} and redefines the style class to "mfx-progress-bar" for usage in CSS.
+ *
+ * MFXProgressBar introduces three new css pseudo classes:
+ * - ":range1", activated when the bar value is contained in any of the ranges specified in here {@link #getRanges1()}
+ *
- ":range2", activated when the bar value is contained in any of the ranges specified in here {@link #getRanges2()}
+ *
- ":range3", activated when the bar value is contained in any of the ranges specified in here {@link #getRanges3()}
+ *
+ * I know this may seem a strange approach, but it is much more flexible and allows for a lot more customization.
*/
public class MFXProgressBar extends ProgressBar {
//================================================================================
@@ -39,6 +54,13 @@ public class MFXProgressBar extends ProgressBar {
private final String STYLE_CLASS = "mfx-progress-bar";
private final String STYLESHEETS = MFXResourcesLoader.load("css/MFXProgressBar.css");
+ private final ObservableList> ranges1 = FXCollections.observableArrayList();
+ private final ObservableList> ranges2 = FXCollections.observableArrayList();
+ private final ObservableList> ranges3 = FXCollections.observableArrayList();
+ protected final PseudoClass RANGE1_PSEUDO_CLASS = PseudoClass.getPseudoClass("range1");
+ protected final PseudoClass RANGE2_PSEUDO_CLASS = PseudoClass.getPseudoClass("range2");
+ protected final PseudoClass RANGE3_PSEUDO_CLASS = PseudoClass.getPseudoClass("range3");
+
//================================================================================
// Constructors
//================================================================================
@@ -57,6 +79,57 @@ public MFXProgressBar(double progress) {
private void initialize() {
getStyleClass().add(STYLE_CLASS);
setPrefWidth(200);
+
+ addListeners();
+ }
+
+ private void addListeners() {
+ ranges1.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges2.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges3.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ progressProperty().addListener((observable, oldValue, newValue) -> handlePseudoClasses());
+ }
+
+ /**
+ * Handles the ":range1", ":range2" and ":range3" css pseudo classes when these properties change:
+ * {@link #progressProperty()}, {@link #getRanges1()}, {@link #getRanges2()}, {@link #getRanges3()}.
+ */
+ private void handlePseudoClasses() {
+ double val = getProgress();
+ if (!isPseudoClassActive(this, RANGE1_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges1)) {
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE2_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges2)) {
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE3_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges3)) {
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ }
+ }
+
+ /**
+ * Returns the first list of ranges.
+ */
+ public ObservableList> getRanges1() {
+ return ranges1;
+ }
+
+ /**
+ * Returns the second list of ranges.
+ */
+ public ObservableList> getRanges2() {
+ return ranges2;
+ }
+
+ /**
+ * Returns the third list of ranges.
+ */
+ public ObservableList> getRanges3() {
+ return ranges3;
}
//================================================================================
@@ -98,7 +171,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(ANIMATION_SPEED);
+ List> prbCssMetaData = new ArrayList<>(ProgressBar.getClassCssMetaData());
+ Collections.addAll(prbCssMetaData, ANIMATION_SPEED);
+ cssMetaDataList = Collections.unmodifiableList(prbCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressSpinner.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressSpinner.java
index 40e208e1..007b40a4 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressSpinner.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXProgressSpinner.java
@@ -1,36 +1,51 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
import io.github.palexdev.materialfx.MFXResourcesLoader;
+import io.github.palexdev.materialfx.beans.NumberRange;
import io.github.palexdev.materialfx.skins.MFXProgressSpinnerSkin;
+import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
import javafx.css.*;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.Skin;
import javafx.scene.layout.Region;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import static io.github.palexdev.materialfx.utils.NodeUtils.isPseudoClassActive;
+
/**
* Implementation of a spinning {@code ProgressIndicator}.
*
- * Extends {@link ProgressIndicator}
+ * Extends {@link ProgressIndicator}.
+ *
+ * MFXProgressSpinner introduces three new css pseudo classes:
+ * - ":range1", activated when the spinner value is contained in any of the ranges specified in here {@link #getRanges1()}
+ *
- ":range2", activated when the spinner value is contained in any of the ranges specified in here {@link #getRanges2()}
+ *
- ":range3", activated when the spinner value is contained in any of the ranges specified in here {@link #getRanges3()}
+ *
+ * I know this may seem a strange approach, but it is much more flexible and allows for a lot more customization.
*/
public class MFXProgressSpinner extends ProgressIndicator {
//================================================================================
@@ -40,6 +55,13 @@ public class MFXProgressSpinner extends ProgressIndicator {
private final String STYLE_CLASS = "mfx-progress-spinner";
private final String STYLESHEET = MFXResourcesLoader.load("css/MFXProgressSpinner.css");
+ private final ObservableList> ranges1 = FXCollections.observableArrayList();
+ private final ObservableList> ranges2 = FXCollections.observableArrayList();
+ private final ObservableList> ranges3 = FXCollections.observableArrayList();
+ protected final PseudoClass RANGE1_PSEUDO_CLASS = PseudoClass.getPseudoClass("range1");
+ protected final PseudoClass RANGE2_PSEUDO_CLASS = PseudoClass.getPseudoClass("range2");
+ protected final PseudoClass RANGE3_PSEUDO_CLASS = PseudoClass.getPseudoClass("range3");
+
//================================================================================
// Constructors
//================================================================================
@@ -57,6 +79,56 @@ public MFXProgressSpinner(double progress) {
//================================================================================
private void initialize() {
getStyleClass().add(STYLE_CLASS);
+ addListeners();
+ }
+
+ private void addListeners() {
+ ranges1.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges2.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges3.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ progressProperty().addListener((observable, oldValue, newValue) -> handlePseudoClasses());
+ }
+
+ /**
+ * Handles the ":range1", ":range2" and ":range3" css pseudo classes when these properties change:
+ * {@link #progressProperty()}, {@link #getRanges1()}, {@link #getRanges2()}, {@link #getRanges3()}.
+ */
+ private void handlePseudoClasses() {
+ double val = getProgress();
+ if (!isPseudoClassActive(this, RANGE1_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges1)) {
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE2_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges2)) {
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE3_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges3)) {
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ }
+ }
+
+ /**
+ * Returns the first list of ranges.
+ */
+ public ObservableList> getRanges1() {
+ return ranges1;
+ }
+
+ /**
+ * Returns the second list of ranges.
+ */
+ public ObservableList> getRanges2() {
+ return ranges2;
+ }
+
+ /**
+ * Returns the third list of ranges.
+ */
+ public ObservableList> getRanges3() {
+ return ranges3;
}
//================================================================================
@@ -128,7 +200,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(RADIUS, STARTING_ANGLE);
+ List> priCssMetaData = new ArrayList<>(ProgressIndicator.getClassCssMetaData());
+ Collections.addAll(priCssMetaData, RADIUS, STARTING_ANGLE);
+ cssMetaDataList = Collections.unmodifiableList(priCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRadioButton.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRadioButton.java
index b86825b3..f82c307b 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRadioButton.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRadioButton.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -26,6 +26,8 @@
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -202,11 +204,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(
- SELECTED_COLOR, UNSELECTED_COLOR,
- SELECTED_TEXT_COLOR, UNSELECTED_TEXT_COLOR,
- CHANGE_TEXT_COLOR
- );
+ List> rdbCssMetaData = new ArrayList<>(RadioButton.getClassCssMetaData());
+ Collections.addAll(rdbCssMetaData, SELECTED_COLOR, UNSELECTED_COLOR, SELECTED_TEXT_COLOR, UNSELECTED_TEXT_COLOR, CHANGE_TEXT_COLOR);
+ cssMetaDataList = Collections.unmodifiableList(rdbCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRectangleToggleNode.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRectangleToggleNode.java
index 8d9e2dc9..cacfde16 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRectangleToggleNode.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXRectangleToggleNode.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -34,13 +34,17 @@
*
* Extends {@link ToggleButton} and redefines the style class to "mfx-toggle-node" for usage in CSS.
*
- * Allows to specify up to two icons for toggle's label.
+ * Allows to specify up to two icons for toggle's label. Also, if you want a toggle node without text but just with
+ * the icon, the property to set is the {@link #graphicProperty()}, setting the leading or the trailing in this case can lead to
+ * misaligned icons as those two icons are meant to be used with text. Note that whenever the graphic property is set to
+ * a not null value it will be prioritized over the other two icons and the label. The label will hidden and only the
+ * graphic property will be shown. Setting it back to null will show the label, leading and trailing icons back again.
*/
public class MFXRectangleToggleNode extends AbstractMFXToggleNode {
//================================================================================
// Properties
//================================================================================
- private final String STYLESHEET = MFXResourcesLoader.load("css/MFXRectangleRoggleNode.css");
+ private final String STYLESHEET = MFXResourcesLoader.load("css/MFXRectangleToggleNode.css");
private final ObjectProperty rippleClipTypeFactory = new SimpleObjectProperty<>();
//================================================================================
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXScrollPane.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXScrollPane.java
index 1a7a59ee..07d3f2cb 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXScrollPane.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXScrollPane.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -21,24 +21,13 @@
import io.github.palexdev.materialfx.MFXResourcesLoader;
import io.github.palexdev.materialfx.skins.MFXScrollPaneSkin;
import io.github.palexdev.materialfx.utils.ColorUtils;
-import javafx.animation.Animation;
-import javafx.animation.KeyFrame;
-import javafx.animation.Timeline;
-import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
-import javafx.event.EventHandler;
-import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Skin;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.input.ScrollEvent;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
-import javafx.util.Duration;
-
-import java.util.function.Function;
/**
* This is the implementation of a scroll pane following Google's material design guidelines in JavaFX.
@@ -155,107 +144,16 @@ private void addListeners() {
*/
private void setColors() {
StringBuilder sb = new StringBuilder();
- sb.append("-mfx-track-color: ").append(ColorUtils.rgb((Color) trackColor.get()))
- .append(";\n-mfx-thumb-color: ").append(ColorUtils.rgb((Color) thumbColor.get()))
- .append(";\n-mfx-thumb-hover-color: ").append(ColorUtils.rgb((Color) thumbHoverColor.get()))
+ sb.append("-mfx-track-color: ").append(ColorUtils.toCss(trackColor.get()))
+ .append(";\n-mfx-thumb-color: ").append(ColorUtils.toCss(thumbColor.get()))
+ .append(";\n-mfx-thumb-hover-color: ").append(ColorUtils.toCss(thumbHoverColor.get()))
.append(";");
setStyle(sb.toString());
}
- //================================================================================
- // Static Methods
- //================================================================================
- private static void customScrolling(ScrollPane scrollPane, DoubleProperty scrollDirection, Function sizeFunc, int speed) {
- final double[] frictions = {0.99, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.04, 0.01, 0.008, 0.008, 0.008, 0.008, 0.0006, 0.0005, 0.00003, 0.00001};
- final double[] pushes = {speed};
- final double[] derivatives = new double[frictions.length];
-
- Timeline timeline = new Timeline();
- final EventHandler dragHandler = event -> timeline.stop();
- final EventHandler scrollHandler = event -> {
- if (event.getEventType() == ScrollEvent.SCROLL) {
- int direction = event.getDeltaY() > 0 ? -1 : 1;
- for (int i = 0; i < pushes.length; i++) {
- derivatives[i] += direction * pushes[i];
- }
- if (timeline.getStatus() == Animation.Status.STOPPED) {
- timeline.play();
- }
- event.consume();
- }
- };
- if (scrollPane.getContent().getParent() != null) {
- scrollPane.getContent().getParent().addEventHandler(MouseEvent.DRAG_DETECTED, dragHandler);
- scrollPane.getContent().getParent().addEventHandler(ScrollEvent.ANY, scrollHandler);
- }
- scrollPane.getContent().parentProperty().addListener((observable, oldValue, newValue) -> {
- if (oldValue != null) {
- oldValue.removeEventHandler(MouseEvent.DRAG_DETECTED, dragHandler);
- oldValue.removeEventHandler(ScrollEvent.ANY, scrollHandler);
- }
- if (newValue != null) {
- newValue.addEventHandler(MouseEvent.DRAG_DETECTED, dragHandler);
- newValue.addEventHandler(ScrollEvent.ANY, scrollHandler);
- }
- });
- timeline.getKeyFrames().add(new KeyFrame(Duration.millis(3), (event) -> {
- for (int i = 0; i < derivatives.length; i++) {
- derivatives[i] *= frictions[i];
- }
- for (int i = 1; i < derivatives.length; i++) {
- derivatives[i] += derivatives[i - 1];
- }
- double dy = derivatives[derivatives.length - 1];
- double size = sizeFunc.apply(scrollPane.getContent().getLayoutBounds());
- scrollDirection.set(Math.min(Math.max(scrollDirection.get() + dy / size, 0), 1));
- if (Math.abs(dy) < 0.001) {
- timeline.stop();
- }
- }));
- timeline.setCycleCount(Animation.INDEFINITE);
- }
-
- /**
- * Adds smooth vertical scrolling to the specified scroll pane.
- *
- * Note: not recommended for small scroll panes
- *
- * @param speed regulates the speed of the scrolling
- */
- public static void smoothVScrolling(ScrollPane scrollPane, int speed) {
- customScrolling(scrollPane, scrollPane.vvalueProperty(), Bounds::getHeight, speed);
- }
-
- /**
- * Adds smooth horizontal scrolling to the specified scroll pane.
- *
- * Note: not recommended for small scroll panes
- *
- * @param speed regulates the speed of the scrolling
- */
- public static void smoothHScrolling(ScrollPane scrollPane, int speed) {
- customScrolling(scrollPane, scrollPane.hvalueProperty(), Bounds::getWidth, speed);
- }
-
- /**
- * Calls {@link #smoothVScrolling(ScrollPane, int)} with a default speed modifier of 1.
- */
- public static void smoothVScrolling(ScrollPane scrollPane) {
- smoothVScrolling(scrollPane, 1);
- }
-
- /**
- * Calls {@link #smoothHScrolling(ScrollPane, int)} with a default speed modifier of 1.
- */
- public static void smoothHScrolling(ScrollPane scrollPane) {
- smoothHScrolling(scrollPane, 1);
- }
-
-
//================================================================================
// Override Methods
//================================================================================
-
@Override
protected Skin> createDefaultSkin() {
return new MFXScrollPaneSkin(this);
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXSlider.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXSlider.java
new file mode 100644
index 00000000..75c44ba3
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXSlider.java
@@ -0,0 +1,895 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.controls;
+
+import io.github.palexdev.materialfx.MFXResourcesLoader;
+import io.github.palexdev.materialfx.beans.NumberRange;
+import io.github.palexdev.materialfx.controls.enums.SliderEnums.SliderMode;
+import io.github.palexdev.materialfx.controls.enums.SliderEnums.SliderPopupSide;
+import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator;
+import io.github.palexdev.materialfx.effects.ripple.RipplePosition;
+import io.github.palexdev.materialfx.font.MFXFontIcon;
+import io.github.palexdev.materialfx.skins.MFXSliderSkin;
+import io.github.palexdev.materialfx.utils.NodeUtils;
+import io.github.palexdev.materialfx.utils.NumberUtils;
+import javafx.beans.binding.Bindings;
+import javafx.beans.property.*;
+import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
+import javafx.css.*;
+import javafx.geometry.Orientation;
+import javafx.geometry.Pos;
+import javafx.scene.Node;
+import javafx.scene.control.Control;
+import javafx.scene.control.Label;
+import javafx.scene.control.Skin;
+import javafx.scene.control.Slider;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.Priority;
+import javafx.scene.layout.Region;
+import javafx.scene.layout.StackPane;
+import javafx.scene.layout.VBox;
+import javafx.scene.text.TextBoundsType;
+
+import java.util.List;
+import java.util.function.Supplier;
+
+import static io.github.palexdev.materialfx.utils.NodeUtils.isPseudoClassActive;
+
+/**
+ * This is the implementation of a Slider following Google's material design guidelines.
+ *
+ * Extends {@code Control} rather than {@link Slider}, this has been made completely from scratch,
+ * the code is much more clean, documented, and implements many new features.
+ *
+ * The thumb and the popup can be changed by setting the corresponding suppliers
+ * (the popup can also be removed by setting a null supplier or by returning null).
+ * You can also specify the extra gap between the popup and the thumb, see {@link #popupPaddingProperty()},
+ * and the popup position, see {@link #popupSideProperty()}.
+ *
+ * MFXSlider can operate on decimal values too, up to two decimal places. By default it is set to 0,
+ * see {@link #decimalPrecisionProperty()}.
+ *
+ * Just like the JavaFX' slider, MFXSlider has two working modes:
+ * - DEFAULT, the thumb can be moved freely
+ *
- SNAP_TO_TICKS, the thumb always snaps to the closest tick (even if they're hidden)
+ *
+ * Note that the snapping is ignored if the value is adjusted with the keyboard.
+ *
+ * The properties to customize the ticks are: {@link #tickUnitProperty()}, {@link #showMajorTicksProperty()},
+ * {@link #showMinorTicksProperty()}, {@link #showTicksAtEdgesProperty()}, {@link #minorTicksCountProperty()}.
+ *
+ * Also note that by default (implemented in the skin), the major ticks have two different style classes according to their
+ * index position, "tick-even" or "tick-odd", just to add an extra customization.
+ *
+ * The {@link #unitIncrementProperty()} and {@link #alternativeUnitIncrementProperty()} properties specify the
+ * value increment on arrow keys press (left/right when slider is Horizontal, up/down when slider is Vertical).
+ * The alternate unit increment is used when Shift or Ctrl are pressed too.
+ *
+ * The keyboard behavior can be also disabled by setting {@link #enableKeyboardProperty()} to false.
+ *
+ * When you press on the slider's track the value is adjusted accordingly to where you pressed, the adjusting
+ * animation can also be disabled by setting {@link #animateOnPressProperty()}.
+ *
+ * MFXSlider offers a brand new feature: the progress bar is bidirectional (can be disabled). This means
+ * that if the minimum value is negative the bar will progress on the opposite side to zero.
+ *
+ * MFXSlider introduces three new css pseudo classes:
+ * - ":range1", activated when the slider value is contained in any of the ranges specified in here {@link #getRanges1()}
+ *
- ":range2", activated when the slider value is contained in any of the ranges specified in here {@link #getRanges2()}
+ *
- ":range3", activated when the slider value is contained in any of the ranges specified in here {@link #getRanges3()}
+ *
+ * I know this may seem a strange approach, but it is much more flexible and allows for a lot more customization.
+ *
+ * WARNING!
+ *
+ * If you are changing the min, max, and initial value properties of the slider programmatically be sure
+ * to respect this order, setMin(...), setMax(...), setValue(...).
+ * This is needed for several reasons: min cannot be greater than max otherwise an exception is thrown;
+ * max cannot be lesser than min otherwise an exception is thrown; the slider's value never throws an exception if
+ * it is invalid but rather the value is clamped between the specified min and max values using {@link NumberUtils#clamp(double, double, double)}.
+ * If you don't respect the order you'll end with an inconsistent state and most likely with a messed layout.
+ */
+public class MFXSlider extends Control {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private static final StyleablePropertyFactory FACTORY = new StyleablePropertyFactory<>(Control.getClassCssMetaData());
+ private final String STYLE_CLASS = "mfx-slider";
+ private final String STYLESHEET = MFXResourcesLoader.load("css/MFXSlider.css");
+
+ private final DoubleProperty min = new SimpleDoubleProperty() {
+ @Override
+ public void set(double newValue) {
+ if (newValue > getMax()) {
+ throw new IllegalArgumentException("The minimum value cannot be greater than the max value");
+ }
+ super.set(newValue);
+ }
+ };
+ private final DoubleProperty max = new SimpleDoubleProperty() {
+ @Override
+ public void set(double newValue) {
+ if (newValue < getMin()) {
+ throw new IllegalArgumentException("The maximum value cannot be lesser than the min value");
+ }
+ super.set(newValue);
+ }
+ };
+ private final DoubleProperty value = new SimpleDoubleProperty() {
+ @Override
+ public void set(double newValue) {
+ double clamped = NumberUtils.clamp(newValue, getMin(), getMax());
+ super.set(NumberUtils.formatTo(clamped, getDecimalPrecision()));
+ }
+ };
+ private final ObjectProperty> thumbSupplier = new SimpleObjectProperty<>() {
+ @Override
+ public void set(Supplier newValue) {
+ Node node = newValue.get();
+ if (node != null) {
+ super.set(newValue);
+ } else {
+ throw new NullPointerException("Thumb supplier not set as the return values was null!");
+ }
+ }
+ };
+ private final ObjectProperty> popupSupplier = new SimpleObjectProperty<>();
+ private final DoubleProperty popupPadding = new SimpleDoubleProperty(5.0);
+ private final IntegerProperty decimalPrecision = new SimpleIntegerProperty(0);
+ private final BooleanProperty enableKeyboard = new SimpleBooleanProperty(true);
+
+ private final ObservableList> ranges1 = FXCollections.observableArrayList();
+ private final ObservableList> ranges2 = FXCollections.observableArrayList();
+ private final ObservableList> ranges3 = FXCollections.observableArrayList();
+ protected final PseudoClass RANGE1_PSEUDO_CLASS = PseudoClass.getPseudoClass("range1");
+ protected final PseudoClass RANGE2_PSEUDO_CLASS = PseudoClass.getPseudoClass("range2");
+ protected final PseudoClass RANGE3_PSEUDO_CLASS = PseudoClass.getPseudoClass("range3");
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+
+ public MFXSlider() {
+ this(0);
+ }
+
+ public MFXSlider(double initialValue) {
+ this(0, 100, initialValue);
+ }
+
+ public MFXSlider(double min, double max, double initialValue) {
+ if (min > max) {
+ throw new IllegalArgumentException("The minimum value cannot be greater than the max value");
+ }
+
+ setMin(min);
+ setMax(max);
+ setValue(NumberUtils.clamp(initialValue, min, max));
+
+ initialize();
+ }
+
+ //================================================================================
+ // Methods
+ //================================================================================
+ private void initialize() {
+ getStyleClass().add(STYLE_CLASS);
+
+ addListeners();
+
+ defaultThumbSupplier();
+ defaultPopupSupplier();
+ }
+
+ private void addListeners() {
+ ranges1.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges2.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ ranges3.addListener((ListChangeListener super NumberRange>) c -> handlePseudoClasses());
+ value.addListener((observable, oldValue, newValue) -> handlePseudoClasses());
+ }
+
+ /**
+ * Handles the ":range1", ":range2" and ":range3" css pseudo classes when these properties change:
+ * {@link #valueProperty()}, {@link #getRanges1()}, {@link #getRanges2()}, {@link #getRanges3()}.
+ */
+ private void handlePseudoClasses() {
+ double val = getValue();
+ if (!isPseudoClassActive(this, RANGE1_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges1)) {
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE2_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges2)) {
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, false);
+ } else if (!isPseudoClassActive(this, RANGE3_PSEUDO_CLASS) && NumberRange.inRangeOf(val, ranges3)) {
+ pseudoClassStateChanged(RANGE3_PSEUDO_CLASS, true);
+ pseudoClassStateChanged(RANGE1_PSEUDO_CLASS, false);
+ pseudoClassStateChanged(RANGE2_PSEUDO_CLASS, false);
+ }
+ }
+
+ /**
+ * Sets the default thumb supplier.
+ *
+ * It is basically a StackPane which contains two MFXFontIcons (both are circles).
+ * The innermost is the thumb and the outermost is the circle that indicates if the mouse
+ * is hover or pressed on the thumb.
+ *
+ * Note: since the outermost circle is larger that the thumb, the StackPane's layout bounds
+ * are set to be at most the thumb's width and height, otherwise it would cause layout and behavior issues.
+ *
+ * Also, both the thumb and the other circle are transparent to mouse events as the node returned by the supplier
+ * is the StackPane and this is the node that should respond to events.
+ */
+ protected void defaultThumbSupplier() {
+ setThumbSupplier(() -> {
+ MFXFontIcon thumb = new MFXFontIcon("mfx-circle", 12);
+ MFXFontIcon thumbRadius = new MFXFontIcon("mfx-circle", 30);
+ thumb.setMouseTransparent(true);
+ thumbRadius.setMouseTransparent(true);
+ thumb.getStyleClass().setAll("thumb");
+ thumbRadius.getStyleClass().setAll("thumb-radius");
+
+ StackPane stackPane = new StackPane();
+ stackPane.getStyleClass().add("thumb-container");
+ stackPane.setMinSize(USE_PREF_SIZE, USE_PREF_SIZE);
+ stackPane.setPrefSize(NodeUtils.getNodeWidth(thumb), NodeUtils.getNodeHeight(thumb));
+ stackPane.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
+ stackPane.getChildren().setAll(thumb, thumbRadius);
+
+ MFXCircleRippleGenerator rippleGenerator = new MFXCircleRippleGenerator(stackPane);
+ rippleGenerator.setAnimateBackground(false);
+ rippleGenerator.setAnimationSpeed(2);
+ rippleGenerator.setCheckBounds(false);
+ rippleGenerator.setClipSupplier(() -> null);
+ rippleGenerator.setMouseTransparent(true);
+ rippleGenerator.setRadiusMultiplier(2.5);
+ rippleGenerator.setRippleRadius(6);
+ rippleGenerator.setRipplePositionFunction(mouseEvent -> new RipplePosition(stackPane.getWidth() / 2, stackPane.getHeight() / 2));
+ stackPane.addEventFilter(MouseEvent.MOUSE_PRESSED, rippleGenerator::generateRipple);
+ stackPane.getChildren().add(rippleGenerator);
+
+ return stackPane;
+ });
+ }
+
+ /**
+ * Sets the default popup supplier.
+ *
+ * It is basically a VBox which contains a Label for the slider's value and a MFXFontIcon which is the caret.
+ *
+ * Note: The supplier should also deal with changes of {@link #popupSideProperty()} as the text and the caret
+ * should be rotated and positioned accordingly.
+ *
+ * Also note that the so called "popup" is not really a JavaFX popup but a node (Region to be precise)
+ * because this makes handling it's position way easier (with a real popup we must deal with screen coordinates
+ * and it's a real pita).
+ */
+ protected void defaultPopupSupplier() {
+ setPopupSupplier(() -> {
+ Label text = new Label();
+ text.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
+ text.setAlignment(Pos.CENTER);
+ text.setId("popupText");
+ text.textProperty().bind(Bindings.createStringBinding(
+ () -> NumberUtils.formatToString(getValue(), getDecimalPrecision()),
+ value
+ ));
+
+ text.rotateProperty().bind(Bindings.createDoubleBinding(
+ () -> getPopupSide() == SliderPopupSide.DEFAULT ? 0.0 : 180.0,
+ popupSideProperty()
+ ));
+
+ VBox.setVgrow(text, Priority.ALWAYS);
+
+ MFXFontIcon caret = new MFXFontIcon("mfx-caret-down", 22);
+ caret.setId("popupCaret");
+ caret.setBoundsType(TextBoundsType.VISUAL);
+ caret.setManaged(false);
+
+ VBox container = new VBox(text, caret) {
+ @Override
+ protected void layoutChildren() {
+ super.layoutChildren();
+
+ Orientation orientation = getOrientation();
+ double x = orientation == Orientation.HORIZONTAL ? (getWidth() / 2) - (caret.prefWidth(-1) / 2) : getHeight();
+ double y = orientation == Orientation.HORIZONTAL ? getHeight() : -(caret.prefHeight(-1) / 2) + (getHeight() / 2);
+ caret.relocate(snapPositionX(x), snapPositionY(y));
+ }
+ };
+ container.setId("popupContent");
+ container.setAlignment(Pos.TOP_CENTER);
+ container.setMinSize(45, 40);
+ container.getStylesheets().add(STYLESHEET);
+
+ caret.rotateProperty().bind(Bindings.createDoubleBinding(
+ () -> {
+ container.requestLayout();
+ return getOrientation() == Orientation.HORIZONTAL ? 0.0 : -90;
+ },
+ needsLayoutProperty(), rotateProperty(), popupSideProperty()
+ ));
+
+ return container;
+ });
+ }
+
+ public double getMin() {
+ return min.get();
+ }
+
+ /**
+ * Specifies the minimum value the slider can reach.
+ */
+ public DoubleProperty minProperty() {
+ return min;
+ }
+
+ public void setMin(double min) {
+ this.min.set(min);
+ }
+
+ public double getMax() {
+ return max.get();
+ }
+
+ /**
+ * Specifies the maximum value the slider can reach.
+ */
+ public DoubleProperty maxProperty() {
+ return max;
+ }
+
+ public void setMax(double max) {
+ this.max.set(max);
+ }
+
+ public double getValue() {
+ return value.get();
+ }
+
+ /**
+ * Specifies the slider's actual value.
+ */
+ public DoubleProperty valueProperty() {
+ return value;
+ }
+
+ public void setValue(double value) {
+ this.value.set(value);
+ }
+
+ public Supplier getThumbSupplier() {
+ return thumbSupplier.get();
+ }
+
+ /**
+ * Specifies the supplier used to build the slider's thumb.
+ *
+ * Attempting to set or return a null value will fallback to the {@link #defaultThumbSupplier()}.
+ */
+ public ObjectProperty> thumbSupplierProperty() {
+ return thumbSupplier;
+ }
+
+ public void setThumbSupplier(Supplier thumbSupplier) {
+ this.thumbSupplier.set(thumbSupplier);
+ }
+
+ public Supplier getPopupSupplier() {
+ return popupSupplier.get();
+ }
+
+ /**
+ * Specifies the supplier used to build the slider's popup.
+ *
+ * You can also set or return null to remove the popup.
+ */
+ public ObjectProperty> popupSupplierProperty() {
+ return popupSupplier;
+ }
+
+ public void setPopupSupplier(Supplier popupSupplier) {
+ this.popupSupplier.set(popupSupplier);
+ }
+
+ public double getPopupPadding() {
+ return popupPadding.get();
+ }
+
+ /**
+ * Specifies the extra gap between the thumb and the popup.
+ */
+ public DoubleProperty popupPaddingProperty() {
+ return popupPadding;
+ }
+
+ public void setPopupPadding(double popupPadding) {
+ this.popupPadding.set(popupPadding);
+ }
+
+ public int getDecimalPrecision() {
+ return decimalPrecision.get();
+ }
+
+ /**
+ * Specifies the number of decimal places for the slider's value.
+ */
+ public IntegerProperty decimalPrecisionProperty() {
+ return decimalPrecision;
+ }
+
+ public void setDecimalPrecision(int decimalPrecision) {
+ this.decimalPrecision.set(decimalPrecision);
+ }
+
+ public boolean isEnableKeyboard() {
+ return enableKeyboard.get();
+ }
+
+ /**
+ * Specifies if the value can be adjusted with the keyboard or not.
+ */
+ public BooleanProperty enableKeyboardProperty() {
+ return enableKeyboard;
+ }
+
+ public void setEnableKeyboard(boolean enableKeyboard) {
+ this.enableKeyboard.set(enableKeyboard);
+ }
+
+ /**
+ * Returns the first list of ranges.
+ */
+ public ObservableList> getRanges1() {
+ return ranges1;
+ }
+
+ /**
+ * Returns the second list of ranges.
+ */
+ public ObservableList> getRanges2() {
+ return ranges2;
+ }
+
+ /**
+ * Returns the third list of ranges.
+ */
+ public ObservableList> getRanges3() {
+ return ranges3;
+ }
+
+ //================================================================================
+ // Styleable Properties
+ //================================================================================
+ private final StyleableObjectProperty sliderMode = new SimpleStyleableObjectProperty<>(
+ StyleableProperties.SLIDER_MODE,
+ this,
+ "sliderMode",
+ SliderMode.DEFAULT
+ );
+
+ private final StyleableDoubleProperty unitIncrement = new SimpleStyleableDoubleProperty(
+ StyleableProperties.UNIT_INCREMENT,
+ this,
+ "unitIncrement",
+ 10.0
+ );
+
+ private final StyleableDoubleProperty alternativeUnitIncrement = new SimpleStyleableDoubleProperty(
+ StyleableProperties.ALTERNATIVE_UNIT_INCREMENT,
+ this,
+ "alternativeUnitIncrement",
+ 5.0
+ );
+
+
+ private final StyleableDoubleProperty tickUnit = new SimpleStyleableDoubleProperty(
+ StyleableProperties.TICK_UNIT,
+ this,
+ "tickUnit",
+ 25.0
+ );
+
+ private final StyleableBooleanProperty showMajorTicks = new SimpleStyleableBooleanProperty(
+ StyleableProperties.SHOW_MAJOR_TICKS,
+ this,
+ "showMajorTicks",
+ false
+ );
+
+ private final StyleableBooleanProperty showMinorTicks = new SimpleStyleableBooleanProperty(
+ StyleableProperties.SHOW_MINOR_TICKS,
+ this,
+ "showMinorTicks",
+ false
+ );
+
+ private final StyleableBooleanProperty showTicksAtEdges = new SimpleStyleableBooleanProperty(
+ StyleableProperties.SHOW_TICKS_AT_EDGE,
+ this,
+ "showTicksAtEdge",
+ true
+ );
+
+ private final StyleableIntegerProperty minorTicksCount = new SimpleStyleableIntegerProperty(
+ StyleableProperties.MINOR_TICKS_COUNT,
+ this,
+ "minorTicksCount",
+ 5
+ );
+
+ private final StyleableBooleanProperty animateOnPress = new SimpleStyleableBooleanProperty(
+ StyleableProperties.ANIMATE_ON_PRESS,
+ this,
+ "animateOnPress",
+ true
+ );
+
+ private final StyleableBooleanProperty bidirectional = new SimpleStyleableBooleanProperty(
+ StyleableProperties.BIDIRECTIONAL,
+ this,
+ "bidirectional",
+ true
+ );
+
+ private final StyleableObjectProperty orientation = new SimpleStyleableObjectProperty<>(
+ StyleableProperties.ORIENTATION,
+ this,
+ "orientation",
+ Orientation.HORIZONTAL
+ );
+
+ private final StyleableObjectProperty popupSide = new SimpleStyleableObjectProperty<>(
+ StyleableProperties.POPUP_SIDE,
+ this,
+ "popupSide",
+ SliderPopupSide.DEFAULT
+ );
+
+ public SliderMode getSliderMode() {
+ return sliderMode.get();
+ }
+
+ /**
+ * Specifies the slider mode. Can be DEFAULT (freely adjust the thumb) or SNAP_TO_TICKS
+ * (the thumb will always snap to ticks).
+ */
+ public StyleableObjectProperty sliderModeProperty() {
+ return sliderMode;
+ }
+
+ public void setSliderMode(SliderMode sliderMode) {
+ this.sliderMode.set(sliderMode);
+ }
+
+ public double getUnitIncrement() {
+ return unitIncrement.get();
+ }
+
+ /**
+ * Specifies the value to add/subtract to the slider's value when an arrow key is pressed.
+ *
+ * The arrow keys depend on the slider orientation:
+ * - HORIZONTAL: right, left
+ *
- VERTICAL: up, down
+ */
+ public StyleableDoubleProperty unitIncrementProperty() {
+ return unitIncrement;
+ }
+
+ public void setUnitIncrement(double unitIncrement) {
+ this.unitIncrement.set(unitIncrement);
+ }
+
+ public double getAlternativeUnitIncrement() {
+ return alternativeUnitIncrement.get();
+ }
+
+ /**
+ * Specifies the value to add/subtract to the slider's value when an arrow key and Shift or Ctrl are pressed.
+ *
+ * The arrow keys depend on the slider orientation:
+ * - HORIZONTAL: right, left
+ *
- VERTICAL: up, down
+ */
+ public StyleableDoubleProperty alternativeUnitIncrementProperty() {
+ return alternativeUnitIncrement;
+ }
+
+ public void setAlternativeUnitIncrement(double alternativeUnitIncrement) {
+ this.alternativeUnitIncrement.set(alternativeUnitIncrement);
+ }
+
+ public double getTickUnit() {
+ return tickUnit.get();
+ }
+
+ /**
+ * The value between each major tick mark in data units.
+ */
+ public StyleableDoubleProperty tickUnitProperty() {
+ return tickUnit;
+ }
+
+ public void setTickUnit(double tickUnit) {
+ this.tickUnit.set(tickUnit);
+ }
+
+ public boolean isShowMajorTicks() {
+ return showMajorTicks.get();
+ }
+
+ /**
+ * Specifies if the major ticks should be displayed or not.
+ */
+ public StyleableBooleanProperty showMajorTicksProperty() {
+ return showMajorTicks;
+ }
+
+ public void setShowMajorTicks(boolean showMajorTicks) {
+ this.showMajorTicks.set(showMajorTicks);
+ }
+
+ public boolean isShowMinorTicks() {
+ return showMinorTicks.get();
+ }
+
+ /**
+ * Specifies if the minor ticks should be displayed or not.
+ */
+ public StyleableBooleanProperty showMinorTicksProperty() {
+ return showMinorTicks;
+ }
+
+ public void setShowMinorTicks(boolean showMinorTicks) {
+ this.showMinorTicks.set(showMinorTicks);
+ }
+
+ public boolean isShowTicksAtEdges() {
+ return showTicksAtEdges.get();
+ }
+
+ /**
+ * Specifies if the major ticks at the edge of the slider should be displayed or not.
+ *
+ * The ticks at the edge are those ticks which represent the min and max values.
+ */
+ public StyleableBooleanProperty showTicksAtEdgesProperty() {
+ return showTicksAtEdges;
+ }
+
+ public void setShowTicksAtEdges(boolean showTicksAtEdges) {
+ this.showTicksAtEdges.set(showTicksAtEdges);
+ }
+
+ public int getMinorTicksCount() {
+ return minorTicksCount.get();
+ }
+
+ /**
+ * Specifies how many minor ticks should be added between two major ticks.
+ */
+ public StyleableIntegerProperty minorTicksCountProperty() {
+ return minorTicksCount;
+ }
+
+ public void setMinorTicksCount(int minorTicksCount) {
+ this.minorTicksCount.set(minorTicksCount);
+ }
+
+ public boolean isAnimateOnPress() {
+ return animateOnPress.get();
+ }
+
+ /**
+ * When pressing on the slider's track the value is adjusted according to the mouse event
+ * coordinates. This property specifies if the progress bar adjustment should be animated or not.
+ */
+ public StyleableBooleanProperty animateOnPressProperty() {
+ return animateOnPress;
+ }
+
+ public void setAnimateOnPress(boolean animateOnPress) {
+ this.animateOnPress.set(animateOnPress);
+ }
+
+ public boolean isBidirectional() {
+ return bidirectional.get();
+ }
+
+ /**
+ * If the slider is set to be bidirectional the progress bar will always start from 0.
+ * When the value is negative the progress bar grows in the opposite direction to 0.
+ *
+ * This works only if min is negative and max is positive, otherwise this option in ignored
+ * during layout. See the warning in the control documentation.
+ */
+ public StyleableBooleanProperty bidirectionalProperty() {
+ return bidirectional;
+ }
+
+ public void setBidirectional(boolean bidirectional) {
+ this.bidirectional.set(bidirectional);
+ }
+
+ public Orientation getOrientation() {
+ return orientation.get();
+ }
+
+ /**
+ * Specifies the slider's orientation.
+ */
+ public StyleableObjectProperty orientationProperty() {
+ return orientation;
+ }
+
+ public void setOrientation(Orientation orientation) {
+ this.orientation.set(orientation);
+ }
+
+ public SliderPopupSide getPopupSide() {
+ return popupSide.get();
+ }
+
+ /**
+ * Specifies the popup side.
+ *
+ * DEFAULT is above for horizontal orientation and left for vertical orientation.
+ *
+ * OTHER_SIDE is below for horizontal orientation and right for vertical orientation.
+ */
+ public StyleableObjectProperty popupSideProperty() {
+ return popupSide;
+ }
+
+ public void setPopupSide(SliderPopupSide popupSide) {
+ this.popupSide.set(popupSide);
+ }
+
+ //================================================================================
+ // Styleable Properties
+ //================================================================================
+ private static class StyleableProperties {
+ private static final List> cssMetaDataList;
+
+ private static final CssMetaData SLIDER_MODE =
+ FACTORY.createEnumCssMetaData(
+ SliderMode.class,
+ "-mfx-slider-mode",
+ MFXSlider::sliderModeProperty,
+ SliderMode.DEFAULT
+ );
+
+ private static final CssMetaData UNIT_INCREMENT =
+ FACTORY.createSizeCssMetaData(
+ "-mfx-unit-increment",
+ MFXSlider::unitIncrementProperty,
+ 10.0
+ );
+
+ private static final CssMetaData ALTERNATIVE_UNIT_INCREMENT =
+ FACTORY.createSizeCssMetaData(
+ "-mfx-alternative-unit-increment",
+ MFXSlider::alternativeUnitIncrementProperty,
+ 5.0
+ );
+
+ private static final CssMetaData TICK_UNIT =
+ FACTORY.createSizeCssMetaData(
+ "-mfx-tick-unit",
+ MFXSlider::tickUnitProperty,
+ 25.0
+ );
+
+
+ private static final CssMetaData SHOW_MAJOR_TICKS =
+ FACTORY.createBooleanCssMetaData(
+ "-mfx-show-major-ticks",
+ MFXSlider::showMajorTicksProperty,
+ false
+ );
+
+ private static final CssMetaData SHOW_MINOR_TICKS =
+ FACTORY.createBooleanCssMetaData(
+ "-mfx-show-minor-ticks",
+ MFXSlider::showMinorTicksProperty,
+ false
+ );
+
+ private static final CssMetaData SHOW_TICKS_AT_EDGE =
+ FACTORY.createBooleanCssMetaData(
+ "-mfx-show-ticks-at-edge",
+ MFXSlider::showTicksAtEdgesProperty,
+ true
+ );
+
+ private static final CssMetaData MINOR_TICKS_COUNT =
+ FACTORY.createSizeCssMetaData(
+ "-mfx-minor-ticks-count",
+ MFXSlider::minorTicksCountProperty,
+ 5
+ );
+
+ private static final CssMetaData ANIMATE_ON_PRESS =
+ FACTORY.createBooleanCssMetaData(
+ "-mfx-animate-on-press",
+ MFXSlider::animateOnPressProperty,
+ true
+ );
+
+ private static final CssMetaData BIDIRECTIONAL =
+ FACTORY.createBooleanCssMetaData(
+ "-mfx-bidirectional",
+ MFXSlider::bidirectionalProperty,
+ true
+ );
+
+ private static final CssMetaData ORIENTATION =
+ FACTORY.createEnumCssMetaData(
+ Orientation.class,
+ "-mfx-orientation",
+ MFXSlider::orientationProperty,
+ Orientation.HORIZONTAL
+ );
+
+ private static final CssMetaData POPUP_SIDE =
+ FACTORY.createEnumCssMetaData(
+ SliderPopupSide.class,
+ "-mfx-popup-side",
+ MFXSlider::popupSideProperty,
+ SliderPopupSide.DEFAULT
+ );
+
+ static {
+ cssMetaDataList = List.of(
+ SLIDER_MODE, UNIT_INCREMENT, ALTERNATIVE_UNIT_INCREMENT,
+ TICK_UNIT, SHOW_MAJOR_TICKS, SHOW_MINOR_TICKS, SHOW_TICKS_AT_EDGE, MINOR_TICKS_COUNT,
+ ANIMATE_ON_PRESS, BIDIRECTIONAL, ORIENTATION, POPUP_SIDE
+ );
+ }
+ }
+
+ public static List> getControlCssMetaDataList() {
+ return StyleableProperties.cssMetaDataList;
+ }
+
+ //================================================================================
+ // Override Methods
+ //================================================================================
+ @Override
+ protected Skin> createDefaultSkin() {
+ return new MFXSliderSkin(this);
+ }
+
+ @Override
+ protected List> getControlCssMetaData() {
+ return MFXSlider.getControlCssMetaDataList();
+ }
+
+ @Override
+ public String getUserAgentStylesheet() {
+ return STYLESHEET;
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStageDialog.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStageDialog.java
index 43461b70..add88ad2 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStageDialog.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStageDialog.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -23,9 +23,9 @@
import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
import io.github.palexdev.materialfx.controls.factories.MFXStageDialogFactory;
import io.github.palexdev.materialfx.effects.MFXScrimEffect;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
import javafx.animation.KeyFrame;
import javafx.animation.ParallelTransition;
-import javafx.animation.Timeline;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.event.EventHandler;
@@ -123,8 +123,12 @@ private void initialize() {
/**
* Shows the dialog by showing the stage, center the stage in its owner and plays animations if requested
+ * Common method to avoid duplicate code for {@link #show()} and {@link #showAndWait()}.
+ *
+ * This is responsible for playing the show animation, add the scrim effect, and setting the stage position
+ * on screen.
*/
- public void show() {
+ protected void showCommon() {
if (dialogStage.getScene() == null) {
throw new NullPointerException("The dialog has not been set!");
}
@@ -138,11 +142,12 @@ public void show() {
throw new IllegalStateException("Scrim background is set to true but the dialog stage owner is null or modality is not set!!");
}
if (animate) {
- Timeline fadeInScrim = MFXAnimationFactory.FADE_IN.build(scrimEffect.getScrimNode(), animationMillis);
- fadeInScrim.getKeyFrames().add(
- new KeyFrame(Duration.ONE, event -> scrimEffect.scrimWindow(dialogStage.getOwner(), scrimOpacity))
+ inAnimation.getChildren().add(
+ AnimationUtils.TimelineBuilder.build()
+ .add(new KeyFrame(Duration.ZERO, event -> scrimEffect.scrimWindow(dialogStage.getOwner(), scrimOpacity)))
+ .show(animationMillis, scrimEffect.getScrimNode())
+ .getAnimation()
);
- inAnimation.getChildren().add(fadeInScrim);
} else {
scrimEffect.scrimWindow(dialogStage.getOwner(), scrimOpacity);
}
@@ -161,10 +166,24 @@ public void show() {
dialogStage.setX(manualX);
dialogStage.setY(manualY);
}
+ }
+ /**
+ * Calls {@link #showCommon()} and then {@link Stage#show()}.
+ */
+ public void show() {
+ showCommon();
this.dialogStage.show();
}
+ /**
+ * Calls {@link #showCommon()} and then {@link Stage#showAndWait()}.
+ */
+ public void showAndWait() {
+ showCommon();
+ this.dialogStage.showAndWait();
+ }
+
/**
* Closes the dialog by closing the stage, plays animations if requested.
*/
@@ -175,9 +194,12 @@ public void close() {
if (scrimBackground) {
if (animate) {
- Timeline fadeOutScrim = MFXAnimationFactory.FADE_OUT.build(scrimEffect.getScrimNode(), animationMillis);
- fadeOutScrim.setOnFinished(event -> scrimEffect.removeEffect(dialogStage.getOwner()));
- outAnimation.getChildren().add(fadeOutScrim);
+ outAnimation.getChildren().add(
+ AnimationUtils.TimelineBuilder.build()
+ .hide(animationMillis, scrimEffect.getScrimNode())
+ .setOnFinished(event -> scrimEffect.removeEffect(dialogStage.getOwner()))
+ .getAnimation()
+ );
} else {
scrimEffect.removeEffect(dialogStage.getOwner());
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepper.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepper.java
index 7db0a1f8..b6086963 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepper.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepper.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepperToggle.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepperToggle.java
index 04af4b67..79209c98 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepperToggle.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXStepperToggle.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableRow.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableRow.java
index 2f2e4de8..0e801eb7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableRow.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableRow.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableSortModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableSortModel.java
index 1e349ba1..e0d02ae0 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableSortModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableSortModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableView.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableView.java
index 14177ec6..d0d7f787 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableView.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableView.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -374,7 +374,7 @@ public String getUserAgentStylesheet() {
*/
public static class MFXTableViewEvent extends Event {
- public static EventType FORCE_UPDATE_EVENT = new EventType<>(ANY, "FORCE_UPDATE_EVENT");
+ public static final EventType FORCE_UPDATE_EVENT = new EventType<>(ANY, "FORCE_UPDATE_EVENT");
public MFXTableViewEvent(EventType extends Event> eventType) {
super(eventType);
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTextField.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTextField.java
index f44b39d1..a6d493d5 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTextField.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTextField.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -23,6 +23,7 @@
import io.github.palexdev.materialfx.font.MFXFontIcon;
import io.github.palexdev.materialfx.skins.MFXTextFieldSkin;
import io.github.palexdev.materialfx.utils.ColorUtils;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import io.github.palexdev.materialfx.validation.MFXDialogValidator;
import io.github.palexdev.materialfx.validation.base.AbstractMFXValidator;
import io.github.palexdev.materialfx.validation.base.Validated;
@@ -40,6 +41,8 @@
import javafx.scene.paint.Paint;
import javafx.scene.shape.StrokeLineCap;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;
@@ -107,16 +110,15 @@ private void setupValidator() {
}
});
- sceneProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null)
- if (isValidated()) {
- if (getValidator().isInitControlValidation()) {
- pseudoClassStateChanged(INVALID_PSEUDO_CLASS, !isValid());
- } else {
- pseudoClassStateChanged(INVALID_PSEUDO_CLASS, false);
- }
+ NodeUtils.waitForScene(this, () -> {
+ if (isValidated()) {
+ if (getValidator().isInitControlValidation()) {
+ pseudoClassStateChanged(INVALID_PSEUDO_CLASS, !isValid());
+ } else {
+ pseudoClassStateChanged(INVALID_PSEUDO_CLASS, false);
}
- });
+ }
+ }, true, false);
}
@Override
@@ -529,12 +531,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(
- TEXT_LIMIT,
- LINE_COLOR, UNFOCUSED_LINE_COLOR,
- LINE_STROKE_WIDTH, LINE_STROKE_CAP,
- IS_VALIDATED
- );
+ List> tefCssMetaData = new ArrayList<>(TextField.getClassCssMetaData());
+ Collections.addAll(tefCssMetaData, TEXT_LIMIT, LINE_COLOR, UNFOCUSED_LINE_COLOR, LINE_STROKE_WIDTH, LINE_STROKE_CAP, IS_VALIDATED);
+ cssMetaDataList = Collections.unmodifiableList(tefCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXToggleButton.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXToggleButton.java
index 0f05162e..e2c6f174 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXToggleButton.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXToggleButton.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -29,6 +29,8 @@
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -263,11 +265,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(
- TOGGLE_COLOR, UNTOGGLE_COLOR,
- TOGGLE_LINE_COLOR, UNTOGGLE_LINE_COLOR,
- SIZE
- );
+ List> tobCssMetaData = new ArrayList<>(ToggleButton.getClassCssMetaData());
+ Collections.addAll(tobCssMetaData, TOGGLE_COLOR, UNTOGGLE_COLOR, TOGGLE_LINE_COLOR, UNTOGGLE_LINE_COLOR, SIZE);
+ cssMetaDataList = Collections.unmodifiableList(tobCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTooltip.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTooltip.java
index 02c42901..f67d62f7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTooltip.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTooltip.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeItem.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeItem.java
index 65680e09..1ce5c787 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeItem.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeItem.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeView.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeView.java
index ce592e2d..003853ba 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeView.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTreeView.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
@@ -22,16 +22,14 @@
import io.github.palexdev.materialfx.controls.base.AbstractMFXTreeItem;
import io.github.palexdev.materialfx.selection.TreeSelectionModel;
import io.github.palexdev.materialfx.selection.base.ITreeSelectionModel;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
import javafx.event.Event;
import javafx.event.EventType;
import javafx.geometry.Insets;
-import javafx.scene.control.Skin;
/**
* This is the container for a tree made of AbstractMFXTreeItems.
@@ -104,15 +102,11 @@ public void setupRoot() {
AbstractMFXTreeItem root = getRoot();
root.prefWidthProperty().bind(widthProperty().subtract(10));
root.setPadding(new Insets(0, 0, 5, 0));
- root.skinProperty().addListener(new ChangeListener<>() {
- @Override
- public void changed(ObservableValue extends Skin>> observable, Skin> oldValue, Skin> newValue) {
- if (newValue != null && !isShowRoot()) {
- root.fireEvent(new TreeViewEvent(TreeViewEvent.HIDE_ROOT_EVENT, isShowRoot()));
- }
- root.skinProperty().removeListener(this);
+ NodeUtils.waitForSkin(root, () -> {
+ if (!isShowRoot()) {
+ root.fireEvent(new TreeViewEvent(TreeViewEvent.HIDE_ROOT_EVENT, isShowRoot()));
}
- });
+ }, true, true);
}
/**
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXVLoader.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXVLoader.java
index 2702c3e0..c017855f 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXVLoader.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXVLoader.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/SimpleMFXNotificationPane.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/SimpleMFXNotificationPane.java
index 2f4d79ef..368db000 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/SimpleMFXNotificationPane.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/SimpleMFXNotificationPane.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXDialog.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXDialog.java
index 0593cae3..4f3f1b56 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXDialog.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXDialog.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
@@ -180,7 +180,6 @@ public AbstractMFXDialog() {
setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
MFXButton button = new MFXButton("");
- button.addEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler);
closeButtons.add(button);
}
@@ -188,8 +187,11 @@ public AbstractMFXDialog() {
// Abstract Methods
//================================================================================
public abstract void show();
+
public abstract void close();
+
public abstract AbstractMFXDialog setActions(HBox actionsBox);
+
public abstract void computeSizeAndPosition();
//================================================================================
@@ -258,14 +260,10 @@ public List getCloseButtons() {
* @param buttons The new close button
*/
public void setCloseButtons(Node... buttons) {
- for (Node closeButton : closeButtons) {
- closeButton.removeEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler);
- }
+ closeButtons.forEach(btn -> btn.removeEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler));
closeButtons.clear();
closeButtons.addAll(List.of(buttons));
- for (Node closeButton : closeButtons) {
- closeButton.addEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler);
- }
+ closeButtons.forEach(btn -> btn.addEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler));
}
public EventHandler getCloseHandler() {
@@ -280,10 +278,10 @@ public EventHandler getCloseHandler() {
* @param newHandler The new close handler
*/
public void setCloseHandler(EventHandler newHandler) {
- for (Node closeButton : closeButtons) {
+ closeButtons.forEach(closeButton -> {
closeButton.removeEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler);
closeButton.addEventHandler(MouseEvent.MOUSE_PRESSED, newHandler);
- }
+ });
this.closeHandler = newHandler;
}
@@ -425,7 +423,7 @@ protected void clearDragHandlers() {
/**
* Events class for MFXDialogs.
*
- * Defines four new EvenTypes:
+ * Defines four new EvenTypes:
*
* - BEFORE_OPEN_EVENT: should be fired at the start of the {@link #show()} method or even before.
* - ON_OPENED_EVENT : should be fired when the dialog is set to visible or at the end of the show animation.
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListCell.java
index 51aacaed..98e13fee 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListView.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListView.java
index e12a4050..bdab51fb 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListView.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXFlowlessListView.java
@@ -1,46 +1,35 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
-import io.github.palexdev.materialfx.controls.flowless.VirtualFlow;
import io.github.palexdev.materialfx.effects.DepthLevel;
import io.github.palexdev.materialfx.selection.base.IListSelectionModel;
import io.github.palexdev.materialfx.utils.ColorUtils;
-import javafx.animation.Animation;
-import javafx.animation.KeyFrame;
-import javafx.animation.Timeline;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.css.*;
-import javafx.event.EventHandler;
import javafx.scene.control.Control;
-import javafx.scene.control.Skin;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.input.ScrollEvent;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.util.Duration;
-import org.reactfx.value.Var;
import java.util.List;
import java.util.function.Function;
@@ -118,88 +107,13 @@ protected void addBarsListeners() {
*/
protected void setColors() {
StringBuilder sb = new StringBuilder();
- sb.append("-mfx-track-color: ").append(ColorUtils.rgb((Color) trackColor.get()))
- .append(";\n-mfx-thumb-color: ").append(ColorUtils.rgb((Color) thumbColor.get()))
- .append(";\n-mfx-thumb-hover-color: ").append(ColorUtils.rgb((Color) thumbHoverColor.get()))
+ sb.append("-mfx-track-color: ").append(ColorUtils.toCss(trackColor.get()))
+ .append(";\n-mfx-thumb-color: ").append(ColorUtils.toCss(thumbColor.get()))
+ .append(";\n-mfx-thumb-hover-color: ").append(ColorUtils.toCss(thumbHoverColor.get()))
.append(";");
setStyle(sb.toString());
}
- public static void setSmoothScrolling(AbstractMFXFlowlessListView, ?, ?> listView) {
- setSmoothScrolling(listView, 1);
- }
-
- public static void setSmoothScrolling(AbstractMFXFlowlessListView, ?, ?> listView, int speed) {
- if (listView.getScene() != null) {
- VirtualFlow, ?> flow = (VirtualFlow, ?>) listView.lookup(".virtual-flow");
- setSmoothScrolling(flow, flow.estimatedScrollYProperty(), speed);
- } else {
- listView.skinProperty().addListener(new ChangeListener<>() {
- @Override
- public void changed(ObservableValue extends Skin>> observable, Skin> oldValue, Skin> newValue) {
- if (newValue != null) {
- VirtualFlow, ?> flow = (VirtualFlow, ?>) listView.lookup(".virtual-flow");
- setSmoothScrolling(flow, flow.estimatedScrollYProperty(), speed);
- listView.skinProperty().removeListener(this);
- }
- }
- });
- }
- }
-
- private static void setSmoothScrolling(VirtualFlow, ?> flow, Var scrollDirection, int speed) {
- final double[] frictions = {0.99, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.04, 0.01, 0.008, 0.008, 0.008, 0.008, 0.0006, 0.0005, 0.00003, 0.00001};
- final double[] pushes = {speed};
- final double[] derivatives = new double[frictions.length];
-
- Timeline timeline = new Timeline();
- final EventHandler dragHandler = event -> timeline.stop();
-
- final EventHandler scrollHandler = event -> {
- if (event.getEventType() == ScrollEvent.SCROLL) {
- int direction = event.getDeltaY() > 0 ? -1 : 1;
- for (int i = 0; i < pushes.length; i++) {
- derivatives[i] += direction * pushes[i];
- }
- if (timeline.getStatus() == Animation.Status.STOPPED) {
- timeline.play();
- }
- event.consume();
- }
- };
-
- if (flow.getParent() != null) {
- flow.getParent().addEventFilter(MouseEvent.DRAG_DETECTED, dragHandler);
- }
- flow.parentProperty().addListener((observable, oldValue, newValue) -> {
- if (oldValue != null) {
- oldValue.removeEventFilter(MouseEvent.DRAG_DETECTED, dragHandler);
- }
- if (newValue != null) {
- newValue.addEventFilter(MouseEvent.DRAG_DETECTED, dragHandler);
- }
- });
- flow.addEventFilter(MouseEvent.DRAG_DETECTED, dragHandler);
- flow.addEventFilter(ScrollEvent.ANY, scrollHandler);
-
- timeline.getKeyFrames().add(new KeyFrame(Duration.millis(3), (event) -> {
- for (int i = 0; i < derivatives.length; i++) {
- derivatives[i] *= frictions[i];
- }
- for (int i = 1; i < derivatives.length; i++) {
- derivatives[i] += derivatives[i - 1];
- }
- double dy = derivatives[derivatives.length - 1];
-
- scrollDirection.setValue(scrollDirection.getValue() + dy);
-
- if (Math.abs(dy) < 0.001) {
- timeline.stop();
- }
- }));
- timeline.setCycleCount(Animation.INDEFINITE);
- }
-
//================================================================================
// Override Methods
//================================================================================
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXNotificationPane.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXNotificationPane.java
index c5ad3e3e..163be3fe 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXNotificationPane.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXNotificationPane.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXToggleNode.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXToggleNode.java
index 888a6784..776a24ad 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXToggleNode.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXToggleNode.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
@@ -26,6 +26,8 @@
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
public abstract class AbstractMFXToggleNode extends ToggleButton {
@@ -249,11 +251,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(
- UNSELECTED_COLOR, SELECTED_COLOR,
- UNSELECTED_BORDER_COLOR, SELECTED_BORDER_COLOR,
- LABEL_TEXT_GAP
- );
+ List> tonCssMetaData = new ArrayList<>(ToggleButton.getClassCssMetaData());
+ Collections.addAll(tonCssMetaData, UNSELECTED_COLOR, SELECTED_COLOR, UNSELECTED_BORDER_COLOR, SELECTED_BORDER_COLOR, LABEL_TEXT_GAP);
+ cssMetaDataList = Collections.unmodifiableList(tonCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeCell.java
index fd62ff50..c8a3e4c0 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeItem.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeItem.java
index ac8121bd..56722be7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeItem.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/AbstractMFXTreeItem.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/IListView.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/IListView.java
index 19cd4f1d..2e25c74d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/IListView.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/IListView.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXCheckTreeCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXCheckTreeCell.java
index a3f9ce53..25d38901 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXCheckTreeCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXCheckTreeCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXDateCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXDateCell.java
index a195d424..68b82394 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXDateCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXDateCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessCheckListCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessCheckListCell.java
index 0af0e646..76cd9bc3 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessCheckListCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessCheckListCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessListCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessListCell.java
index 8ca51038..1cd2a1a5 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessListCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXFlowlessListCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXListCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXListCell.java
index 0134e4e0..f41519cb 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXListCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXListCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
@@ -33,6 +33,8 @@
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@@ -258,7 +260,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(SELECTED_COLOR, HOVER_COLOR, CORNER_RADIUS, BACKGROUND_INSETS);
+ List> licCssMetaData = new ArrayList<>(ListCell.getClassCssMetaData());
+ Collections.addAll(licCssMetaData, SELECTED_COLOR, HOVER_COLOR, CORNER_RADIUS, BACKGROUND_INSETS);
+ cssMetaDataList = Collections.unmodifiableList(licCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXSimpleTreeCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXSimpleTreeCell.java
index d8041148..08b8c329 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXSimpleTreeCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXSimpleTreeCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableColumn.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableColumn.java
index 4ab799ba..fd40cb96 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableColumn.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableColumn.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableRowCell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableRowCell.java
index 9f07eac8..0181b6e1 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableRowCell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/cell/MFXTableRowCell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.cell;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ButtonType.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ButtonType.java
index 12dea607..c6ed9e7b 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ButtonType.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ButtonType.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/DialogType.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/DialogType.java
index 8f33e4a7..420152ab 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/DialogType.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/DialogType.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/LoaderCacheLevel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/LoaderCacheLevel.java
index fac5a31f..77afd229 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/LoaderCacheLevel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/LoaderCacheLevel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SliderEnums.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SliderEnums.java
new file mode 100644
index 00000000..2f2e9102
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SliderEnums.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.controls.enums;
+
+public class SliderEnums {
+
+ private SliderEnums() {}
+
+ public enum SliderMode {
+ DEFAULT, SNAP_TO_TICKS
+ }
+
+ public enum SliderPopupSide {
+ DEFAULT, OTHER_SIDE
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SortState.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SortState.java
index 4db24a5e..1b05d8a0 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SortState.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/SortState.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/StepperToggleState.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/StepperToggleState.java
index 5e5e83a4..72b540a4 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/StepperToggleState.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/StepperToggleState.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/Styles.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/Styles.java
index 7a197283..279d095a 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/Styles.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/Styles.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
@@ -25,6 +25,9 @@
* These emulators basically are just helpers that store the path to the right css file.
*/
public class Styles {
+
+ private Styles() {}
+
public enum ComboBoxStyles {
STYLE1("css/MFXComboBoxStyle1.css"),
STYLE2("css/MFXComboBoxStyle2.css"),
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/TextPosition.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/TextPosition.java
index 4fde0133..94360945 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/TextPosition.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/TextPosition.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.enums;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ToggleNodeShape.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ToggleNodeShape.java
deleted file mode 100644
index cceabc40..00000000
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/enums/ToggleNodeShape.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
- *
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
- */
-
-package io.github.palexdev.materialfx.controls.enums;
-
-public enum ToggleNodeShape {
- CIRCLE,
- RECTANGLE
-}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXAnimationFactory.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXAnimationFactory.java
index ca71f201..7f642b8d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXAnimationFactory.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXAnimationFactory.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.factories;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXDialogFactory.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXDialogFactory.java
index 9ee9ae1d..771a4e17 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXDialogFactory.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXDialogFactory.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.factories;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXStageDialogFactory.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXStageDialogFactory.java
index 79a2f182..86010b4c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXStageDialogFactory.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/MFXStageDialogFactory.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.factories;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/RippleClipTypeFactory.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/RippleClipTypeFactory.java
index 58dcb4ba..ef878499 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/RippleClipTypeFactory.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/factories/RippleClipTypeFactory.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.factories;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Cell.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Cell.java
index c90e4519..3a3f537d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Cell.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Cell.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellListManager.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellListManager.java
index 17cc2209..d24eb504 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellListManager.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellListManager.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPool.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPool.java
index 78184764..2a22f969 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPool.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPool.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPositioner.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPositioner.java
index d72c61c5..af6e87cb 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPositioner.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellPositioner.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellWrapper.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellWrapper.java
index b39d0016..8a16928c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellWrapper.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/CellWrapper.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/MFXVirtualizedScrollPane.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/MFXVirtualizedScrollPane.java
index 212b81e9..5219ddb7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/MFXVirtualizedScrollPane.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/MFXVirtualizedScrollPane.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Navigator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Navigator.java
index 156fe07c..dd12fba9 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Navigator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Navigator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/OrientationHelper.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/OrientationHelper.java
index f810ff87..657a32b7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/OrientationHelper.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/OrientationHelper.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/ScaledVirtualized.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/ScaledVirtualized.java
index 3db8c5d7..12b08043 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/ScaledVirtualized.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/ScaledVirtualized.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/SizeTracker.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/SizeTracker.java
index f7475dbd..4b077989 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/SizeTracker.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/SizeTracker.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/StableBidirectionalVar.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/StableBidirectionalVar.java
index a950cacc..4d0d7898 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/StableBidirectionalVar.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/StableBidirectionalVar.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/TargetPosition.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/TargetPosition.java
index 2cbb8c11..5501f42e 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/TargetPosition.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/TargetPosition.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlow.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlow.java
index 4d8d8afb..91c43695 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlow.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlow.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlowHit.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlowHit.java
index 15238282..61e9d8f3 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlowHit.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualFlowHit.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Virtualized.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Virtualized.java
index 62b7a973..a860c701 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Virtualized.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/Virtualized.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualizedScrollPane.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualizedScrollPane.java
index c58930ed..e0d323dd 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualizedScrollPane.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/flowless/VirtualizedScrollPane.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.flowless;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyComboBox.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyComboBox.java
index cebfe8e8..aec9cca9 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyComboBox.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyComboBox.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.legacy;
@@ -24,6 +24,7 @@
import io.github.palexdev.materialfx.controls.cell.MFXListCell;
import io.github.palexdev.materialfx.controls.enums.DialogType;
import io.github.palexdev.materialfx.skins.legacy.MFXLegacyComboBoxSkin;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import io.github.palexdev.materialfx.validation.MFXDialogValidator;
import io.github.palexdev.materialfx.validation.base.AbstractMFXValidator;
import io.github.palexdev.materialfx.validation.base.Validated;
@@ -42,6 +43,8 @@
import javafx.scene.paint.Paint;
import javafx.scene.shape.StrokeLineCap;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;
@@ -118,16 +121,15 @@ private void setupValidator() {
}
});
- sceneProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null)
- if (isValidated()) {
- if (getValidator().isInitControlValidation()) {
- pseudoClassStateChanged(INVALID_PSEUDO_CLASS, !isValid());
- } else {
- pseudoClassStateChanged(INVALID_PSEUDO_CLASS, false);
- }
+ NodeUtils.waitForScene(this, () -> {
+ if (isValidated()) {
+ if (getValidator().isInitControlValidation()) {
+ pseudoClassStateChanged(INVALID_PSEUDO_CLASS, !isValid());
+ } else {
+ pseudoClassStateChanged(INVALID_PSEUDO_CLASS, false);
}
- });
+ }
+ }, true, false);
}
@Override
@@ -428,12 +430,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(
- ANIMATE_LINES,
- LINE_COLOR, UNFOCUSED_LINE_COLOR,
- LINE_STROKE_WIDTH, LINE_STROKE_CAP,
- IS_VALIDATED
- );
+ List> lcbCssMetaData = new ArrayList<>(ComboBox.getClassCssMetaData());
+ Collections.addAll(lcbCssMetaData, ANIMATE_LINES, LINE_COLOR, UNFOCUSED_LINE_COLOR, LINE_STROKE_WIDTH, LINE_STROKE_CAP, IS_VALIDATED);
+ cssMetaDataList = Collections.unmodifiableList(lcbCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableRow.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableRow.java
index 5c2529a2..f14792c4 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableRow.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableRow.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.legacy;
@@ -32,6 +32,8 @@
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -177,7 +179,9 @@ private static class StyleableProperties {
);
static {
- cssMetaDataList = List.of(SELECTED_COLOR, HOVER_COLOR);
+ List> tarCssMetaData = new ArrayList<>(TableRow.getClassCssMetaData());
+ Collections.addAll(tarCssMetaData, SELECTED_COLOR, HOVER_COLOR);
+ cssMetaDataList = Collections.unmodifiableList(tarCssMetaData);
}
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableView.java b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableView.java
index 4660019d..d23bd16b 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableView.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/controls/legacy/MFXLegacyTableView.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.controls.legacy;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/DepthLevel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/DepthLevel.java
index dc5ea84e..556d3c68 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/DepthLevel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/DepthLevel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXDepthManager.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXDepthManager.java
index 03c0c2a7..0b627062 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXDepthManager.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXDepthManager.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXScrimEffect.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXScrimEffect.java
index 56c83ec0..2cf2d56b 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXScrimEffect.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/MFXScrimEffect.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/MFXCircleRippleGenerator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/MFXCircleRippleGenerator.java
index ac509fbd..d44be747 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/MFXCircleRippleGenerator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/MFXCircleRippleGenerator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple;
@@ -25,6 +25,8 @@
import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator.CircleRipple;
import io.github.palexdev.materialfx.effects.ripple.base.AbstractMFXRippleGenerator;
import io.github.palexdev.materialfx.effects.ripple.base.IRipple;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import javafx.animation.*;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
@@ -157,11 +159,12 @@ protected Animation getBackgroundAnimation() {
}
});
- return new Timeline(
- new KeyFrame(Duration.ZERO, event -> getChildren().add(0, shape)),
- new KeyFrame(Duration.millis(300), new KeyValue(shape.opacityProperty(), getBackgroundOpacity())),
- new KeyFrame(Duration.millis(450), new KeyValue(shape.opacityProperty(), 0, Interpolator.LINEAR))
- );
+ return AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.ZERO, event -> getChildren().add(0, shape)),
+ KeyFrames.of(Duration.millis(300), shape.opacityProperty(), getBackgroundOpacity()),
+ KeyFrames.of(Duration.millis(450), shape.opacityProperty(), 0, Interpolator.LINEAR)
+ ).getAnimation();
}
/**
@@ -354,12 +357,13 @@ public Animation getAnimation() {
mul = computeRadiusMultiplier(xPosition);
}
- return new Timeline(
- new KeyFrame(Duration.millis(150), new KeyValue(radiusProperty(), getRippleRadius())),
- new KeyFrame(Duration.millis(400), new KeyValue(radiusProperty(), (getRippleRadius() * mul))),
- new KeyFrame(Duration.millis(1200), new KeyValue(opacityProperty(), 0, MFXAnimationFactory.getInterpolatorV2())),
- new KeyFrame(Duration.millis(500), event -> animationsStack.pop())
- );
+ return AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(150, radiusProperty(), getRippleRadius()),
+ KeyFrames.of(400, radiusProperty(), (getRippleRadius() * mul)),
+ KeyFrames.of(1200, opacityProperty(), 0, MFXAnimationFactory.getInterpolatorV2()),
+ KeyFrames.of(500, event -> animationsStack.pop())
+ ).getAnimation();
}
public void setXPosition(double xPosition) {
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleClipType.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleClipType.java
index dab41a8e..5b1c4733 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleClipType.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleClipType.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleGenerator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleGenerator.java
index 14ee565c..1dd1bfb8 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleGenerator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RippleGenerator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RipplePosition.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RipplePosition.java
index b05c1674..4b1e8512 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RipplePosition.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/RipplePosition.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/AbstractMFXRippleGenerator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/AbstractMFXRippleGenerator.java
index cb0c0642..f9056f7a 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/AbstractMFXRippleGenerator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/AbstractMFXRippleGenerator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRipple.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRipple.java
index e71595f6..7fd1be42 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRipple.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRipple.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRippleGenerator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRippleGenerator.java
index 10951540..60f94b36 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRippleGenerator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/effects/ripple/base/IRippleGenerator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.effects.ripple.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/EvaluationMode.java b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/EvaluationMode.java
index b8af6713..166d8a18 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/EvaluationMode.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/EvaluationMode.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.filter;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/IFilterable.java b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/IFilterable.java
index 0bdf4e61..b5b8986f 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/IFilterable.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/IFilterable.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.filter;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXEvaluationBox.java b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXEvaluationBox.java
index 0035dc10..0b172361 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXEvaluationBox.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXEvaluationBox.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.filter;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXFilterDialog.java b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXFilterDialog.java
index 6f35b5f9..8fdd0b96 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXFilterDialog.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/filter/MFXFilterDialog.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.filter;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontHandler.java b/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontHandler.java
index 29c65538..f0fb9d4c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontHandler.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontHandler.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.font;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontResources.java b/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontResources.java
index 8cdab0dc..61680d88 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontResources.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/font/FontResources.java
@@ -1,25 +1,25 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.font;
/**
- * Enumerator class for MaterialFX font resources. (Count: 81)
+ * Enumerator class for MaterialFX font resources. (Count: 95)
*/
public enum FontResources {
ANGLE_DOWN("mfx-angle-down", '\uE900'),
@@ -56,53 +56,67 @@ public enum FontResources {
EXPAND("mfx-expand", '\uE91F'),
EYE("mfx-eye", '\uE920'),
EYE_SLASH("mfx-eye-slash", '\uE921'),
- FILTER("mfx-filter", '\uE922'),
- FILTER_ALT("mfx-filter-alt", '\uE923'),
- FILTER_ALT_CLEAR("mfx-filter-alt-clear", '\uE924'),
- FIRST_PAGE("mfx-first-page", '\uE925'),
- FIT("mfx-fit", '\uE926'),
- GEAR("mfx-gear", '\uE927'),
- GOOGLE("mfx-google", '\uE928'),
- GOOGLE_DRIVE("mfx-google-drive", '\uE929'),
- HOME("mfx-home", '\uE92A'),
- INFO("mfx-info", '\uE92B'),
- INFO_CIRCLE("mfx-info-circle", '\uE92C'),
- LAST_PAGE("mfx-last-page", '\uE92D'),
- LEVEL_UP("mfx-level-up", '\uE92E'),
- LOCK("mfx-lock", '\uE92F'),
- LOCK_OPEN("mfx-lock-open", '\uE930'),
- MINUS("mfx-minus", '\uE931'),
- MINUS_CIRCLE("mfx-minus-circle", '\uE932'),
- MODENA_MARK("mfx-modena-mark", '\uE933'),
- NEXT("mfx-next", '\uE934'),
- REDO("mfx-redo", '\uE935'),
- RESTORE("mfx-restore", '\uE936'),
- SEARCH("mfx-search", '\uE937'),
- SEARCH_PLUS("mfx-search-plus", '\uE938'),
- SELECT_ALL("mfx-select-all", '\uE939'),
- SLIDERS("mfx-sliders", '\uE93A'),
- STEP_BACKWARD("mfx-step-backward", '\uE93B'),
- STEP_FORWARD("mfx-step-forward", '\uE93C'),
- SYNC("mfx-sync", '\uE93D'),
- SYNC_LIGHT("mfx-sync-light", '\uE93E'),
- UNDO("mfx-undo", '\uE93F'),
- USER("mfx-user", '\uE940'),
- USERS("mfx-users", '\uE941'),
- VARIANT10_MARK("mfx-variant10-mark", '\uE942'),
- VARIANT11_MARK("mfx-variant11-mark", '\uE943'),
- VARIANT12_MARK("mfx-variant12-mark", '\uE944'),
- VARIANT3_MARK("mfx-variant3-mark", '\uE945'),
- VARIANT4_MARK("mfx-variant4-mark", '\uE946'),
- VARIANT5_MARK("mfx-variant5-mark", '\uE947'),
- VARIANT6_MARK("mfx-variant6-mark", '\uE948'),
- VARIANT7_MARK("mfx-variant7-mark", '\uE949'),
- VARIANT8_MARK("mfx-variant8-mark", '\uE94A'),
- VARIANT9_MARK("mfx-variant9-mark", '\uE94B'),
- X("mfx-x", '\uE94C'),
- X_ALT("mfx-x-alt", '\uE94D'),
- X_CIRCLE("mfx-x-circle", '\uE94E'),
- X_CIRCLE_LIGHT("mfx-x-circle-light", '\uE94F'),
- X_LIGHT("mfx-x-light", '\uE950'),
+ FILE("mfx-file", '\uE922'),
+ FILTER("mfx-filter", '\uE923'),
+ FILTER_ALT("mfx-filter-alt", '\uE924'),
+ FILTER_ALT_CLEAR("mfx-filter-alt-clear", '\uE925'),
+ FIRST_PAGE("mfx-first-page", '\uE926'),
+ FIT("mfx-fit", '\uE927'),
+ FOLDER("mfx-folder", '\uE928'),
+ GEAR("mfx-gear", '\uE929'),
+ GOOGLE("mfx-google", '\uE92A'),
+ GOOGLE_DRAWING("mfx-google-drawing", '\uE92B'),
+ GOOGLE_DRIVE("mfx-google-drive", '\uE92C'),
+ GOOGLE_FORMS("mfx-google-forms", '\uE92D'),
+ GOOGLE_FUSION_TABLES("mfx-google-fusion-tables", '\uE92E'),
+ GOOGLE_PRESENTATION("mfx-google-presentation", '\uE92F'),
+ GOOGLE_SCRIPT("mfx-google-script", '\uE930'),
+ GOOGLE_SITES("mfx-google-sites", '\uE931'),
+ HOME("mfx-home", '\uE932'),
+ IMAGE("mfx-image", '\uE933'),
+ INFO("mfx-info", '\uE934'),
+ INFO_CIRCLE("mfx-info-circle", '\uE935'),
+ LAST_PAGE("mfx-last-page", '\uE936'),
+ LEVEL_UP("mfx-level-up", '\uE937'),
+ LOCK("mfx-lock", '\uE938'),
+ LOCK_OPEN("mfx-lock-open", '\uE939'),
+ MAP("mfx-map", '\uE93A'),
+ MINUS("mfx-minus", '\uE93B'),
+ MINUS_CIRCLE("mfx-minus-circle", '\uE93C'),
+ MODENA_MARK("mfx-modena-mark", '\uE93D'),
+ MUSIC("mfx-music", '\uE93E'),
+ NEXT("mfx-next", '\uE93F'),
+ REDO("mfx-redo", '\uE940'),
+ RESTORE("mfx-restore", '\uE941'),
+ SEARCH("mfx-search", '\uE942'),
+ SEARCH_PLUS("mfx-search-plus", '\uE943'),
+ SELECT_ALL("mfx-select-all", '\uE944'),
+ SHORTCUT("mfx-shortcut", '\uE945'),
+ SLIDERS("mfx-sliders", '\uE946'),
+ SPREADSHEET("mfx-spreadsheet", '\uE947'),
+ STEP_BACKWARD("mfx-step-backward", '\uE948'),
+ STEP_FORWARD("mfx-step-forward", '\uE949'),
+ SYNC("mfx-sync", '\uE94A'),
+ SYNC_LIGHT("mfx-sync-light", '\uE94B'),
+ UNDO("mfx-undo", '\uE94C'),
+ USER("mfx-user", '\uE94D'),
+ USERS("mfx-users", '\uE94E'),
+ VARIANT10_MARK("mfx-variant10-mark", '\uE94F'),
+ VARIANT11_MARK("mfx-variant11-mark", '\uE950'),
+ VARIANT12_MARK("mfx-variant12-mark", '\uE951'),
+ VARIANT3_MARK("mfx-variant3-mark", '\uE952'),
+ VARIANT4_MARK("mfx-variant4-mark", '\uE953'),
+ VARIANT5_MARK("mfx-variant5-mark", '\uE954'),
+ VARIANT6_MARK("mfx-variant6-mark", '\uE955'),
+ VARIANT7_MARK("mfx-variant7-mark", '\uE956'),
+ VARIANT8_MARK("mfx-variant8-mark", '\uE957'),
+ VARIANT9_MARK("mfx-variant9-mark", '\uE958'),
+ VIDEO("mfx-video", '\uE959'),
+ X("mfx-x", '\uE95A'),
+ X_ALT("mfx-x-alt", '\uE95B'),
+ X_CIRCLE("mfx-x-circle", '\uE95C'),
+ X_CIRCLE_LIGHT("mfx-x-circle-light", '\uE95D'),
+ X_LIGHT("mfx-x-light", '\uE95E'),
;
public static FontResources findByDescription(String description) {
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/font/MFXFontIcon.java b/materialfx/src/main/java/io/github/palexdev/materialfx/font/MFXFontIcon.java
index 6e7cd2f9..ad8fe3a0 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/font/MFXFontIcon.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/font/MFXFontIcon.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.font;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationPos.java b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationPos.java
index c6793fd4..324ff521 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationPos.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationPos.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.notifications;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationsManager.java b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationsManager.java
index 2a7355eb..5d589746 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationsManager.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/NotificationsManager.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.notifications;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/PositionManager.java b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/PositionManager.java
index 6d1b37f4..9ddfdf7f 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/PositionManager.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/notifications/PositionManager.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.notifications;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ComboSelectionModelMock.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ComboSelectionModelMock.java
index 2fa4865f..83396703 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ComboSelectionModelMock.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ComboSelectionModelMock.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListCheckModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListCheckModel.java
index d3dd75b2..da6746ff 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListCheckModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListCheckModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListSelectionModel.java
index a784bdaa..fc2555ad 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/ListSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TableSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TableSelectionModel.java
index df46334c..714333cd 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TableSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TableSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeCheckModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeCheckModel.java
index 81eccf10..1a3e0d55 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeCheckModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeCheckModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeSelectionModel.java
index e8f9608a..866b2fc7 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/TreeSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListCheckModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListCheckModel.java
index 20b2b165..7fc23e13 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListCheckModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListCheckModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListSelectionModel.java
index 8dbf96ce..80934486 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/IListSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITableSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITableSelectionModel.java
index 2f54eab8..63c0ad87 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITableSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITableSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeCheckModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeCheckModel.java
index 563a028d..4465d482 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeCheckModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeCheckModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeSelectionModel.java b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeSelectionModel.java
index 2ea7de32..20cbb777 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeSelectionModel.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/selection/base/ITreeSelectionModel.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.selection.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXButtonSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXButtonSkin.java
index cebfb3e1..694c8c9b 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXButtonSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXButtonSkin.java
@@ -1,26 +1,24 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
import io.github.palexdev.materialfx.controls.MFXButton;
-import io.github.palexdev.materialfx.controls.enums.ButtonType;
-import io.github.palexdev.materialfx.effects.DepthLevel;
import io.github.palexdev.materialfx.effects.MFXDepthManager;
import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator;
import javafx.scene.control.skin.ButtonSkin;
@@ -52,17 +50,8 @@ private void setListeners() {
MFXButton button = (MFXButton) getSkinnable();
MFXCircleRippleGenerator rippleGenerator = button.getRippleGenerator();
- button.depthLevelProperty().addListener((observable, oldValue, newValue) -> {
- if (!newValue.equals(oldValue) && button.getButtonType().equals(ButtonType.RAISED)) {
- button.setEffect(MFXDepthManager.shadowOf(newValue));
- }
- });
-
- button.buttonTypeProperty().addListener((observable, oldValue, newValue) -> {
- if (!newValue.equals(oldValue)) {
- updateButtonType();
- }
- });
+ button.depthLevelProperty().addListener((observable, oldValue, newValue) -> updateButtonType());
+ button.buttonTypeProperty().addListener((observable, oldValue, newValue) -> updateButtonType());
button.addEventFilter(MouseEvent.MOUSE_PRESSED, rippleGenerator::generateRipple);
}
@@ -80,13 +69,15 @@ private void updateButtonType() {
break;
}
case FLAT: {
- button.setEffect(MFXDepthManager.shadowOf(DepthLevel.LEVEL0));
button.setPickOnBounds(true);
break;
}
}
}
+ //================================================================================
+ // Override Methods
+ //================================================================================
@Override
protected void updateChildren() {
super.updateChildren();
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckTreeItemSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckTreeItemSkin.java
index 52ad8bfb..2411634d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckTreeItemSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckTreeItemSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckboxSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckboxSkin.java
index ea6c6bab..5b4cc9d5 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckboxSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCheckboxSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -159,11 +159,7 @@ private void setListeners() {
* control's skinProperty, when the skin is not null and the CheckBox isSelected/isIndeterminate,
* play the animation.
*/
- checkBox.skinProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null) {
- updateColors();
- }
- });
+ NodeUtils.waitForSkin(checkBox, this::updateColors, true, false);
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCircleToggleNodeSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCircleToggleNodeSkin.java
index 7cebc3eb..75b710e2 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCircleToggleNodeSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXCircleToggleNodeSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXComboBoxSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXComboBoxSkin.java
index 15bffeb1..1bb3c16c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXComboBoxSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXComboBoxSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -29,15 +29,16 @@
import io.github.palexdev.materialfx.effects.ripple.RipplePosition;
import io.github.palexdev.materialfx.font.MFXFontIcon;
import io.github.palexdev.materialfx.selection.ComboSelectionModelMock;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import io.github.palexdev.materialfx.utils.LabelUtils;
import io.github.palexdev.materialfx.utils.NodeUtils;
import io.github.palexdev.materialfx.validation.MFXDialogValidator;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
+import javafx.animation.Animation;
import javafx.animation.ScaleTransition;
-import javafx.animation.Timeline;
import javafx.beans.InvalidationListener;
import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
import javafx.collections.MapChangeListener;
import javafx.event.EventHandler;
import javafx.geometry.*;
@@ -72,7 +73,7 @@ public class MFXComboBoxSkin extends SkinBase> {
private final Label validate;
private final double padding = 11;
- private Timeline arrowAnimation;
+ private Animation arrowAnimation;
//================================================================================
// Constructors
@@ -325,7 +326,7 @@ private void popupBehavior() {
}
});
- comboBox.skinProperty().addListener((observable, oldValue, newValue) -> comboBox.getScene().addEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler));
+ NodeUtils.waitForSkin(comboBox, () -> comboBox.getScene().addEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler), true, false);
comboBox.sceneProperty().addListener((observable, oldValue, newValue) -> {
if (oldValue != null && newValue != oldValue) {
oldValue.removeEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler);
@@ -366,6 +367,9 @@ private void listBehavior() {
listView.setItems(FXCollections.observableArrayList());
}
});
+
+ NodeUtils.waitForScene(comboBox, () -> listView.getStylesheets().setAll(comboBox.getStylesheets()), true, true);
+ comboBox.getStylesheets().addListener((ListChangeListener super String>) changed -> listView.getStylesheets().setAll(comboBox.getStylesheets()));
}
/**
@@ -459,11 +463,10 @@ private void forceRipple() {
/**
* Builds the animation for the combo box arrow.
*/
- private Timeline buildAnimation(boolean isShowing) {
- KeyFrame kf0 = new KeyFrame(Duration.millis(150),
- new KeyValue(icon.rotateProperty(), (isShowing ? 180 : 0))
- );
- arrowAnimation = new Timeline(kf0);
+ private Animation buildAnimation(boolean isShowing) {
+ arrowAnimation = AnimationUtils.TimelineBuilder.build()
+ .add(KeyFrames.of(150, icon.rotateProperty(), (isShowing ? 180 : 0)))
+ .getAnimation();
return arrowAnimation;
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXContextMenuItemSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXContextMenuItemSkin.java
index a9885358..52540c68 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXContextMenuItemSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXContextMenuItemSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -84,13 +84,6 @@ public MFXContextMenuItemSkin(MFXContextMenuItem item) {
gridPane.add(accelerator, 2, 0);
getChildren().setAll(gridPane);
- setListeners();
-
item.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> text.requestFocus());
}
-
- private void setListeners() {
- MFXContextMenuItem item = getSkinnable();
-
- }
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDateCellSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDateCellSkin.java
index 47feda9e..4867ec0d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDateCellSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDateCellSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDatePickerContent.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDatePickerContent.java
index 00afd519..cdf9df74 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDatePickerContent.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXDatePickerContent.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -28,10 +28,10 @@
import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator;
import io.github.palexdev.materialfx.effects.ripple.RipplePosition;
import io.github.palexdev.materialfx.font.MFXFontIcon;
-import io.github.palexdev.materialfx.utils.ColorUtils;
-import io.github.palexdev.materialfx.utils.NodeUtils;
-import io.github.palexdev.materialfx.utils.StringUtils;
-import javafx.animation.*;
+import io.github.palexdev.materialfx.utils.*;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
+import javafx.animation.Animation;
+import javafx.animation.Interpolator;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
@@ -116,9 +116,9 @@ public class MFXDatePickerContent extends VBox {
private MFXIconWrapper monthForwardButton;
private MFXIconWrapper inputButton;
- private Timeline yearsOpen;
- private Timeline yearsClose;
- private Timeline calendarTransition;
+ private Animation yearsOpen;
+ private Animation yearsClose;
+ private Animation calendarTransition;
private final ObjectProperty lastSelectedDayCell = new SimpleObjectProperty<>(null);
private MFXDateCell lastSelectedYearCell = null;
@@ -628,7 +628,7 @@ private MFXScrollPane buildScroll() {
yearsScroll = new MFXScrollPane(buildYears());
yearsScroll.getStyleClass().add("years-scrollpane");
yearsScroll.setFitToWidth(true);
- MFXScrollPane.smoothVScrolling(yearsScroll);
+ ScrollUtils.addSmoothScrolling(yearsScroll);
return yearsScroll;
}
@@ -687,23 +687,25 @@ public void updateColor(Color color) {
* Builds the animations played when the years grid is opened/closed.
*/
private void buildAnimations() {
- yearsOpen = new Timeline(
- new KeyFrame(Duration.ZERO, event -> {
- calendar.setVisible(false);
- yearsScroll.setVisible(true);
- }),
- new KeyFrame(Duration.millis(150), new KeyValue(yearsButton.rotateProperty(), -180, Interpolator.EASE_OUT)),
- new KeyFrame(Duration.millis(400), new KeyValue(yearsScroll.opacityProperty(), 1.0, Interpolator.EASE_BOTH))
- );
-
- yearsClose = new Timeline(
- new KeyFrame(Duration.millis(150), new KeyValue(yearsButton.rotateProperty(), 0, Interpolator.EASE_OUT)),
- new KeyFrame(Duration.millis(250), new KeyValue(yearsScroll.opacityProperty(), 0.0, Interpolator.EASE_BOTH))
- );
- yearsClose.setOnFinished(event -> {
- yearsScroll.setVisible(false);
- calendar.setVisible(true);
- });
+ yearsOpen = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.ZERO, event -> {
+ calendar.setVisible(false);
+ yearsScroll.setVisible(true);
+ }),
+ KeyFrames.of(150, yearsButton.rotateProperty(), -180, Interpolator.EASE_OUT),
+ KeyFrames.of(400, yearsScroll.opacityProperty(), 1.0, Interpolator.EASE_BOTH)
+ ).getAnimation();
+
+ yearsClose = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(150, yearsButton.rotateProperty(), 0, Interpolator.EASE_OUT),
+ KeyFrames.of(250, yearsScroll.opacityProperty(), 0.0, Interpolator.EASE_BOTH)
+ )
+ .setOnFinished(event -> {
+ yearsScroll.setVisible(false);
+ calendar.setVisible(true);
+ }).getAnimation();
}
/**
@@ -733,14 +735,14 @@ private void animateCalendar(boolean forward) {
Rectangle clip = new Rectangle(img.getFitWidth(), img.getFitHeight());
holder.setClip(clip);
- calendarTransition = new Timeline(
- new KeyFrame(Duration.millis(200),
- new KeyValue(img.translateXProperty(), offset * holder.getWidth(), Interpolator.EASE_OUT))
- );
- calendarTransition.setOnFinished(event -> {
- holder.getChildren().remove(img);
- holder.setClip(null);
- });
+ calendarTransition = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(200, img.translateXProperty(), offset * holder.getWidth(), Interpolator.EASE_OUT)
+ )
+ .setOnFinished(event -> {
+ holder.getChildren().remove(img);
+ holder.setClip(null);
+ }).getAnimation();
calendarTransition.play();
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFilterComboBoxSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFilterComboBoxSkin.java
index 624e0087..cdbd034c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFilterComboBoxSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFilterComboBoxSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -28,12 +28,17 @@
import io.github.palexdev.materialfx.font.MFXFontIcon;
import io.github.palexdev.materialfx.selection.ComboSelectionModelMock;
import io.github.palexdev.materialfx.selection.base.IListSelectionModel;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
+import io.github.palexdev.materialfx.utils.AnimationUtils.PauseBuilder;
import io.github.palexdev.materialfx.utils.LabelUtils;
import io.github.palexdev.materialfx.utils.NodeUtils;
import io.github.palexdev.materialfx.utils.StringUtils;
import io.github.palexdev.materialfx.validation.MFXDialogValidator;
-import javafx.animation.*;
+import javafx.animation.Animation;
+import javafx.animation.ScaleTransition;
import javafx.beans.InvalidationListener;
+import javafx.beans.binding.BooleanExpression;
import javafx.collections.FXCollections;
import javafx.collections.transformation.FilteredList;
import javafx.event.EventHandler;
@@ -80,9 +85,7 @@ public class MFXFilterComboBoxSkin extends SkinBase> {
private FilteredList filteredList;
private MFXTextField searchField;
- private Timeline arrowAnimation;
-
- private int retryCount;
+ private Animation arrowAnimation;
//================================================================================
// Constructors
@@ -339,9 +342,9 @@ private void popupBehavior() {
}
});
- comboBox.skinProperty().addListener((observable, oldValue, newValue) -> comboBox.getScene().addEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler));
+ NodeUtils.waitForSkin(comboBox, () -> comboBox.getScene().addEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler), true, false);
comboBox.sceneProperty().addListener((observable, oldValue, newValue) -> {
- if (oldValue != null && newValue != oldValue) {
+ if (oldValue != null) {
oldValue.removeEventFilter(MouseEvent.MOUSE_PRESSED, popupHandler);
}
if (newValue != null) {
@@ -566,19 +569,22 @@ private void computeEditorPosition() {
* a PauseTransition every n milliseconds (by default 100). If at the end of the transition the text field
* is not focused yet the transition is played again.
*
- * Since this may produce an unexpected behavior by running indefinitely for example I set a max
+ * Since this may produce an unexpected behavior by running indefinitely for example so I set a max
* retry count of 10.
+ *
+ * Uses the new utility {@link PauseBuilder#runWhile(BooleanExpression, Runnable, Runnable, int)}
*/
protected void forceFieldFocus() {
- PauseTransition transition = new PauseTransition(Duration.millis(100));
- transition.setOnFinished(event -> {
- if (searchField != null && !searchField.isFocused() && retryCount < 10) {
- retryCount++;
- searchField.requestFocus();
- transition.playFromStart();
- }
- });
- transition.play();
+ if (searchField != null && !searchField.isFocused()) {
+ PauseBuilder.build()
+ .setDuration(100)
+ .runWhile(
+ searchField.focusedProperty(),
+ () -> searchField.requestFocus(),
+ () -> {},
+ 10
+ );
+ }
}
/**
@@ -644,11 +650,10 @@ private void setValueLabel(T item) {
/**
* Builds the animation for the combo box arrow.
*/
- private Timeline buildAnimation(boolean isShowing) {
- KeyFrame kf0 = new KeyFrame(Duration.millis(150),
- new KeyValue(icon.rotateProperty(), (isShowing ? 180 : 0))
- );
- arrowAnimation = new Timeline(kf0);
+ private Animation buildAnimation(boolean isShowing) {
+ arrowAnimation = AnimationUtils.TimelineBuilder.build()
+ .add(KeyFrames.of(150, icon.rotateProperty(), (isShowing ? 180 : 0)))
+ .getAnimation();
return arrowAnimation;
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFlowlessListViewSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFlowlessListViewSkin.java
index 5bfe6e4a..fb914419 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFlowlessListViewSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXFlowlessListViewSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -24,10 +24,10 @@
import io.github.palexdev.materialfx.controls.flowless.MFXVirtualizedScrollPane;
import io.github.palexdev.materialfx.controls.flowless.VirtualFlow;
import io.github.palexdev.materialfx.effects.MFXDepthManager;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import javafx.animation.Animation;
-import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.ScrollBar;
@@ -43,8 +43,8 @@ public class MFXFlowlessListViewSkin extends SkinBase listView) {
vBar = virtualScrollPane.getVBar();
hBar = virtualScrollPane.getHBar();
- hideBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()))
- );
- showBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()))
- );
+ hideBars = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.millis(400),
+ new KeyValue(vBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()),
+ new KeyValue(hBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .getAnimation();
+ showBars = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.millis(400),
+ new KeyValue(vBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
+ new KeyValue(hBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .getAnimation();
if (listView.isHideScrollBars()) {
vBar.setOpacity(0.0);
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXLabelSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXLabelSkin.java
index 73c91a42..5bb007e8 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXLabelSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXLabelSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -62,7 +62,6 @@ public class MFXLabelSkin extends SkinBase {
//================================================================================
private final HBox container;
private final Label textNode;
- private boolean promptIsUsed = false;
private final Line unfocusedLine;
private final Line focusedLine;
@@ -100,15 +99,12 @@ public MFXLabelSkin(MFXLabel label) {
textNode = new Label();
textNode.getStyleClass().add("text-node");
- textNode.textProperty().bind(Bindings.createStringBinding(() -> {
- if (label.getText().isEmpty()) {
- promptIsUsed = true;
- return label.getPromptText();
- } else {
- promptIsUsed = false;
- return label.getText();
- }
- }, label.textProperty(), label.promptTextProperty()));
+ textNode.textProperty().bind(
+ Bindings.createStringBinding(
+ () -> label.getText().isEmpty() ? label.getPromptText() : label.getText(),
+ label.textProperty(), label.promptTextProperty()
+ )
+ );
textNode.fontProperty().bind(label.fontProperty());
textNode.textFillProperty().bind(label.textFillProperty());
textNode.alignmentProperty().bind(label.labelAlignmentProperty());
@@ -157,10 +153,6 @@ private void setListeners() {
});
label.promptTextShowingProperty().bind(textNode.textProperty().isEqualTo(label.getPromptText()));
- label.promptTextShowingProperty().bind(Bindings.createBooleanBinding(
- () -> textNode.getText().equals(label.getPromptText()) && promptIsUsed,
- textNode.textProperty(), label.promptTextProperty()
- ));
label.leadingIconProperty().addListener((observable, oldValue, newValue) -> {
if (newValue == null) {
@@ -267,29 +259,25 @@ private void showEditor() {
textField.addEventHandler(KeyEvent.KEY_PRESSED, event -> {
if (event.getCode() == KeyCode.ENTER) {
- removeEditor(textField);
+ removeEditor(textField, true);
label.requestFocus();
} else if (event.getCode() == KeyCode.ESCAPE) {
- removeEditor(textField);
+ removeEditor(textField, false);
label.requestFocus();
}
});
- if (editorFocusListener == null) {
- editorFocusListener = (observable, oldValue, newValue) -> {
- if (!newValue) {
- label.setText(textField.getText());
- container.getChildren().remove(textField);
- textNode.setVisible(true);
- textNode.setPrefWidth(Region.USE_COMPUTED_SIZE);
- }
- };
- }
+ editorFocusListener = (observable, oldValue, newValue) -> {
+ if (!newValue) {
+ removeEditor(textField, true);
+ }
+ };
textField.focusedProperty().addListener(editorFocusListener);
container.getChildren().add(textField);
computeEditorPosition(textField);
textField.requestFocus();
+ textField.positionCaret(textField.getText().length());
}
/**
@@ -310,9 +298,9 @@ private void computeEditorPosition(MFXTextField textField) {
double editorWidth = containerWidth -
(
label.getContainerPadding().getLeft() +
- leadingWidth + label.getGraphicTextGap() +
- trailingWidth + label.getGraphicTextGap() +
- label.getContainerPadding().getRight()
+ leadingWidth + label.getGraphicTextGap() +
+ trailingWidth + label.getGraphicTextGap() +
+ label.getContainerPadding().getRight()
);
textNode.setPrefWidth(editorWidth);
textField.resizeRelocate(posX, 0, editorWidth, containerHeight);
@@ -332,11 +320,15 @@ private boolean containsEditor() {
/**
* Removes the editor and sets its text as the label's text.
*/
- private void removeEditor(MFXTextField textField) {
+ private void removeEditor(MFXTextField textField, boolean commitChanges) {
MFXLabel label = getSkinnable();
- textNode.setVisible(false);
- label.setText(textField.getText());
+ textField.setVisible(false);
+ if (commitChanges) {
+ label.setText(textField.getText());
+ }
+ textNode.setPrefWidth(Region.USE_COMPUTED_SIZE);
+ textNode.setVisible(true);
label.editorFocusedProperty().unbind();
textField.focusedProperty().removeListener(editorFocusListener);
@@ -373,6 +365,7 @@ protected double computeMaxHeight(double width, double topInset, double rightIns
public void dispose() {
super.dispose();
iconEditorHandler = null;
+ editorFocusListener = null;
}
@Override
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXListViewSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXListViewSkin.java
index e6d7c4fa..ce568a4d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXListViewSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXListViewSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -21,10 +21,10 @@
import io.github.palexdev.materialfx.controls.MFXListView;
import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
import io.github.palexdev.materialfx.effects.MFXDepthManager;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import javafx.animation.Animation;
-import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
@@ -54,8 +54,8 @@ public class MFXListViewSkin extends ListViewSkin {
private final ScrollBar vBar;
private final ScrollBar hBar;
- private final Timeline hideBars;
- private final Timeline showBars;
+ private final Animation hideBars;
+ private final Animation showBars;
//================================================================================
// Constructors
@@ -81,16 +81,20 @@ public MFXListViewSkin(final MFXListView listView) {
hBar.getStyleClass().add("mfx-scroll-bar");
hBar.visibleProperty().bind(hBar.visibleAmountProperty().isNotEqualTo(0));
- hideBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()))
- );
- showBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()))
- );
+ hideBars = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.millis(400),
+ new KeyValue(vBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()),
+ new KeyValue(hBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .getAnimation();
+ showBars = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.millis(400),
+ new KeyValue(vBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
+ new KeyValue(hBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .getAnimation();
if (listView.isHideScrollBars()) {
vBar.setOpacity(0.0);
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXPasswordFieldSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXPasswordFieldSkin.java
index 545eb135..2fae4762 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXPasswordFieldSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXPasswordFieldSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -27,12 +27,19 @@
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
+import javafx.collections.FXCollections;
import javafx.scene.control.IndexRange;
import javafx.scene.input.Clipboard;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
+/**
+ * This is the {@code Skin} used by default by every {@link MFXPasswordField}.
+ *
+ * Extends {@link MFXTextFieldSkin} and implements all the needed methods and fields
+ * needed to make it behave like a password field.
+ */
public class MFXPasswordFieldSkin extends MFXTextFieldSkin {
//================================================================================
// Properties
@@ -105,10 +112,16 @@ private void setListeners() {
passwordField.addEventFilter(KeyEvent.KEY_TYPED, keyEvent -> {
if (!isInvalidCharacter(keyEvent.getCharacter().charAt(0))) {
+
if (passwordField.getSelection().getLength() > 0) {
handleDeletion(passwordField.getText().length());
}
+ if (passwordField.getText().length() == passwordField.getTextLimit()) {
+ keyEvent.consume();
+ return;
+ }
+
sb.append(keyEvent.getCharacter());
setFakeText(getFakeText().concat(passwordField.getHideCharacter()));
setPassword(sb.toString());
@@ -304,16 +317,14 @@ protected void setContextMenu() {
.setAccelerator("Ctrl + A")
.setAction(event -> passwordField.selectAll());
- passwordField.setMFXContextMenu(
- MFXContextMenu.Builder.build(passwordField)
- .addMenuItem(copy)
- .addMenuItem(cut)
- .addMenuItem(paste)
- .addMenuItem(delete)
- .addSeparator()
- .addMenuItem(selectAll)
- .install()
- );
+ passwordField.getMFXContextMenu().setItems(FXCollections.observableArrayList(
+ copy,
+ cut,
+ paste,
+ delete,
+ MFXContextMenu.Builder.getSeparator(),
+ selectAll
+ ));
}
/**
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressBarSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressBarSkin.java
index 8a2b22e6..1b135a94 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressBarSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressBarSkin.java
@@ -1,6 +1,27 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
package io.github.palexdev.materialfx.skins;
import io.github.palexdev.materialfx.controls.MFXProgressBar;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.animation.*;
import javafx.scene.Group;
import javafx.scene.control.SkinBase;
@@ -82,10 +103,10 @@ private void setListeners() {
resetBars();
updateBars();
});
- progressBar.sceneProperty().addListener((observable, oldValue, newValue) -> {
+ NodeUtils.waitForScene(progressBar, () -> {
resetBars();
updateBars();
- });
+ }, true, false);
progressBar.animationSpeedProperty().addListener((observable, oldValue, newValue) -> {
resetBars();
updateBars();
@@ -152,34 +173,34 @@ protected void playIndeterminateAnimation() {
}
final double width = progressBar.getWidth() - (snappedLeftInset() + snappedRightInset());
- KeyFrame kf0 = new KeyFrame(Duration.ONE,
- new KeyValue(bar1.scaleXProperty(), 0.7),
- new KeyValue(bar1.layoutXProperty(), -width),
- new KeyValue(bar1.widthProperty(), width / 2),
- new KeyValue(bar2.layoutXProperty(), -width),
- new KeyValue(bar2.widthProperty(), width / 2)
- );
- KeyFrame kf1 = new KeyFrame(Duration.millis(700),
- new KeyValue(bar1.scaleXProperty(), 1.25, Interpolator.EASE_BOTH)
- );
- KeyFrame kf2 = new KeyFrame(Duration.millis(1300),
- new KeyValue(bar1.layoutXProperty(), width, Interpolator.LINEAR)
- );
- KeyFrame kf3 = new KeyFrame(Duration.millis(1100),
- new KeyValue(bar1.scaleXProperty(), 1.0, Interpolator.EASE_OUT)
- );
- KeyFrame kf4 = new KeyFrame(Duration.millis(1100),
- new KeyValue(bar2.layoutXProperty(), width * 2, Interpolator.LINEAR),
- new KeyValue(bar2.scaleXProperty(), 2, Interpolator.EASE_BOTH)
- );
-
- Timeline bar1Animation = new Timeline(kf0, kf1, kf2, kf3);
- Timeline bar2Animation = new Timeline(kf4);
- bar2Animation.setDelay(Duration.millis(1100));
-
- indeterminateAnimation = new ParallelTransition(bar1Animation, bar2Animation);
- indeterminateAnimation.setCycleCount(Timeline.INDEFINITE);
- indeterminateAnimation.setRate(progressBar.getAnimationSpeed());
+ Animation bar1Animation = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.ONE,
+ new KeyValue(bar1.scaleXProperty(), 0.7),
+ new KeyValue(bar1.layoutXProperty(), -width),
+ new KeyValue(bar1.widthProperty(), width / 2),
+ new KeyValue(bar2.layoutXProperty(), -width),
+ new KeyValue(bar2.widthProperty(), width / 2)
+ ),
+ KeyFrames.of(750, bar1.scaleXProperty(), 1.25, Interpolator.EASE_BOTH),
+ KeyFrames.of(1300, bar1.layoutXProperty(), width, Interpolator.LINEAR),
+ KeyFrames.of(1100, bar1.scaleXProperty(), 1.0, Interpolator.EASE_OUT)
+ ).getAnimation();
+
+ Animation bar2Animation = AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(1100,
+ new KeyValue(bar2.layoutXProperty(), width * 2, Interpolator.LINEAR),
+ new KeyValue(bar2.scaleXProperty(), 2, Interpolator.EASE_BOTH)
+ )
+ ).setDelay(1100).getAnimation();
+
+ indeterminateAnimation = (ParallelTransition) AnimationUtils.ParallelBuilder.build()
+ .add(bar1Animation)
+ .add(bar2Animation)
+ .setCycleCount(Timeline.INDEFINITE)
+ .setRate(progressBar.getAnimationSpeed())
+ .getAnimation();
indeterminateAnimation.play();
}
@@ -187,8 +208,6 @@ protected void playIndeterminateAnimation() {
* Responsible for building the track and the bars for the progress bar.
*/
protected Rectangle buildRectangle(String styleClass) {
- MFXProgressBar progressBar = getSkinnable();
-
Rectangle rectangle = new Rectangle();
rectangle.getStyleClass().setAll(styleClass);
rectangle.setStroke(Color.TRANSPARENT);
@@ -196,8 +215,6 @@ protected Rectangle buildRectangle(String styleClass) {
rectangle.setStrokeLineJoin(StrokeLineJoin.ROUND);
rectangle.setStrokeType(StrokeType.INSIDE);
rectangle.setStrokeWidth(0);
-/* rectangle.arcHeightProperty().bind(progressBar.bordersRadiusProperty());
- rectangle.arcWidthProperty().bind(progressBar.bordersRadiusProperty());*/
return rectangle;
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressSpinnerSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressSpinnerSkin.java
index 51c3882d..2bc70461 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressSpinnerSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXProgressSpinnerSkin.java
@@ -1,24 +1,26 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
import io.github.palexdev.materialfx.controls.MFXProgressSpinner;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
@@ -35,9 +37,7 @@
import javafx.scene.text.Text;
import javafx.util.Duration;
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Collectors;
+import java.util.Arrays;
import java.util.stream.Stream;
/**
@@ -62,7 +62,7 @@ public class MFXProgressSpinnerSkin extends SkinBase {
private final Rectangle fillRect;
private final Text text;
- private Timeline timeline;
+ private Timeline animation;
//================================================================================
// Constructors
@@ -121,7 +121,7 @@ private void setListeners() {
spinner.progressProperty().addListener((observable, oldValue, newValue) -> updateProgress());
spinner.visibleProperty().addListener((observable, oldValue, newValue) -> updateAnimation());
spinner.parentProperty().addListener((observable, oldValue, newValue) -> updateAnimation());
- spinner.sceneProperty().addListener((observable, oldValue, newValue) -> updateAnimation());
+ NodeUtils.waitForScene(spinner, this::updateAnimation, true, false);
}
/**
@@ -145,9 +145,9 @@ private void reset() {
MFXProgressSpinner spinner = getSkinnable();
if (spinner.isIndeterminate()) {
- if (timeline == null) {
- createTransition();
- timeline.play();
+ if (animation == null) {
+ createAnimation();
+ animation.play();
}
} else {
clearAnimation();
@@ -160,10 +160,10 @@ private void reset() {
* Clears the animation.
*/
private void clearAnimation() {
- if (timeline != null) {
- timeline.stop();
- timeline.getKeyFrames().clear();
- timeline = null;
+ if (animation != null) {
+ animation.stop();
+ animation.getKeyFrames().clear();
+ animation = null;
}
}
@@ -176,17 +176,17 @@ private void updateAnimation() {
final boolean isTreeVisible = spinner.isVisible() &&
spinner.getParent() != null &&
spinner.getScene() != null;
- if (timeline != null) {
+ if (animation != null) {
pauseTimeline(!isTreeVisible);
} else if (isTreeVisible) {
- createTransition();
+ createAnimation();
}
}
/**
* Creates the animation.
*/
- private void createTransition() {
+ private void createAnimation() {
MFXProgressSpinner spinner = getSkinnable();
if (!spinner.isIndeterminate()) return;
@@ -199,23 +199,24 @@ private void createTransition() {
new KeyValue(arc.lengthProperty(), 5, Interpolator.LINEAR),
new KeyValue(arc.startAngleProperty(), 1845 + spinner.getStartingAngle(), Interpolator.LINEAR));
- List allFrames = Stream.of(
+ KeyFrame[] allFrames = Stream.of(
getKeyFrames(0, 0, initialColor == null ? blueColor : initialColor),
getKeyFrames(450, 1.4, initialColor == null ? redColor : initialColor),
getKeyFrames(900, 2.8, initialColor == null ? yellowColor : initialColor),
- getKeyFrames(1350, 4.2, initialColor == null ? greenColor : initialColor)
- ).flatMap(Collection::stream).collect(Collectors.toList());
- allFrames.add(endingFrame);
+ getKeyFrames(1350, 4.2, initialColor == null ? greenColor : initialColor),
+ new KeyFrame[] { endingFrame }
+ ).flatMap(Arrays::stream).toArray(KeyFrame[]::new);
- if (timeline != null) {
- timeline.stop();
- timeline.getKeyFrames().clear();
+ if (animation != null) {
+ animation.stop();
+ animation.getKeyFrames().clear();
}
- timeline = new Timeline();
- timeline.getKeyFrames().addAll(allFrames);
- timeline.setCycleCount(Timeline.INDEFINITE);
- timeline.setDelay(Duration.ZERO);
- timeline.playFromStart();
+ animation = AnimationUtils.TimelineBuilder.build()
+ .add(allFrames)
+ .setDelay(Duration.ZERO)
+ .setCycleCount(Timeline.INDEFINITE)
+ .getAnimation();
+ animation.playFromStart();
}
/**
@@ -225,13 +226,13 @@ private void pauseTimeline(boolean pause) {
MFXProgressSpinner spinner = getSkinnable();
if (spinner.isIndeterminate()) {
- if (timeline == null) {
- createTransition();
+ if (animation == null) {
+ createAnimation();
}
if (pause) {
- timeline.pause();
+ animation.pause();
} else {
- timeline.play();
+ animation.play();
}
}
}
@@ -239,7 +240,7 @@ private void pauseTimeline(boolean pause) {
/**
* Creates the needed key frames for the animation.
*/
- private List getKeyFrames(double angle, double duration, Paint color) {
+ private KeyFrame[] getKeyFrames(double angle, double duration, Paint color) {
MFXProgressSpinner spinner = getSkinnable();
KeyFrame kf1 = new KeyFrame(Duration.seconds(duration),
@@ -259,7 +260,7 @@ private List getKeyFrames(double angle, double duration, Paint color)
new KeyValue(arc.startAngleProperty(), angle + 435 + spinner.getStartingAngle(), Interpolator.LINEAR),
new KeyValue(arc.strokeProperty(), color, Interpolator.EASE_BOTH));
- return List.of(kf1, kf2, kf3, kf4);
+ return new KeyFrame[] {kf1, kf2, kf3, kf4};
}
/**
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRadioButtonSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRadioButtonSkin.java
index f28b7bdf..640bf20d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRadioButtonSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRadioButtonSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -21,12 +21,12 @@
import io.github.palexdev.materialfx.controls.MFXRadioButton;
import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator;
import io.github.palexdev.materialfx.effects.ripple.RipplePosition;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import io.github.palexdev.materialfx.utils.ColorUtils;
import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.animation.Interpolator;
-import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
import javafx.scene.Cursor;
import javafx.scene.control.RadioButton;
import javafx.scene.control.skin.RadioButtonSkin;
@@ -122,11 +122,11 @@ private void setListeners() {
* control's skinProperty, when the skin is not null and the RadioButton isSelected,
* play the animation.
*/
- radioButton.skinProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null && radioButton.isSelected()) {
+ NodeUtils.waitForSkin(radioButton, () -> {
+ if (radioButton.isSelected()) {
buildAndPlayAnimation();
}
- });
+ }, true, false);
}
/**
@@ -156,13 +156,15 @@ private void buildAndPlayAnimation() {
final MFXRadioButton radioButton = (MFXRadioButton) getSkinnable();
final Duration duration = Duration.millis(200);
- KeyValue keyValue1 = new KeyValue(dot.scaleXProperty(), radioButton.isSelected() ? 0.55 : 0, Interpolator.EASE_BOTH);
- KeyValue keyValue2 = new KeyValue(dot.scaleYProperty(), radioButton.isSelected() ? 0.55 : 0, Interpolator.EASE_BOTH);
- KeyValue keyValue3 = new KeyValue(radio.strokeProperty(), radioButton.isSelected() ? radioButton.getSelectedColor() : radioButton.getUnSelectedColor(), Interpolator.EASE_BOTH);
-
- KeyFrame keyFrame = new KeyFrame(duration, keyValue1, keyValue2, keyValue3);
- Timeline timeline = new Timeline(keyFrame);
- timeline.play();
+ AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(duration,
+ new KeyValue(dot.scaleXProperty(), radioButton.isSelected() ? 0.55 : 0, Interpolator.EASE_BOTH),
+ new KeyValue(dot.scaleYProperty(), radioButton.isSelected() ? 0.55 : 0, Interpolator.EASE_BOTH),
+ new KeyValue(radio.strokeProperty(), radioButton.isSelected() ? radioButton.getSelectedColor() : radioButton.getUnSelectedColor(), Interpolator.EASE_BOTH)
+ )
+ ).getAnimation()
+ .play();
}
private void removeRadio() {
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRectangleToggleNodeSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRectangleToggleNodeSkin.java
index ee1586b5..3da6a3a9 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRectangleToggleNodeSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXRectangleToggleNodeSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -64,12 +64,14 @@ public MFXRectangleToggleNodeSkin(MFXRectangleToggleNode toggleNode) {
container.getStyleClass().setAll("container");
container.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
container.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
+ container.alignmentProperty().bind(toggleNode.alignmentProperty());
container.prefWidthProperty().bind(toggleNode.widthProperty());
container.prefHeightProperty().bind(toggleNode.heightProperty());
rippleGenerator = new MFXCircleRippleGenerator(toggleNode);
container.getChildren().setAll(rippleGenerator, label);
+ handleGraphics();
setupRippleGenerator();
setListeners();
@@ -96,10 +98,8 @@ protected void setupRippleGenerator() {
* Adds listeners for:
*
*
- {@link MFXRectangleToggleNode}: to update the ripple generator's clip supplier.
- *
- * Adds bindings for:
- *
- *
- Binds the {@link MFXLabel} icons properties to the corresponding toggle's properties.
+ *
- {@link MFXRectangleToggleNode#graphicProperty()}, {@link MFXRectangleToggleNode#labelLeadingIconProperty()},
+ * {@link MFXRectangleToggleNode#labelTrailingIconProperty()}, to properly handle the various settable icons, call to {@link #handleGraphics()}
*
* Adds event filters/handlers for:
*
@@ -110,8 +110,15 @@ private void setListeners() {
MFXRectangleToggleNode toggleNode = getSkinnable();
toggleNode.rippleClipTypeFactoryProperty().addListener((observable, oldValue, newValue) -> rippleGenerator.setClipSupplier(() -> newValue.build(container)));
- label.leadingIconProperty().bind(toggleNode.labelLeadingIconProperty());
- label.trailingIconProperty().bind(toggleNode.labelTrailingIconProperty());
+
+ toggleNode.graphicProperty().addListener((observable, oldValue, newValue) -> {
+ if (oldValue != null) {
+ container.getChildren().remove(oldValue);
+ }
+ handleGraphics();
+ });
+ toggleNode.labelLeadingIconProperty().addListener((observable, oldValue, newValue) -> handleGraphics());
+ toggleNode.labelTrailingIconProperty().addListener((observable, oldValue, newValue) -> handleGraphics());
container.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> {
Node leadingIcon = label.getLeadingIcon();
@@ -144,6 +151,35 @@ private void setListeners() {
});
}
+ /**
+ * Handles the various settable icons of this control.
+ *
+ * Prioritizes the nodes coming from the {@link MFXRectangleToggleNode#graphicProperty()}, meaning that even
+ * if there is text, even if the leading or trailing icons are set, they will be hidden whenever the graphic property
+ * is not null.
+ */
+ protected void handleGraphics() {
+ MFXRectangleToggleNode toggleNode = getSkinnable();
+
+ Node graphic = toggleNode.getGraphic();
+ Node leading = toggleNode.getLabelLeadingIcon();
+ Node trailing = toggleNode.getLabelTrailingIcon();
+ label.setLeadingIcon(leading);
+ label.setTrailingIcon(trailing);
+ if (leading != null || trailing != null) {
+ label.setVisible(graphic == null);
+ }
+
+ if (graphic != null) {
+ label.setVisible(false);
+ if (!container.getChildren().contains(graphic)) {
+ container.getChildren().add(graphic);
+ }
+ } else {
+ label.setVisible(true);
+ }
+ }
+
//================================================================================
// Override Methods
//================================================================================
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXScrollPaneSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXScrollPaneSkin.java
index 5fc00d69..3db9005c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXScrollPaneSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXScrollPaneSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXSliderSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXSliderSkin.java
new file mode 100644
index 00000000..cee8f28c
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXSliderSkin.java
@@ -0,0 +1,941 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.skins;
+
+import io.github.palexdev.materialfx.beans.NumberRange;
+import io.github.palexdev.materialfx.controls.MFXSlider;
+import io.github.palexdev.materialfx.controls.enums.SliderEnums.SliderMode;
+import io.github.palexdev.materialfx.controls.enums.SliderEnums.SliderPopupSide;
+import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
+import io.github.palexdev.materialfx.font.MFXFontIcon;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.PauseBuilder;
+import io.github.palexdev.materialfx.utils.NodeUtils;
+import io.github.palexdev.materialfx.utils.NumberUtils;
+import javafx.animation.Interpolator;
+import javafx.animation.KeyFrame;
+import javafx.animation.KeyValue;
+import javafx.animation.PauseTransition;
+import javafx.beans.binding.Bindings;
+import javafx.beans.binding.BooleanExpression;
+import javafx.beans.binding.DoubleBinding;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
+import javafx.event.EventHandler;
+import javafx.geometry.Orientation;
+import javafx.geometry.Point2D;
+import javafx.scene.Group;
+import javafx.scene.Node;
+import javafx.scene.chart.Axis.TickMark;
+import javafx.scene.chart.NumberAxis;
+import javafx.scene.control.SkinBase;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.Region;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.scene.shape.StrokeLineCap;
+import javafx.scene.shape.StrokeLineJoin;
+import javafx.scene.shape.StrokeType;
+import javafx.util.Duration;
+
+import java.util.List;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+/**
+ * This is the {@code Skin} used by default by every {@link MFXSlider}l.
+ *
+ * To be honest, I always thought that making a slider would be a much easier task, but this skin
+ * but this skin proves just the opposite. Don't get me wrong, if you calmly read the code it is intuitive
+ * but still, one of the most complicated skins I've ever made so far.
+ *
+ * At the core a slider is simply a progress bar that the user can adjust with an icon (the thumb).
+ * So, conceptually it is easy, but computing the value based on the mouse drag or press, computing the
+ * layout based on the value, managing the popup position and visibility, positioning the ticks correctly,
+ * the possibility to change the thumb and the popup, the bidirectional feature, all of that is quite tricky, but,
+ * I must say that I'm happy with the final result.
+ *
+ * A little note on how the popup visibility is managed.
+ *
+ * The popup is shown when an arrow key is pressed or the mouse is pressed on the thumb.
+ *
+ * To hide the popup a {@link PauseTransition} of 800 milliseconds is played and at the end
+ * the popup is hidden.
+ *
+ * This transition, the release timer, should ensure that the popup is not closed when the value is
+ * adjusted rapidly.
+ */
+public class MFXSliderSkin extends SkinBase {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private final Rectangle track;
+ private final Rectangle bar;
+ private final Group group;
+ private final Group ticksGroup;
+ private final NumberAxis ticksAxis;
+ private Node thumb;
+ private Region popup;
+
+ private final LayoutData layoutData = new LayoutData();
+ private final PopupManager popupManager = new PopupManager();
+
+ private double preDragThumbPos;
+ private Point2D dragStart;
+ private EventHandler thumbPressHandler;
+ private EventHandler thumbDragHandler;
+ private EventHandler trackPressedHandler;
+
+ private boolean mousePressed = false;
+ private boolean trackPressed = false;
+ private boolean keyPressed = false;
+ private boolean keyWasPressed = false;
+ private PauseTransition releaseTimer = new PauseTransition();
+
+ private boolean isSnapping = false;
+ private boolean wasSnapping = false;
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+ public MFXSliderSkin(MFXSlider slider) {
+ super(slider);
+
+ track = buildRectangle("track");
+ track.heightProperty().bind(slider.heightProperty());
+ track.widthProperty().bind(slider.widthProperty());
+ track.setFill(Color.rgb(82, 0, 237, 0.3));
+ track.setStroke(Color.GOLD);
+
+ bar = buildRectangle("bar");
+ bar.heightProperty().bind(slider.heightProperty());
+ bar.setFill(Color.GREEN);
+ bar.setMouseTransparent(true);
+
+ thumb = slider.getThumbSupplier().get();
+ popup = slider.getPopupSupplier().get();
+ popup.setVisible(false);
+ popup.setOpacity(0.0);
+
+ ticksAxis = new NumberAxis(slider.getMin(), slider.getMax(), slider.getTickUnit());
+ ticksAxis.setMinorTickCount(slider.getMinorTicksCount());
+ ticksAxis.setManaged(false);
+ ticksAxis.setMouseTransparent(true);
+ ticksAxis.setTickMarkVisible(false);
+ ticksAxis.setTickLabelsVisible(false);
+
+ Rectangle clip = new Rectangle();
+ clip.heightProperty().bind(slider.heightProperty());
+ clip.widthProperty().bind(slider.widthProperty());
+ clip.arcHeightProperty().bind(track.arcHeightProperty());
+ clip.arcWidthProperty().bind(track.arcWidthProperty());
+
+ ticksGroup = new Group(ticksAxis);
+ ticksGroup.setClip(clip);
+ ticksGroup.setManaged(false);
+ ticksGroup.setMouseTransparent(true);
+
+ group = new Group(track, ticksGroup, bar, thumb, popup);
+ group.setManaged(false);
+ group.getStylesheets().add(slider.getUserAgentStylesheet());
+ getChildren().setAll(group);
+
+ releaseTimer.setDuration(Duration.millis(800));
+ releaseTimer.setOnFinished(event -> hidePopup());
+
+ thumbPressHandler = event -> {
+ dragStart = thumb.localToParent(event.getX(), event.getY());
+ preDragThumbPos = (slider.getValue() - slider.getMin()) / (slider.getMax() - slider.getMin());
+ };
+ thumbDragHandler = this::handleDrag;
+ trackPressedHandler = this::trackPressed;
+
+ if (slider.getOrientation() == Orientation.VERTICAL) {
+ slider.setRotate(-90);
+ } else {
+ slider.setRotate(0);
+ }
+
+ setBehavior();
+ }
+
+ //================================================================================
+ // Behavior
+ //================================================================================
+
+ /**
+ * Calls {@link #sliderHandlers()}, {@link #sliderListeners()}, {@link #skinBehavior()}.
+ */
+ protected void setBehavior() {
+ sliderHandlers();
+ sliderListeners();
+ skinBehavior();
+ }
+
+ /**
+ * Defines the slider's behavior as follows:
+ *
+ * - Adds a MOUSE_CLICKED event handler to request the focus
+ *
- Adds a MOUSE_PRESSED event filter to show the popup if the thumb is pressed, {@link #showPopup()},
+ * also sets a flag "mousePressed" to true, more on this here {@link #updateLayout()}.
+ *
- Adds a MOUSE_RELEASED event filter to reset the "mousePressed" flag and starts the releaseTimer
+ * (more about this timer in the skin documentation)
+ *
- Adds a KEY_PRESSED event filter to increase/decrease the slider's value accordingly to the
+ * pressed arrow key. Also sets the "keyPressed" and "keyWasPressed" flags to true
+ */
+ private void sliderHandlers() {
+ MFXSlider slider = getSkinnable();
+
+ /* FOCUS */
+ slider.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> slider.requestFocus());
+
+ /* POPUP HANDLING */
+ slider.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> {
+ mousePressed = true;
+ Node intersectedNode = event.getPickResult().getIntersectedNode();
+ if (intersectedNode == track || NodeUtils.inHierarchy(intersectedNode, thumb)) {
+ showPopup();
+ }
+ });
+ slider.addEventFilter(MouseEvent.MOUSE_RELEASED, event -> {
+ mousePressed = false;
+ releaseTimer.playFromStart();
+ });
+
+ /* KEYBOARD HANDLING */
+ slider.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
+ if (!slider.isEnableKeyboard()) {
+ return;
+ }
+
+ double val = (event.isShiftDown() || event.isControlDown()) ? slider.getAlternativeUnitIncrement() : slider.getUnitIncrement();
+ if (isIncreaseKey(event)) {
+ keyPressed = true;
+ keyWasPressed = true;
+ slider.setValue(
+ NumberUtils.clamp(slider.getValue() + val, slider.getMin(), slider.getMax())
+ );
+ } else if (isDecreaseKey(event)) {
+ keyPressed = true;
+ keyWasPressed = true;
+ slider.setValue(
+ NumberUtils.clamp(slider.getValue() - val, slider.getMin(), slider.getMax())
+ );
+ }
+ });
+ }
+
+ /**
+ * Adds listeners to the following slider's properties:
+ *
+ * - {@link MFXSlider#valueProperty()}, to update the update the layout
+ *
- {@link MFXSlider#minProperty()}, if this changes the slider's value is reset to prevent inconsistencies,
+ * then updates the layout
+ *
- {@link MFXSlider#maxProperty()}, if this changes the slider's value is reset to prevent inconsistencies,
+ * then updates the layout
+ *
- {@link MFXSlider#minorTicksCountProperty()}, {@link MFXSlider#tickUnitProperty()}, {@link MFXSlider#showMinorTicksProperty()},
+ * to update the ticks layout according to the changes
+ *
- {@link MFXSlider#popupSupplierProperty()}, {@link MFXSlider#thumbSupplierProperty()}, to replace
+ * the popup and the thumb according to the new suppliers, they respectively call {@link #handlePopupChange()} and {@link #handleThumbChange()}.
+ * Also, the popup is managed by the {@link PopupManager}, see {@link PopupManager#initPopup()}.
+ *
- {@link MFXSlider#bidirectionalProperty()}, {@link MFXSlider#orientationProperty()}, to update the layout accordingly
+ *
- {@link MFXSlider#focusedProperty()}, this is a workaround for an issue with the key handling. For some reason
+ * when the value is adjusted with the arrow keys the slider lose the focus. When this happens we check that
+ * the focus is lost and the "keyPressed" flag is true. If both are true we use {@link PauseBuilder#runWhile(BooleanExpression, Runnable, Runnable)}
+ * to ensure that the focus is reacquired as soon as possible, so that next key events can work too.
+ */
+ private void sliderListeners() {
+ MFXSlider slider = getSkinnable();
+
+ /* VALUE AND BOUNDS HANDLING */
+ slider.valueProperty().addListener((observable, oldValue, newValue) -> {
+ if (!isSnapping) {
+ updateLayout();
+ }
+ });
+ slider.minProperty().addListener((observable, oldValue, newValue) -> {
+ slider.setValue(0);
+ ticksAxis.setLowerBound(newValue.doubleValue());
+ slider.requestLayout();
+ });
+ slider.maxProperty().addListener((observable, oldValue, newValue) -> {
+ slider.setValue(0);
+ ticksAxis.setUpperBound(newValue.doubleValue());
+ slider.requestLayout();
+ });
+
+ /* NumberAxis HANDLING */
+ slider.minorTicksCountProperty().addListener((observable, oldValue, newValue) -> {
+ ticksAxis.setMinorTickCount(newValue.intValue());
+ ticksAxis.requestAxisLayout();
+ slider.requestLayout();
+ });
+ slider.tickUnitProperty().addListener((observable, oldValue, newValue) -> {
+ ticksAxis.setTickUnit(newValue.doubleValue());
+ ticksAxis.requestAxisLayout();
+ slider.requestLayout();
+ });
+ slider.showTicksAtEdgesProperty().addListener((observable, oldValue, newValue) -> slider.requestLayout());
+
+ /* SUPPLIERS HANDLING */
+ slider.popupSupplierProperty().addListener((observable, oldValue, newValue) -> {
+ handlePopupChange();
+ slider.requestLayout();
+ popupManager.initPopup();
+ });
+ slider.thumbSupplierProperty().addListener((observable, oldValue, newValue) -> {
+ handleThumbChange();
+ slider.requestLayout();
+ });
+
+ /* LAYOUT HANDLING */
+ slider.bidirectionalProperty().addListener((observable, oldValue, newValue) -> slider.requestLayout());
+ slider.orientationProperty().addListener((observable, oldValue, newValue) -> {
+ if (newValue == Orientation.VERTICAL) {
+ slider.setRotate(-90);
+ } else {
+ slider.setRotate(0);
+ }
+ });
+
+ /* FOCUS WORKAROUND HANDLING */
+ slider.focusedProperty().addListener((observable, oldValue, newValue) -> {
+ if (!newValue && keyPressed) {
+ PauseBuilder.build()
+ .setDuration(Duration.millis(100))
+ .runWhile(slider.focusedProperty(), slider::requestFocus, () -> keyPressed = false);
+ }
+ });
+ }
+
+ /**
+ * Defines the behavior of the skin as follows:
+ *
+ * - Adds a MOUSE_PRESSED event handler to the thumb to store layout info needed for the thumb drag before the actual drag begins
+ *
- Adds a MOUSE_DRAGGED event handler to the thumb to handle the drag, see {@link #handleDrag(MouseEvent)}
+ *
- Adds a MOUSE_PRESSED event handler to the track to update the slider's value according to where the mouse is pressed on the track, see {@link #trackPressed(MouseEvent)}
+ *
- Calls {@link PopupManager#initPopup()} for the first time
+ *
- Handles the ticks visibility and layout by calling {@link LayoutData#updateTicksData()}
+ */
+ private void skinBehavior() {
+ MFXSlider slider = getSkinnable();
+
+ /* THUMB AND TRACK HANDLING */
+ thumb.addEventHandler(MouseEvent.MOUSE_PRESSED, thumbPressHandler);
+ thumb.addEventHandler(MouseEvent.MOUSE_DRAGGED, thumbDragHandler);
+ track.addEventHandler(MouseEvent.MOUSE_PRESSED, trackPressedHandler);
+
+ /* POPUP HANDLING */
+ popupManager.initPopup();
+
+ /* NumberAxis LAYOUT HANDLING */
+ ticksAxis.visibleProperty().bind(slider.showMinorTicksProperty());
+ ticksAxis.needsLayoutProperty().addListener((observable, oldValue, newValue) -> layoutData.updateTicksData());
+ }
+
+ //================================================================================
+ // Methods
+ //================================================================================
+
+ /**
+ * This is responsible for updating the layout when the slider's value changes.
+ *
+ * Before doing anything it checks if the slider mode is set to "SNAP_TO_TICKS" and the value change
+ * is not due to a key press. In this case the value is adjusted by finding the nearest major tick, see {@link LayoutData#findNearestTick()}.
+ * Also the "isSnapping" flag is set to true so that the value change doesn't trigger this methods again, at the end it is reset to false.
+ *
+ * After this first check, {@link LayoutData#update(boolean)} is called (argument is false).
+ *
+ * Then if the "mousePressed" flag is false (so the change is due to a key press) the popup is shown and the release timer is started.
+ *
+ * If the value change is due to a mouse press on the track or due to the snap mode and the {@link MFXSlider#animateOnPressProperty()} is true,
+ * the thumb and bar layout is updated with an animation, otherwise it's updated immediately.
+ *
+ * At the end the "keyWasPressed" flag is reset to false.
+ */
+ private void updateLayout() {
+ MFXSlider slider = getSkinnable();
+
+ if (slider.getSliderMode() == SliderMode.SNAP_TO_TICKS && !keyWasPressed) {
+ isSnapping = true;
+ wasSnapping = true;
+ double closest = layoutData.findNearestTick();
+ slider.setValue(closest);
+ isSnapping = false;
+ }
+
+ layoutData.update(false);
+
+ if (!mousePressed) {
+ showPopup();
+ releaseTimer.playFromStart();
+ }
+
+ if ((trackPressed || wasSnapping) && slider.isAnimateOnPress()) {
+ wasSnapping = false;
+ AnimationUtils.ParallelBuilder.build()
+ .add(
+ new KeyFrame(Duration.millis(200), new KeyValue(bar.layoutXProperty(), layoutData.barX, MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .add(
+ new KeyFrame(Duration.millis(200), new KeyValue(thumb.layoutXProperty(), layoutData.thumbX, MFXAnimationFactory.getInterpolatorV1())),
+ new KeyFrame(Duration.millis(200), new KeyValue(bar.widthProperty(), Math.abs(layoutData.barW), MFXAnimationFactory.getInterpolatorV1()))
+ )
+ .getAnimation()
+ .play();
+ } else {
+ thumb.setLayoutX(layoutData.thumbX);
+ bar.setLayoutX(layoutData.barX);
+ bar.setWidth(Math.abs(layoutData.barW));
+ }
+
+ keyWasPressed = false;
+ }
+
+ /**
+ * Handles the thumb drag and computes the new slider value according to the drag position.
+ */
+ private void handleDrag(MouseEvent event) {
+ MFXSlider slider = getSkinnable();
+ trackPressed = false;
+
+ Point2D curr = thumb.localToParent(event.getX(), event.getY());
+ double dragPos = curr.getX() - dragStart.getX();
+ double pos = preDragThumbPos + dragPos / slider.getWidth();
+ double val = NumberUtils.clamp((pos * (slider.getMax() - slider.getMin())) + slider.getMin(), slider.getMin(), slider.getMax());
+ slider.setValue(val);
+ }
+
+ /**
+ * Sets the "trackPressed" flag to true, computes the press position and the new slider value.
+ */
+ private void trackPressed(MouseEvent event) {
+ MFXSlider slider = getSkinnable();
+ trackPressed = true;
+
+ double pos = event.getX() / slider.getWidth();
+ double val = NumberUtils.clamp((pos * (slider.getMax() - slider.getMin())) + slider.getMin(), slider.getMin(), slider.getMax());
+ slider.setValue(val);
+ }
+
+ /**
+ * Handles changes of the {@link MFXSlider#popupSupplierProperty()}, removes the old popup, builds the new one and if the supplier or the
+ * returned value are not null adds it to the children list, then calls {@link PopupManager#initPopup()}.
+ */
+ private void handlePopupChange() {
+ MFXSlider slider = getSkinnable();
+
+ int index = -1;
+ if (popup != null) {
+ index = group.getChildren().indexOf(popup);
+ popup.layoutXProperty().unbind();
+ popup.layoutYProperty().unbind();
+ group.getChildren().remove(popup);
+ }
+
+ Supplier popupSupplier = slider.getPopupSupplier();
+ popup = popupSupplier != null ? popupSupplier.get() : null;
+
+ if (popup != null) {
+ popup.setVisible(false);
+ popup.setOpacity(0.0);
+ group.getChildren().add(index >= 0 ? index : group.getChildren().size() - 1, popup);
+ popupManager.initPopup();
+ }
+ }
+
+ /**
+ * Handles changes of the {@link MFXSlider#thumbSupplierProperty()} ()}, removes the old thumb, builds the new one and if the supplier or the
+ * returned value are not null (this should never happen though) adds it to the children list, then adds the needed handlers to it.
+ */
+ private void handleThumbChange() {
+ MFXSlider slider = getSkinnable();
+
+ int index = -1;
+ if (thumb != null) {
+ index = group.getChildren().indexOf(thumb);
+ thumb.removeEventHandler(MouseEvent.MOUSE_PRESSED, thumbPressHandler);
+ thumb.removeEventHandler(MouseEvent.MOUSE_DRAGGED, thumbDragHandler);
+ group.getChildren().remove(thumb);
+ }
+
+ Supplier thumbSupplier = slider.getThumbSupplier();
+ thumb = thumbSupplier != null ? thumbSupplier.get() : null;
+
+ if (thumb != null) {
+ thumb.addEventHandler(MouseEvent.MOUSE_PRESSED, thumbPressHandler);
+ thumb.addEventHandler(MouseEvent.MOUSE_DRAGGED, thumbDragHandler);
+ group.getChildren().add(index >= 0 ? index : group.getChildren().size() - 1, thumb);
+ }
+ }
+
+ /**
+ * If the popup is not null, stops the release timer and shows the popup with a fade in animation.
+ */
+ protected void showPopup() {
+ if (popup == null) {
+ return;
+ }
+
+ releaseTimer.stop();
+ AnimationUtils.SequentialBuilder.build()
+ .add(PauseBuilder.build().setDuration(Duration.ONE).setOnFinished(event -> popup.setVisible(true)).getAnimation())
+ .add(new KeyFrame(Duration.millis(200), new KeyValue(popup.opacityProperty(), 1.0, Interpolator.EASE_IN)))
+ .getAnimation()
+ .play();
+ }
+
+ /**
+ * If the popup is not null, hides the popup with a fade out animation.
+ */
+ protected void hidePopup() {
+ if (popup == null) {
+ return;
+ }
+
+ AnimationUtils.SequentialBuilder.build()
+ .add(new KeyFrame(Duration.millis(200), new KeyValue(popup.opacityProperty(), 0.0, Interpolator.EASE_OUT)))
+ .setOnFinished(event -> popup.setVisible(false))
+ .getAnimation()
+ .play();
+ }
+
+ /**
+ * Responsible for building the track and the bars for the slider.
+ */
+ protected Rectangle buildRectangle(String styleClass) {
+ Rectangle rectangle = new Rectangle();
+ rectangle.getStyleClass().setAll(styleClass);
+ rectangle.setStroke(Color.TRANSPARENT);
+ rectangle.setStrokeLineCap(StrokeLineCap.ROUND);
+ rectangle.setStrokeLineJoin(StrokeLineJoin.ROUND);
+ rectangle.setStrokeType(StrokeType.INSIDE);
+ rectangle.setStrokeWidth(0);
+ return rectangle;
+ }
+
+ /**
+ * Responsible for creating the slider's major ticks.
+ */
+ protected Node buildTick() {
+ return new MFXFontIcon("mfx-circle", 4);
+ }
+
+ /**
+ * Checks if the pressed key is a valid increase key.
+ *
+ * UP or RIGHT respectively for VERTICAL and HORIZONTAL orientations.
+ */
+ private boolean isIncreaseKey(KeyEvent event) {
+ MFXSlider slider = getSkinnable();
+
+ return (event.getCode() == KeyCode.UP && slider.getOrientation() == Orientation.VERTICAL) ||
+ (event.getCode() == KeyCode.RIGHT && slider.getOrientation() == Orientation.HORIZONTAL);
+ }
+
+ /**
+ * Checks if the pressed key is a valid decrease key.
+ *
+ * DOWN or LEFT respectively for VERTICAL and HORIZONTAL orientations.
+ */
+ private boolean isDecreaseKey(KeyEvent event) {
+ MFXSlider slider = getSkinnable();
+
+ return (event.getCode() == KeyCode.DOWN && slider.getOrientation() == Orientation.VERTICAL) ||
+ (event.getCode() == KeyCode.LEFT && slider.getOrientation() == Orientation.HORIZONTAL);
+ }
+
+ //================================================================================
+ // Override Methods
+ //================================================================================
+ @Override
+ protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+ return computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
+ }
+
+ @Override
+ protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+ return Math.max(100, leftInset + bar.prefWidth(getSkinnable().getWidth()) + rightInset);
+ }
+
+ @Override
+ protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+ return Math.max(6, bar.prefHeight(width)) + topInset + bottomInset;
+ }
+
+ @Override
+ protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
+ return getSkinnable().prefWidth(height);
+ }
+
+ @Override
+ protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
+ return computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+
+ thumb.removeEventHandler(MouseEvent.MOUSE_PRESSED, thumbPressHandler);
+ thumb.removeEventHandler(MouseEvent.MOUSE_DRAGGED, thumbDragHandler);
+ thumbPressHandler = null;
+ thumbDragHandler = null;
+
+ track.removeEventHandler(MouseEvent.MOUSE_PRESSED, trackPressedHandler);
+ trackPressedHandler = null;
+
+ releaseTimer = null;
+ }
+
+ @Override
+ protected void layoutChildren(double x, double y, double w, double h) {
+ super.layoutChildren(x, y, w, h);
+
+ layoutData.update(true);
+ thumb.relocate(layoutData.thumbX, layoutData.thumbY);
+ bar.relocate(layoutData.barX, 0);
+ bar.setWidth(Math.abs(layoutData.barW));
+
+ ticksAxis.resize(w, h);
+ }
+
+ //================================================================================
+ // Support Classes
+ //================================================================================
+
+ /**
+ * Support class to the slider's skin. It helps manage/update info about layout such as:
+ * the x coordinate at zero value (or min if the min is greater than 0, or the max is lesser than 0, or the slider is se
+ * to be non-bidirectional), the thumb x and y coordinates, the bar width and bar x coordinate, the major ticks data (see {@link TickData})
+ * and their y coordinate which is the same for all of them.
+ */
+ protected class LayoutData {
+ private double zeroPos;
+ private double thumbX;
+ private double thumbY;
+ private double barW;
+ private double barX;
+
+ private final ObservableList ticksData = FXCollections.observableArrayList();
+ private double ticksY;
+
+ /**
+ * Updated all the layout variables of this class. If the isFullUpdate parameter is false the
+ * zeroPos is not recomputed. It also manages the {@link MFXSlider#bidirectionalProperty()} feature.
+ *
+ * One thing I'm excited about this system is how the coordinates are computed. We heavily make use
+ * of {@link NumberUtils#mapOneRangeToAnother(double, NumberRange, NumberRange, int)}. The sliders values
+ * can be negative or be way greater than the slider's width, that's why the slider's value should be mapped
+ * from the min-max range to the width range that goes from 0 to slider.getWidth().
+ */
+ public void update(boolean isFullUpdate) {
+ MFXSlider slider = getSkinnable();
+
+ boolean ignoreBidirectional = slider.getMin() > 0 || slider.getMax() < 0 || !slider.isBidirectional();
+ if (isFullUpdate) {
+ double val;
+ if (ignoreBidirectional) {
+ val = slider.getMin();
+ } else {
+ val = 0;
+ }
+
+ zeroPos = NumberUtils.mapOneRangeToAnother(
+ val,
+ NumberRange.of(slider.getMin(), slider.getMax()),
+ NumberRange.of(0.0, slider.getWidth()),
+ 2
+ );
+ zeroPos = NumberUtils.clamp(zeroPos, 0, slider.getWidth());
+ }
+
+ thumbX = snapPositionX(
+ NumberUtils.mapOneRangeToAnother(
+ slider.getValue(),
+ NumberRange.of(slider.getMin(), slider.getMax()),
+ NumberRange.of(0.0, slider.getWidth()),
+ 2
+ ) - halfThumbWidth());
+ thumbY = snapPositionY(-halfThumbHeight() + (slider.getHeight() / 2));
+
+ if (!slider.isBidirectional() || ignoreBidirectional) {
+ barW = thumbX - zeroPos + (halfThumbWidth() * 3);
+ barX = zeroPos - halfThumbWidth();
+ } else {
+ barW = slider.getValue() < 0 ? thumbX - zeroPos - halfThumbWidth() : thumbX - zeroPos + (halfThumbWidth() * 3);
+ barX = slider.getValue() < 0 ? zeroPos + barW + halfThumbWidth() : zeroPos - halfThumbWidth();
+ }
+ }
+
+ /**
+ * Builds the major ticks and sets their style class to "tick-even" or "tick-odd" according to their
+ * index in the list.
+ *
+ * After building the ticks and their layout data ({@link TickData}, calls {@link #positionTicks()}.
+ */
+ public void updateTicksData() {
+ MFXSlider slider = getSkinnable();
+
+ List ticksX = ticksAxis.getTickMarks().stream()
+ .map(TickMark::getPosition)
+ .collect(Collectors.toList());
+
+ if (!ticksX.stream().allMatch(d -> d == 0)) {
+ ticksGroup.getChildren().removeAll(getTicks());
+ ticksData.clear();
+
+ ObservableList> tickMarks = ticksAxis.getTickMarks();
+ for (int i = 0; i < tickMarks.size(); i++) {
+ TickMark tickMark = ticksAxis.getTickMarks().get(i);
+ TickData tickData = new TickData();
+ tickData.tick = buildTick();
+ tickData.tick.getStyleClass().setAll(NumberUtils.isEven(i) ? "tick-even" : "tick-odd");
+ tickData.tickVal = (double) tickMark.getValue();
+ tickData.x = snapPositionX(ticksX.get(i) - (tickData.halfTickWidth() / 1.5));
+ ticksData.add(tickData);
+
+ if (i == tickMarks.size() - 1) {
+ tickData.x -= tickData.halfTickWidth();
+ }
+ }
+ ticksY = snapPositionY(-ticksData.get(0).halfTickHeight() + (slider.getHeight() / 2));
+ positionTicks();
+ }
+ }
+
+ /**
+ * If the {@link MFXSlider#showMajorTicksProperty()} is set to false, does nothing.
+ *
+ * For each previously built {@link TickData} adds the tick to the ticks container and sets their position,
+ * if {@link MFXSlider#showTicksAtEdgesProperty()} is set to false the ticks that represent the min and max values
+ * of the slider are not added.
+ */
+ public void positionTicks() {
+ MFXSlider slider = getSkinnable();
+ if (!slider.isShowMajorTicks()) {
+ return;
+ }
+
+ for (int i = 0; i < ticksData.size(); i++) {
+ TickMark tickMark = ticksAxis.getTickMarks().get(i);
+ TickData tickData = ticksData.get(i);
+
+ if (!slider.isShowTicksAtEdges() &&
+ ((double) tickMark.getValue() == slider.getMax() || (double) tickMark.getValue() == slider.getMin())
+ ) {
+ continue;
+ }
+
+ ticksGroup.getChildren().add(tickData.tick);
+ tickData.tick.relocate(tickData.x, ticksY);
+ }
+ }
+
+ /**
+ * Gets the current slider's value, then creates a list with the ticks value obtained by mapping the {@link TickData} list
+ * with {@link TickData#getTickVal()}, calls {@link NumberUtils#closestValueTo(double, List)}.
+ *
+ * @return the closest value from the current value and the list of the ticks values
+ */
+ public double findNearestTick() {
+ MFXSlider slider = getSkinnable();
+
+ double currVal = slider.getValue();
+ return NumberUtils.closestValueTo(currVal, ticksData.stream().map(TickData::getTickVal).collect(Collectors.toList()));
+ }
+
+ /**
+ * Returns all the ticks by mapping the {@link TickData} list with {@link TickData#getTick()}.
+ */
+ public List getTicks() {
+ return ticksData.stream().map(TickData::getTick).collect(Collectors.toList());
+ }
+
+ /**
+ * @return half the width of the thumb
+ */
+ public double halfThumbWidth() {
+ return thumb.prefWidth(-1) / 2;
+ }
+
+ /**
+ * @return half the height of the thumb
+ */
+ public double halfThumbHeight() {
+ return thumb.prefHeight(-1) / 2;
+ }
+ }
+
+ /**
+ * Support class to the slider's skin. It helps manage the popup, by handling {@link MFXSlider#popupSupplierProperty()} changes,
+ * computing it's position and it's rotation according to the current orientation and side.
+ *
+ * The class has three bindings fields: for the layout x (xBinding), layout y (yBinding) and rotation (rBinding).
+ */
+ @SuppressWarnings("FieldCanBeLocal")
+ protected class PopupManager {
+ private DoubleBinding xBinding;
+ private DoubleBinding yBinding;
+ private DoubleBinding rBinding;
+
+ /**
+ * If the popup is not null, re-creates the xBinding (calls {@link #computeXPos()}) which depends on the
+ * thumb's x position, popup's width, thumb supplier, orientation and popup side properties; re-creates the yBinding
+ * (calls {@link #computeYPos()}) which depends on the thumb's y position, popup's height, thumb supplier, orientation and popup side properties;
+ * re-creates the rBinding (calls {@link #computeRotate()}) which depends on the slider's orientation and popup side properties.
+ *
+ * Once the bindings are re-built the popup's layoutX, layoutY and rotate properties are bound to them.
+ */
+ private void initPopup() {
+ MFXSlider slider = getSkinnable();
+ if (popup == null) {
+ return;
+ }
+
+ xBinding = Bindings.createDoubleBinding(
+ this::computeXPos,
+ thumb.layoutXProperty(), popup.widthProperty(), slider.thumbSupplierProperty(), slider.orientationProperty(), slider.popupSideProperty()
+ );
+ yBinding = Bindings.createDoubleBinding(
+ this::computeYPos,
+ thumb.layoutYProperty(), popup.heightProperty(), slider.thumbSupplierProperty(), slider.orientationProperty(), slider.popupSideProperty()
+ );
+ rBinding = Bindings.createDoubleBinding(
+ this::computeRotate,
+ slider.orientationProperty(), slider.popupSideProperty()
+ );
+
+ popup.rotateProperty().bind(rBinding);
+ popup.layoutXProperty().bind(xBinding);
+ popup.layoutYProperty().bind(yBinding);
+ }
+
+ /**
+ * Responsible for computing the popup's x position.
+ *
+ * This takes into account the slider's orientation and the popup side properties.
+ */
+ private double computeXPos() {
+ MFXSlider slider = getSkinnable();
+
+ double x;
+ if (slider.getOrientation() == Orientation.HORIZONTAL) {
+ x = thumb.getLayoutX() - ((popup.getWidth() - layoutData.halfThumbWidth() * 2) / 2);
+ x = slider.getPopupSide() == SliderPopupSide.DEFAULT ? x : x - 1;
+ } else {
+ x = thumb.getLayoutX() - (popup.getHeight() / 2) + (layoutData.halfThumbWidth() / 2) + 1;
+ }
+
+ return snapPositionX(x);
+ }
+
+ /**
+ * Responsible for computing the popup's y position.
+ *
+ * This takes into account the slider's orientation and the popup side properties.
+ */
+ private double computeYPos() {
+ MFXSlider slider = getSkinnable();
+
+ double y;
+ if (slider.getOrientation() == Orientation.HORIZONTAL) {
+ if (slider.getPopupSide() == SliderPopupSide.DEFAULT) {
+ y = -(popup.getHeight() + layoutData.halfThumbHeight() + slider.getPopupPadding());
+ } else {
+ y = slider.getHeight() + layoutData.halfThumbHeight() + slider.getPopupPadding();
+ }
+ } else {
+ if (slider.getPopupSide() == SliderPopupSide.DEFAULT) {
+ y = -(popup.getWidth() + layoutData.halfThumbHeight() + (slider.getPopupPadding() / 1.5));
+ } else {
+ y = (slider.getHeight() * 1.5) + layoutData.halfThumbHeight() + slider.getPopupPadding();
+ }
+ }
+
+ return snapPositionY(y);
+ }
+
+ /**
+ * Responsible for computing the popup's rotation angle.
+ *
+ * This takes into account the slider's orientation and the popup side properties.
+ */
+ private double computeRotate() {
+ MFXSlider slider = getSkinnable();
+
+ if (slider.getOrientation() == Orientation.HORIZONTAL && slider.getPopupSide() == SliderPopupSide.OTHER_SIDE) {
+ return 180;
+ }
+
+ if (slider.getOrientation() == Orientation.VERTICAL) {
+ return slider.getPopupSide() == SliderPopupSide.DEFAULT ? 90 : -90;
+ }
+
+ return 0;
+ }
+ }
+
+ /**
+ * Support class to the {@link LayoutData} class, simple bean which contains info
+ * about the slider's major ticks such as: the tick Node, the value represented by the tick and its x position.
+ */
+ protected static class TickData {
+ private Node tick;
+ private double tickVal;
+ private double x;
+
+ /**
+ * @return the tick Node
+ */
+ public Node getTick() {
+ return tick;
+ }
+
+ /**
+ * @return the value represented by the tick
+ */
+ public double getTickVal() {
+ return tickVal;
+ }
+
+ /**
+ * @return the tick's x position
+ */
+ public double getX() {
+ return x;
+ }
+
+ /**
+ * @return half the tick's height
+ */
+ public double halfTickHeight() {
+ return tick == null ? 0 : tick.prefHeight(-1) / 2;
+ }
+
+ /**
+ * @return half the tick's width
+ */
+ public double halfTickWidth() {
+ return tick == null ? 0 : tick.prefWidth(-1) / 2;
+ }
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperSkin.java
index 502ced5a..939024c8 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -26,6 +26,8 @@
import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
import io.github.palexdev.materialfx.controls.factories.RippleClipTypeFactory;
import io.github.palexdev.materialfx.effects.ripple.RippleClipType;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.animation.*;
import javafx.beans.InvalidationListener;
import javafx.beans.binding.Bindings;
@@ -196,9 +198,11 @@ private void setListeners() {
stepperBar.getChildren().add(0, progressBarGroup);
stepper.next();
- PauseTransition pauseTransition = new PauseTransition(Duration.millis(250));
- pauseTransition.setOnFinished(event -> stepper.requestLayout());
- pauseTransition.play();
+ AnimationUtils.PauseBuilder.build()
+ .setDuration(250)
+ .setOnFinished(event -> stepper.requestLayout())
+ .getAnimation()
+ .play();
});
stepper.currentContentProperty().addListener((observable, oldValue, newValue) -> {
if (newValue != null) {
@@ -238,11 +242,11 @@ private void manageScene() {
stepper.next();
}
- stepper.sceneProperty().addListener((observableScene, oldScene, newScene) -> {
- if (newScene != null && stepper.getCurrentIndex() == -1) {
+ NodeUtils.waitForScene(stepper, () -> {
+ if (stepper.getCurrentIndex() == -1) {
stepper.next();
}
- });
+ }, true, false);
stepper.needsLayoutProperty().addListener((observable, oldValue, newValue) -> {
if (!buttonWasPressed) {
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperToggleSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperToggleSkin.java
index 45eb47ec..09559de0 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperToggleSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXStepperToggleSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableColumnSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableColumnSkin.java
index 302578f5..d69db036 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableColumnSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableColumnSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableRowCellSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableRowCellSkin.java
index 471bb00e..f1da6ee3 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableRowCellSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableRowCellSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableViewSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableViewSkin.java
index 46497b8c..5eb4a4a2 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableViewSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableViewSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -118,7 +118,7 @@ public class MFXTableViewSkin extends SkinBase> {
private final HBox pgcBox;
private final Label rowsPerPageLabel;
private final MFXComboBox rowsPerPageCombo;
- private final Label shownRows;
+ private final Label shownRowsLabel;
private final ObjectProperty shownRowsRange = new SimpleObjectProperty<>();
@@ -152,13 +152,15 @@ public MFXTableViewSkin(MFXTableView tableView) {
VBox.setVgrow(rowsBox, Priority.ALWAYS);
rowsPerPageLabel = new Label("Rows Per Page");
+ rowsPerPageLabel.setId("rowsPerPageLabel");
rowsPerPageCombo = new MFXComboBox<>();
rowsPerPageCombo.setComboStyle(Styles.ComboBoxStyles.STYLE2);
rowsPerPageCombo.setMaxPopupHeight(100);
- shownRows = new Label("Shown Rows: ");
- shownRows.textProperty().bind(Bindings.createStringBinding(
+ shownRowsLabel = new Label("Shown Rows: ");
+ shownRowsLabel.setId("shownRowsLabel");
+ shownRowsLabel.textProperty().bind(Bindings.createStringBinding(
() -> {
if (getShownRowsRange() != null) {
return new StringBuilder()
@@ -231,11 +233,7 @@ private void setListeners() {
}
});
- tableView.sceneProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null) {
- filterStageDialog.setOwner(newValue.getWindow());
- }
- });
+ NodeUtils.waitForScene(tableView, () -> filterStageDialog.setOwner(tableView.getScene().getWindow()), true, false);
tableView.getItems().addListener((InvalidationListener) listInvalidated -> reset(false));
tableView.itemsProperty().addListener(propertyInvalidated -> {
@@ -491,7 +489,7 @@ protected HBox buildPaginationControls() {
HBox pgcBox = new HBox(15,
filterIcon, clearFilterIcon, new Separator(Orientation.VERTICAL),
- box1, new Separator(Orientation.VERTICAL), box2, new Separator(Orientation.VERTICAL), shownRows
+ box1, new Separator(Orientation.VERTICAL), box2, new Separator(Orientation.VERTICAL), shownRowsLabel
);
pgcBox.getStyleClass().setAll("pagination-controls-container");
pgcBox.setAlignment(Pos.CENTER);
@@ -503,9 +501,9 @@ box1, new Separator(Orientation.VERTICAL), box2, new Separator(Orientation.VERTI
pgcBox.setPrefWidth(Region.USE_COMPUTED_SIZE);
pgcBox.setMaxWidth(Double.MAX_VALUE);
- shownRows.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
- shownRows.setPadding(new Insets(5));
- HBox.setHgrow(shownRows, Priority.ALWAYS);
+ shownRowsLabel.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
+ shownRowsLabel.setPadding(new Insets(5));
+ HBox.setHgrow(shownRowsLabel, Priority.ALWAYS);
return pgcBox;
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTextFieldSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTextFieldSkin.java
index 6ceb4f13..5fb304dd 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTextFieldSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTextFieldSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXToggleButtonSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXToggleButtonSkin.java
index e482b356..2ee7d2c2 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXToggleButtonSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXToggleButtonSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -23,10 +23,10 @@
import io.github.palexdev.materialfx.effects.MFXDepthManager;
import io.github.palexdev.materialfx.effects.ripple.MFXCircleRippleGenerator;
import io.github.palexdev.materialfx.effects.ripple.RipplePosition;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
+import io.github.palexdev.materialfx.utils.NodeUtils;
import javafx.animation.Interpolator;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
import javafx.beans.binding.Bindings;
import javafx.scene.Cursor;
import javafx.scene.control.skin.ToggleButtonSkin;
@@ -129,11 +129,11 @@ private void setListeners() {
* control's skinProperty, when the skin is not null and the ToggleButton isSelected,
* play the animation.
*/
- toggleButton.skinProperty().addListener((observable, oldValue, newValue) -> {
- if (newValue != null && toggleButton.isSelected()) {
+ NodeUtils.waitForSkin(toggleButton, () -> {
+ if (toggleButton.isSelected()) {
buildAndPlayAnimation(true);
}
- });
+ }, true, false);
}
protected void setupRippleGenerator() {
@@ -164,16 +164,11 @@ protected void setupRippleGenerator() {
* @param isSelected The control's state
*/
private void buildAndPlayAnimation(boolean isSelected) {
- KeyValue circleTranslateXKey;
- KeyFrame circleTranslateXFrame;
- KeyFrame rippleAnimationFrame;
-
- circleTranslateXKey = new KeyValue(circle.translateXProperty(), computeTranslateX(isSelected), Interpolator.EASE_BOTH);
-
- circleTranslateXFrame = new KeyFrame(Duration.millis(150), circleTranslateXKey);
- rippleAnimationFrame = new KeyFrame(Duration.ZERO, event -> rippleGenerator.generateRipple(null));
- Timeline timeline = new Timeline(circleTranslateXFrame, rippleAnimationFrame);
- timeline.play();
+ AnimationUtils.TimelineBuilder.build()
+ .add(
+ KeyFrames.of(Duration.ZERO, event -> rippleGenerator.generateRipple(null)),
+ KeyFrames.of(150, circle.translateXProperty(), computeTranslateX(isSelected), Interpolator.EASE_BOTH)
+ ).getAnimation().play();
}
/**
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTreeItemSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTreeItemSkin.java
index ba9a81b3..fe0dbbab 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTreeItemSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTreeItemSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins;
@@ -23,8 +23,11 @@
import io.github.palexdev.materialfx.controls.base.AbstractMFXTreeItem;
import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
import io.github.palexdev.materialfx.selection.TreeSelectionModel;
+import io.github.palexdev.materialfx.utils.AnimationUtils;
+import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
import io.github.palexdev.materialfx.utils.NodeUtils;
-import javafx.animation.*;
+import javafx.animation.Animation;
+import javafx.animation.ParallelTransition;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.geometry.Insets;
@@ -35,7 +38,6 @@
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Rectangle;
-import javafx.util.Duration;
import java.util.ArrayList;
import java.util.Comparator;
@@ -109,7 +111,7 @@ public MFXTreeItemSkin(MFXTreeItem item) {
box.setMinHeight(Region.USE_PREF_SIZE);
box.setMaxHeight(Region.USE_PREF_SIZE);
- item.setInitialHeight(NodeUtils.getNodeHeight(box));
+ item.setInitialHeight(NodeUtils.getRegionHeight(box));
getChildren().add(box);
box.setPrefHeight(item.getInitialHeight());
@@ -154,7 +156,7 @@ public MFXTreeItemSkin(MFXTreeItem item) {
item.fireEvent(new TreeItemEvent<>(TreeItemEvent.ADD_REMOVE_ITEM_EVENT, item, -value));
}
if (!tmpAdded.isEmpty() && (item.isExpanded() || item.isStartExpanded())) {
- double value = tmpAdded.stream().mapToDouble(NodeUtils::getNodeHeight).sum();
+ double value = tmpAdded.stream().mapToDouble(NodeUtils::getRegionHeight).sum();
box.getChildren().addAll(tmpAdded);
FXCollections.sort(box.getChildren(), Comparator.comparingInt(item.getItems()::indexOf));
item.fireEvent(new TreeItemEvent<>(TreeItemEvent.ADD_REMOVE_ITEM_EVENT, item, value));
@@ -300,11 +302,11 @@ protected void updateDisplay() {
protected void buildAnimation(double fHeight) {
MFXTreeItem item = getSkinnable();
- KeyValue expCollValue = new KeyValue(box.prefHeightProperty(), fHeight, MFXAnimationFactory.getInterpolatorV2());
- KeyFrame expCollFrame = new KeyFrame(Duration.millis(item.getAnimationDuration()), expCollValue);
- KeyValue disclosureValue = new KeyValue(cell.getDisclosureNode().rotateProperty(), (item.isExpanded() ? 90 : 0), MFXAnimationFactory.getInterpolatorV2());
- KeyFrame disclosureFrame = new KeyFrame(Duration.millis(250), disclosureValue);
- animation = new ParallelTransition(new Timeline(expCollFrame, disclosureFrame));
+ animation = (ParallelTransition) AnimationUtils.ParallelBuilder.build()
+ .add(
+ KeyFrames.of(item.getAnimationDuration(), box.prefHeightProperty(), fHeight, MFXAnimationFactory.getInterpolatorV2()),
+ KeyFrames.of(250, cell.getDisclosureNode().rotateProperty(), (item.isExpanded() ? 90 : 0), MFXAnimationFactory.getInterpolatorV2())
+ ).getAnimation();
item.animationRunningProperty().bind(animation.statusProperty().isEqualTo(Animation.Status.RUNNING));
}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyComboBoxSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyComboBoxSkin.java
index f1c5c6bd..14207e4d 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyComboBoxSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyComboBoxSkin.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins.legacy;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyTableViewSkin.java b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyTableViewSkin.java
index 09db8ce3..fbf76f84 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyTableViewSkin.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/skins/legacy/MFXLegacyTableViewSkin.java
@@ -1,27 +1,23 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.skins.legacy;
-import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.scene.Node;
@@ -32,7 +28,6 @@
import javafx.scene.control.skin.VirtualFlow;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Region;
-import javafx.util.Duration;
import java.util.Set;
@@ -46,9 +41,6 @@ public class MFXLegacyTableViewSkin extends TableViewSkin {
private final ScrollBar vBar;
private final ScrollBar hBar;
- private final Timeline hideBars;
- private final Timeline showBars;
-
public MFXLegacyTableViewSkin(TableView tableView) {
super(tableView);
@@ -69,17 +61,6 @@ public MFXLegacyTableViewSkin(TableView tableView) {
hBar.setOrientation(Orientation.HORIZONTAL);
hBar.getStyleClass().add("mfx-scroll-bar");
hBar.visibleProperty().bind(hBar.visibleAmountProperty().isNotEqualTo(0));
-
- hideBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 0.0, MFXAnimationFactory.getInterpolatorV1()))
- );
- showBars = new Timeline(
- new KeyFrame(Duration.millis(400),
- new KeyValue(vBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
- new KeyValue(hBar.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()))
- );
}
private void bindScrollBars(TableView> tableView) {
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/AnimationUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/AnimationUtils.java
new file mode 100644
index 00000000..ac516d94
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/AnimationUtils.java
@@ -0,0 +1,863 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.utils;
+
+import io.github.palexdev.materialfx.beans.AnimationsData;
+import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
+import javafx.animation.*;
+import javafx.animation.Animation.Status;
+import javafx.beans.binding.BooleanExpression;
+import javafx.beans.value.WritableValue;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.Node;
+import javafx.scene.control.Labeled;
+import javafx.scene.text.Text;
+import javafx.stage.Window;
+import javafx.util.Duration;
+
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Supplier;
+
+/**
+ * Utility class to easily build animations of any sort. Designed with fluent api.
+ */
+public class AnimationUtils {
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+ private AnimationUtils() {
+ }
+
+ //================================================================================
+ // Static Methods
+ //================================================================================
+
+ /**
+ * Temporarily disables the given node for the specified duration.
+ */
+ public static void disableTemporarily(Duration duration, Node node) {
+ node.setDisable(true);
+ AnimationUtils.PauseBuilder.build()
+ .setOnFinished(event -> node.setDisable(false))
+ .setDuration(duration)
+ .getAnimation()
+ .play();
+ }
+
+ /**
+ * Calls {@link #disableTemporarily(Duration, Node)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static void disableTemporarily(double millis, Node node) {
+ disableTemporarily(Duration.millis(millis), node);
+ }
+
+ /**
+ * Executes the given onFinished action after the specified duration of time.
+ * (Uses a PauseTransition)
+ */
+ public static void executeLater(Duration duration, EventHandler onFinished) {
+ PauseBuilder.build().setDuration(duration).setOnFinished(onFinished).getAnimation().play();
+ }
+
+ /**
+ * Calls {@link #executeLater(Duration, EventHandler)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static void executeLater(double millis, EventHandler onFinished) {
+ executeLater(Duration.millis(millis), onFinished);
+ }
+
+ /**
+ * Sets the text of the given {@link Labeled} with a fade out/fade in transition.
+ *
+ * @param labeled the labeled control to change the text to
+ * @param duration the fade in and fade out speed
+ * @param nexText the new text to set
+ * @return an instance of {@link AbstractBuilder}
+ */
+ public static AbstractBuilder transitionText(Labeled labeled, Duration duration, String nexText) {
+ return SequentialBuilder.build()
+ .hide(AnimationsData.of(labeled, duration, event -> labeled.setText(nexText)))
+ .show(AnimationsData.of(labeled, duration));
+ }
+
+ /**
+ * Calls {@link #transitionText(Labeled, Duration, String)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static AbstractBuilder transitionText(Labeled labeled, double millis, String nexText) {
+ return transitionText(labeled, Duration.millis(millis), nexText);
+ }
+
+ /**
+ * Sets the text of the given {@link Text} with a fade out/fade in transition.
+ *
+ * @param text the text control to change the text to
+ * @param duration the fade in and fade out speed
+ * @param nexText the new text to set
+ * @return an instance of {@link AbstractBuilder}
+ */
+ public static AbstractBuilder transitionText(Text text, Duration duration, String nexText) {
+ return SequentialBuilder.build()
+ .hide(AnimationsData.of(text, duration, event -> text.setText(nexText)))
+ .show(AnimationsData.of(text, duration));
+ }
+
+ /**
+ * Calls {@link #transitionText(Text, Duration, String)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static AbstractBuilder transitionText(Text text, double millis, String nexText) {
+ return transitionText(text, Duration.millis(millis), nexText);
+ }
+
+ /**
+ * @return true if the given animation status is RUNNING, otherwise false
+ */
+ public static boolean isPlaying(Animation animation) {
+ return animation.getStatus() == Status.RUNNING;
+ }
+
+ /**
+ * @return true if the given animation status is PAUSED, otherwise false
+ */
+ public static boolean isPaused(Animation animation) {
+ return animation.getStatus() == Status.PAUSED;
+ }
+
+ //================================================================================
+ // Builders
+ //================================================================================
+
+ /**
+ * Common base class for {@link ParallelBuilder} and {@link SequentialBuilder}.
+ *
+ * This builder, designed with fluent api, allows you to create simple and complex animations with just a few lines of code.
+ *
+ * The builder keeps the reference of the "main" animation (depending on the subclass can be ParallelTransition or SequentialTransition, in
+ * the AbstractBuilder the type is a generic {@link Animation}), and defines and abstract method that subclasses must implement
+ * to properly add animations to the "main".
+ */
+ public static abstract class AbstractBuilder {
+ //================================================================================
+ // Properties
+ //================================================================================
+ protected Animation animation;
+
+ //================================================================================
+ // Abstract Methods
+ //================================================================================
+
+ /**
+ * Adds the given animation to the "main" animation.
+ */
+ protected abstract void addAnimation(Animation animation);
+
+ /**
+ * @return the "main" animation instance
+ */
+ public abstract Animation getAnimation();
+
+ //================================================================================
+ // Methods
+ //================================================================================
+ protected void init(Animation animation) {
+ this.animation = animation;
+ }
+
+ /**
+ * Adds the given animation to the "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(Animation animation) {
+ addAnimation(animation);
+ return this;
+ }
+
+ /**
+ * Sets the given onFinished action to the given animation and then adds it to the
+ * "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(Animation animation, EventHandler onFinished) {
+ animation.setOnFinished(onFinished);
+ addAnimation(animation);
+ return this;
+ }
+
+ /**
+ * Gets the animation from the supplier and adds it to the "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(Supplier animationSupplier) {
+ addAnimation(animationSupplier.get());
+ return this;
+ }
+
+ /**
+ * Gets the animation from the supplier, sets the given onFinished action to it and then adds it to the
+ * "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(Supplier animationSupplier, EventHandler onFinished) {
+ Animation animation = animationSupplier.get();
+ animation.setOnFinished(onFinished);
+ addAnimation(animation);
+ return this;
+ }
+
+ /**
+ * Builds a {@link Timeline} with the given keyframes and adds it to the "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(KeyFrame... keyFrames) {
+ addAnimation(new Timeline(keyFrames));
+ return this;
+ }
+
+ /**
+ * Builds a {@link Timeline} with the given keyframes, sets the given onFinished action to it and then adds it to the
+ * "main" animation by calling {@link #addAnimation(Animation)}.
+ */
+ public AbstractBuilder add(EventHandler onFinished, KeyFrame... keyFrames) {
+ addAnimation(TimelineBuilder.build().add(keyFrames).setOnFinished(onFinished).getAnimation());
+ return this;
+ }
+
+
+ /**
+ * For each given node builds and adds an animation that disables the node
+ * after the given duration of time.
+ *
+ * @param duration the time after which the nodes are disabled
+ */
+ public AbstractBuilder disable(Duration duration, Node... nodes) {
+ for (Node node : nodes) {
+ addAnimation(
+ PauseBuilder.build()
+ .setDuration(duration)
+ .setOnFinished(end -> node.setDisable(true))
+ .getAnimation()
+ );
+ }
+ return this;
+ }
+
+ /**
+ * For each given node builds and adds an animation that enables the node
+ * after the given duration of time.
+ *
+ * @param duration the duration after which the nodes are enabled
+ */
+ public AbstractBuilder enable(Duration duration, Node... nodes) {
+ for (Node node : nodes) {
+ addAnimation(
+ PauseBuilder.build()
+ .setDuration(duration)
+ .setOnFinished(end -> node.setDisable(false))
+ .getAnimation()
+ );
+ }
+ return this;
+ }
+
+ /**
+ * For each given window builds and adds an animation that hides the window by fading it out.
+ *
+ * @param duration the fade animation speed
+ */
+ public AbstractBuilder hide(Duration duration, Window... windows) {
+ for (Window window : windows) {
+ addAnimation(TimelineBuilder.build().add(KeyFrames.of(duration, window.opacityProperty(), 0)).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * Calls {@link #hide(Duration, Window...)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public AbstractBuilder hide(double millis, Window... windows) {
+ return hide(Duration.millis(millis), windows);
+ }
+
+ /**
+ * For each given node builds and adds an animation that hides the node by fading it out.
+ *
+ * @param duration the fade animation speed
+ */
+ public AbstractBuilder hide(Duration duration, Node... nodes) {
+ for (Node node : nodes) {
+ addAnimation(TimelineBuilder.build().hide(duration, node).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * Calls {@link #hide(Duration, Node...)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public AbstractBuilder hide(double millis, Node... nodes) {
+ return hide(Duration.millis(millis), nodes);
+ }
+
+ /**
+ * Creates and adds a fade out animation for each given {@link AnimationsData}.
+ */
+ public final AbstractBuilder hide(AnimationsData... data) {
+ for (AnimationsData animData : data) {
+ addAnimation(TimelineBuilder.build().hide(animData).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * For each given window builds and adds an animation that shows the window by fading it in.
+ *
+ * @param duration the fade animation speed
+ */
+ public AbstractBuilder show(Duration duration, Window... windows) {
+ for (Window window : windows) {
+ addAnimation(TimelineBuilder.build().show(duration, window).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * Calls {@link #show(Duration, Window...)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public AbstractBuilder show(double millis, Window... windows) {
+ return show(Duration.millis(millis), windows);
+ }
+
+ /**
+ * For each given node builds and adds an animation that shows the node by fading it in.
+ *
+ * @param duration the fade animation speed
+ */
+ public AbstractBuilder show(Duration duration, Node... nodes) {
+ for (Node node : nodes) {
+ addAnimation(TimelineBuilder.build().show(duration, node).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * Calls {@link #show(Duration, Node...)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public AbstractBuilder show(double millis, Node... nodes) {
+ return show(Duration.millis(millis), nodes);
+ }
+
+ /**
+ * Creates and adds a fade in animation for each given {@link AnimationsData}.
+ */
+ public final AbstractBuilder show(AnimationsData... data) {
+ for (AnimationsData animData : data) {
+ addAnimation(TimelineBuilder.build().show(animData).getAnimation());
+ }
+ return this;
+ }
+
+ /**
+ * Sets the action to perform when the "main" animation ends.
+ */
+ public AbstractBuilder setOnFinished(EventHandler onFinished) {
+ animation.setOnFinished(onFinished);
+ return this;
+ }
+
+ /**
+ * Sets the "main" animation cycle count.
+ */
+ public AbstractBuilder setCycleCount(int cycleCount) {
+ animation.setCycleCount(cycleCount);
+ return this;
+ }
+
+ /**
+ * Sets the "main" animation delay.
+ */
+ public AbstractBuilder setDelay(Duration delay) {
+ animation.setDelay(delay);
+ return this;
+ }
+
+ /**
+ * Sets the "main" animation delay.
+ */
+ public AbstractBuilder setDelay(double millis) {
+ animation.setDelay(Duration.millis(millis));
+ return this;
+ }
+
+ /**
+ * Sets the "main" animation rate/speed.
+ */
+ public AbstractBuilder setRate(double rate) {
+ animation.setRate(rate);
+ return this;
+ }
+ }
+
+ /**
+ * Implementation of {@link AbstractBuilder} that uses a {@link SequentialTransition} as "main" animation.
+ */
+ public static class SequentialBuilder extends AbstractBuilder {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private final SequentialTransition sequentialTransition = new SequentialTransition();
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+ public SequentialBuilder() {
+ init(sequentialTransition);
+ }
+
+ //================================================================================
+ // Static Methods
+ //================================================================================
+
+ /**
+ * @return a new SequentialBuilder instance. Equivalent to calling the constructor,
+ * it's just a way to omit the new keyword
+ */
+ public static SequentialBuilder build() {
+ return new SequentialBuilder();
+ }
+
+ //================================================================================
+ // Override Methods
+ //================================================================================
+ @Override
+ protected void addAnimation(Animation animation) {
+ sequentialTransition.getChildren().add(animation);
+ }
+
+ @Override
+ public SequentialTransition getAnimation() {
+ return sequentialTransition;
+ }
+ }
+
+ /**
+ * Implementation of {@link AbstractBuilder} that uses a {@link ParallelTransition} as "main" animation.
+ */
+ public static class ParallelBuilder extends AbstractBuilder {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private final ParallelTransition parallelTransition = new ParallelTransition();
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+ public ParallelBuilder() {
+ init(parallelTransition);
+ }
+
+ //================================================================================
+ // Static Methods
+ //================================================================================
+
+ /**
+ * @return a new ParallelBuilder instance. Equivalent to calling the constructor,
+ * it's just a way to omit the new keyword
+ */
+ public static ParallelBuilder build() {
+ return new ParallelBuilder();
+ }
+
+ //================================================================================
+ // Override Methods
+ //================================================================================
+ @Override
+ protected void addAnimation(Animation animation) {
+ parallelTransition.getChildren().add(animation);
+ }
+
+ @Override
+ public ParallelTransition getAnimation() {
+ return parallelTransition;
+ }
+ }
+
+ /**
+ * Builder class to easily create a {@link Timeline} with fluent api.
+ */
+ public static class TimelineBuilder {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private final Timeline timeline = new Timeline();
+
+ /**
+ * @return a new TimelineBuilder instance. Equivalent to calling the constructor,
+ * it's just a way to omit the new keyword
+ */
+ public static TimelineBuilder build() {
+ return new TimelineBuilder();
+ }
+
+ //================================================================================
+ // Methods
+ //================================================================================
+
+ /**
+ * Adds the specified KeyFrames to the timeline.
+ */
+ public TimelineBuilder add(KeyFrame... keyFrames) {
+ timeline.getKeyFrames().addAll(Arrays.asList(keyFrames));
+ return this;
+ }
+
+ /**
+ * Builds a KeyFrame to hide the given Window by fading it out.
+ *
+ * @param duration the fade animation speed
+ */
+ public TimelineBuilder hide(Duration duration, Window window) {
+ add(KeyFrames.of(duration, window.opacityProperty(), 0));
+ return this;
+ }
+
+ /**
+ * Calls {@link #hide(Duration, Window)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public TimelineBuilder hide(double millis, Window window) {
+ return hide(Duration.millis(millis), window);
+ }
+
+ /**
+ * Builds the KeyFrames to hide the given node by fading it out.
+ *
+ * @param duration the fade animation speed
+ */
+ public TimelineBuilder hide(Duration duration, Node node) {
+ add(
+ KeyFrames.of(Duration.ZERO, node.opacityProperty(), 1.0, MFXAnimationFactory.getInterpolatorV1()),
+ KeyFrames.of(duration, node.opacityProperty(), 0, MFXAnimationFactory.getInterpolatorV1())
+ );
+ return this;
+ }
+
+ /**
+ * Calls {@link #hide(Duration, Node)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public TimelineBuilder hide(double millis, Node node) {
+ return hide(Duration.millis(millis), node);
+ }
+
+ /**
+ * Builds the KeyFrames to hide the specified node in the AnimationsData bean, by fading it out.
+ */
+ public final TimelineBuilder hide(AnimationsData data) {
+ add(
+ KeyFrames.of(Duration.ZERO, data.node().opacityProperty(), 1.0),
+ KeyFrames.of(data.duration(), data.node().opacityProperty(), 0.0)
+ );
+ setOnFinished(data.onFinished());
+ return this;
+ }
+
+ /**
+ * Builds a KeyFrame to show the given Window by fading it in.
+ *
+ * @param duration the fade animation speed
+ */
+ public TimelineBuilder show(Duration duration, Window window) {
+ add(KeyFrames.of(duration, window.opacityProperty(), 1.0));
+ return this;
+ }
+
+ /**
+ * Calls {@link #show(Duration, Window)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public TimelineBuilder show(double millis, Window window) {
+ return show(Duration.millis(millis), window);
+ }
+
+ /**
+ * Builds the KeyFrames to show the given node by fading it in.
+ *
+ * @param duration the fade animation speed
+ */
+ public TimelineBuilder show(Duration duration, Node node) {
+ add(
+ KeyFrames.of(Duration.ZERO, node.opacityProperty(), 0.0),
+ KeyFrames.of(duration, node.opacityProperty(), 1.0)
+ );
+ return this;
+ }
+
+ /**
+ * Calls {@link #show(Duration, Node)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public TimelineBuilder show(double millis, Node node) {
+ return show(Duration.millis(millis), node);
+ }
+
+ /**
+ * Creates and adds a fade in animation for each given {@link AnimationsData}.
+ */
+ public final TimelineBuilder show(AnimationsData data) {
+ add(
+ KeyFrames.of(Duration.ZERO, data.node().opacityProperty(), 0.0),
+ KeyFrames.of(data.duration(), data.node().opacityProperty(), 1.0)
+ );
+ setOnFinished(data.onFinished());
+ return this;
+ }
+
+ /**
+ * Sets the timeline cycle count.
+ */
+ public TimelineBuilder setCycleCount(int cycleCount) {
+ timeline.setCycleCount(cycleCount);
+ return this;
+ }
+
+ /**
+ * Sets the timeline delay.
+ */
+ public TimelineBuilder setDelay(Duration delay) {
+ timeline.setDelay(delay);
+ return this;
+ }
+
+ /**
+ * Sets the timeline delay.
+ */
+ public TimelineBuilder setDelay(double millis) {
+ timeline.setDelay(Duration.millis(millis));
+ return this;
+ }
+
+ /**
+ * Sets the timeline rate/speed.
+ */
+ public TimelineBuilder setRate(double rate) {
+ timeline.setRate(rate);
+ return this;
+ }
+
+ /**
+ * Sets the action to perform when the timeline ends.
+ */
+ public TimelineBuilder setOnFinished(EventHandler onFinished) {
+ timeline.setOnFinished(onFinished);
+ return this;
+ }
+
+ /**
+ * @return the instance of the Timeline
+ */
+ public Timeline getAnimation() {
+ return timeline;
+ }
+ }
+
+ /**
+ * Builder class to easily create a {@link PauseTransition} with fluent api.
+ */
+ public static class PauseBuilder {
+ //================================================================================
+ // Properties
+ //================================================================================
+ private final PauseTransition pauseTransition = new PauseTransition();
+
+ //================================================================================
+ // Static Methods
+ //================================================================================
+
+ /**
+ * @return a new PauseBuilder instance. Equivalent to calling the constructor,
+ * it's just a way to omit the new keyword
+ */
+ public static PauseBuilder build() {
+ return new PauseBuilder();
+ }
+
+ //================================================================================
+ // Methods
+ //================================================================================
+
+ /**
+ * Sets the pause transition duration.
+ */
+ public PauseBuilder setDuration(Duration duration) {
+ pauseTransition.setDuration(duration);
+ return this;
+ }
+
+ /**
+ * Calls {@link #setDuration(Duration)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public PauseBuilder setDuration(double millis) {
+ pauseTransition.setDuration(Duration.millis(millis));
+ return this;
+ }
+
+ /**
+ * Sets the action to perform when the pause transition ends.
+ */
+ public PauseBuilder setOnFinished(EventHandler onFinished) {
+ pauseTransition.setOnFinished(onFinished);
+ return this;
+ }
+
+ /**
+ * @return the instance of the PauseTransition
+ */
+ public PauseTransition getAnimation() {
+ return pauseTransition;
+ }
+
+ /**
+ * This method can be considered an utility.
+ *
+ * A {@link PauseTransition} with the previously set duration runs while the given boolean boolean expression
+ * is false. When the expression is evaluated and it is false the given retryAction is run and the transition
+ * is restarted. When it ends the expression is re-evaluated. When the expression becomes true the onSuccessAction is run.
+ *
+ * So you have a {@link PauseTransition} that runs every tot unit of time and stops only when the given expression is true.
+ *
+ * @param booleanExpression the expression to check at a fixed time rate
+ * @param retryAction the action to perform when the expression is false
+ * @param onSuccessAction the action to perform when the expression is true
+ */
+ public void runWhile(BooleanExpression booleanExpression, Runnable retryAction, Runnable onSuccessAction) {
+ setOnFinished(event -> {
+ if (!booleanExpression.get()) {
+ retryAction.run();
+ getAnimation().playFromStart();
+ } else {
+ onSuccessAction.run();
+ }
+ });
+ getAnimation().play();
+ }
+
+ /**
+ * Same method as {@link #runWhile(BooleanExpression, Runnable, Runnable)} but instead of running
+ * until the given expression is true, it is limited to a maximum number of retries.
+ *
+ * @param maxRetryCount the max number of times the transition can be restarted
+ */
+ public void runWhile(BooleanExpression booleanExpression, Runnable retryAction, Runnable onSuccessAction, int maxRetryCount) {
+ AtomicInteger retryCount = new AtomicInteger(0);
+ setOnFinished(event -> {
+ if (!booleanExpression.get() && retryCount.get() < maxRetryCount) {
+ retryCount.getAndIncrement();
+ retryAction.run();
+ getAnimation().playFromStart();
+ } else {
+ onSuccessAction.run();
+ }
+ });
+ getAnimation().play();
+ }
+ }
+
+ /**
+ * Builder class for keyframes and keyvalues.
+ */
+ public static class KeyFrames {
+
+ //================================================================================
+ // Constructors
+ //================================================================================
+ private KeyFrames() {
+ }
+
+ //================================================================================
+ // Static Methods
+ //================================================================================
+
+ /**
+ * Returns a new KeyFrame with the given duration and action.
+ */
+ public static KeyFrame of(Duration duration, EventHandler action) {
+ return new KeyFrame(duration, action);
+ }
+
+ /**
+ * Calls {@link #of(Duration, EventHandler)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static KeyFrame of(double millis, EventHandler action) {
+ return of(Duration.millis(millis), action);
+ }
+
+ /**
+ * Returns a new KeyFrame with the given duration and keyvalues.
+ */
+ public static KeyFrame of(Duration duration, KeyValue... keyValues) {
+ return new KeyFrame(duration, keyValues);
+ }
+
+ /**
+ * Calls {@link #of(Duration, KeyValue[])} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static KeyFrame of(double millis, KeyValue... keyValues) {
+ return of(Duration.millis(millis), keyValues);
+ }
+
+ /**
+ * Returns a new KeyFrame with the given duration and builds a new KeyValue for it
+ * with the given writable property and endValue.
+ */
+ public static KeyFrame of(Duration duration, WritableValue writableValue, T endValue) {
+ return of(duration, new KeyValue(writableValue, endValue));
+ }
+
+ /**
+ * Calls {@link #of(Duration, WritableValue, Object)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static KeyFrame of(double millis, WritableValue writableValue, T endValue) {
+ return of(Duration.millis(millis), writableValue, endValue);
+ }
+
+ /**
+ * Returns a new KeyFrame with the given duration and builds a new KeyValue for it
+ * with the given writable property, endValue and interpolator.
+ */
+ public static KeyFrame of(Duration duration, WritableValue writableValue, T endValue, Interpolator interpolator) {
+ return of(duration, new KeyValue(writableValue, endValue, interpolator));
+ }
+
+ /**
+ * Calls {@link #of(Duration, WritableValue, Object, Interpolator)} by converting the given millis value
+ * with {@link Duration#millis(double)}.
+ */
+ public static KeyFrame of(double millis, WritableValue writableValue, T endValue, Interpolator interpolator) {
+ return of(Duration.millis(millis), writableValue, endValue, interpolator);
+ }
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/BindingUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/BindingUtils.java
index 24fbd9eb..6494f840 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/BindingUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/BindingUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ColorUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ColorUtils.java
index ec7ca9d2..70a1a0f3 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ColorUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ColorUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DialogUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DialogUtils.java
index 95957cfd..ea49f38c 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DialogUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DialogUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DragResizer.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DragResizer.java
index 177af1b1..9782e379 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DragResizer.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/DragResizer.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExceptionUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExceptionUtils.java
index 026445ac..6782d7d9 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExceptionUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExceptionUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExecutionUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExecutionUtils.java
new file mode 100644
index 00000000..9d8d9b04
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ExecutionUtils.java
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.utils;
+
+import javafx.application.Platform;
+import javafx.beans.binding.BooleanExpression;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * Utils class to help with concurrency and callables.
+ */
+public class ExecutionUtils {
+
+ private static class ThrowableWrapper {
+ Throwable t;
+ }
+
+ /**
+ * Invokes a Runnable on the JavaFX Application Thread and waits for it to finish.
+ *
+ * @param run The Runnable that has to be called on JFX thread.
+ * @throws InterruptedException f the execution is interrupted.
+ * @throws ExecutionException If a exception is occurred in the run method of the Runnable
+ */
+ public static void runAndWaitEx(final Runnable run)
+ throws InterruptedException, ExecutionException {
+ if (Platform.isFxApplicationThread()) {
+ try {
+ run.run();
+ } catch (Exception e) {
+ throw new ExecutionException(e);
+ }
+ } else {
+ final Lock lock = new ReentrantLock();
+ final Condition condition = lock.newCondition();
+ final ThrowableWrapper throwableWrapper = new ThrowableWrapper();
+ lock.lock();
+ try {
+ Platform.runLater(() -> {
+ lock.lock();
+ try {
+ run.run();
+ } catch (Throwable e) {
+ throwableWrapper.t = e;
+ } finally {
+ try {
+ condition.signal();
+ } finally {
+ lock.unlock();
+ }
+ }
+ });
+ condition.await();
+ if (throwableWrapper.t != null) {
+ throw new ExecutionException(throwableWrapper.t);
+ }
+ } finally {
+ lock.unlock();
+ }
+ }
+ }
+
+ /**
+ * Calls {@link #runAndWaitEx(Runnable)} but consumes/ignores any thrown exception.
+ */
+ public static void runAndWait(final Runnable runnable) {
+ try {
+ runAndWaitEx(runnable);
+ } catch (Exception ignored) {
+ }
+ }
+
+ /**
+ * Tries to execute the given callable and prints the stacktrace in case of exception.
+ *
+ * @return the callable result or null in case of exception
+ */
+ public static V tryCallableAndPrint(Callable callable) {
+ try {
+ return callable.call();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Tries to execute the given callable but ignores the exception in case of fail.
+ *
+ * @return the callable result or null in case of exception
+ */
+ public static V tryCallableAndIgnore(Callable callable) {
+ try {
+ return callable.call();
+ } catch (Exception ignored) {
+ return null;
+ }
+ }
+
+ /**
+ * Executes the given action if the given expression and the executeNow parameter are true.
+ *
+ * If the given expression is false or the addListenerIfTrue parameter is true, adds a listener to
+ * the expression and executes the given action every time the property becomes true or just once if
+ * the isOneShot parameter is true.
+ *
+ * @param booleanExpression the expression to evaluate
+ * @param action the action to execute when the expression is true
+ * @param executeNow to specify if the given action should be immediately executed if the expression is already true
+ * @param addListenerIfTrue to specify if the listener should be added anyway to the expression even if it is already true
+ * @param isOneShot to specify if the added listener should be removed after the first time the expression becomes true
+ */
+ public static void executeWhen(BooleanExpression booleanExpression, Runnable action, boolean executeNow, boolean addListenerIfTrue, boolean isOneShot) {
+ if (booleanExpression.get() && executeNow) {
+ action.run();
+ }
+
+ if (!booleanExpression.get() || addListenerIfTrue) {
+ booleanExpression.addListener(new ChangeListener<>() {
+ @Override
+ public void changed(ObservableValue extends Boolean> observable, Boolean oldValue, Boolean newValue) {
+ if (newValue) {
+ action.run();
+ if (isOneShot) {
+ booleanExpression.removeListener(this);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Executes the given truAction if the given expression and the executeTrueNow parameter are true.
+ *
+ * Executes the given falseAction if the given expression is false and the executeFalseNow parameter is true.
+ *
+ * If the given expression is false or the addListenerIfTrue parameter is true, adds a listener to
+ * the expression and executes the given trueAction every time the property becomes true, and the given
+ * falseAction every time the property becomes false, or just once if the isOneShot parameter is true.
+ *
+ * @param booleanExpression the expression to evaluate
+ * @param trueAction the action to execute when the expression is true
+ * @param falseAction the action to execute when the expression is false
+ * @param executeTrueNow to specify if the given trueAction should be immediately executed if the expression is already true
+ * @param executeFalseNow to specify if the given falseAction should be immediately executed if the expression is already false
+ * @param addListenerIfTrue to specify if the listener should be added anyway to the expression even if it is already true
+ * @param isOneShot to specify if the added listener should be removed after the first time the expression becomes true
+ */
+ public static void executeWhen(BooleanExpression booleanExpression, Runnable trueAction, Runnable falseAction,
+ boolean executeTrueNow, boolean executeFalseNow, boolean addListenerIfTrue, boolean isOneShot) {
+ if (booleanExpression.get() && executeTrueNow) {
+ trueAction.run();
+ } else if (!booleanExpression.get() && executeFalseNow) {
+ falseAction.run();
+ }
+
+ if (!booleanExpression.get() || addListenerIfTrue) {
+ booleanExpression.addListener(new ChangeListener<>() {
+ @Override
+ public void changed(ObservableValue extends Boolean> observable, Boolean oldValue, Boolean newValue) {
+ if (newValue) {
+ trueAction.run();
+ } else {
+ falseAction.run();
+ }
+ if (isOneShot) {
+ booleanExpression.removeListener(this);
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LabelUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LabelUtils.java
index 01ba7ec0..76ea6e1a 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LabelUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LabelUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
@@ -69,7 +69,7 @@ public static void registerTruncatedLabelListener(BooleanProperty isTruncated, L
}
/**
- * Computes the min width of a text node so that all the text is visible. Uses {@link NodeUtils#getNodeWidth(Region)}.
+ * Computes the min width of a text node so that all the text is visible. Uses {@link NodeUtils#getRegionWidth(Region)}.
*
* Uses {@link Label} as helper.
*
@@ -81,7 +81,7 @@ public static double computeLabelWidth(Font font, String text) {
helper.setMaxWidth(Double.MAX_VALUE);
helper.setFont(font);
- return NodeUtils.getNodeWidth(helper);
+ return NodeUtils.getRegionWidth(helper);
}
/**
@@ -96,7 +96,7 @@ public static double computeLabelHeight(Font font, String text) {
Label helper = new Label(text);
helper.setMaxWidth(Double.MAX_VALUE);
helper.setFont(font);
- return NodeUtils.getNodeHeight(helper);
+ return NodeUtils.getRegionHeight(helper);
}
/**
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LoaderUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LoaderUtils.java
index ac13fff2..84527de8 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LoaderUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/LoaderUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NodeUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NodeUtils.java
index 86a30e7c..bbed3e30 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NodeUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NodeUtils.java
@@ -1,29 +1,34 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.css.PseudoClass;
import javafx.event.Event;
import javafx.geometry.*;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
+import javafx.scene.control.Control;
+import javafx.scene.control.Skin;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
@@ -174,32 +179,70 @@ public static void makeRegionCircular(Region region, double radius) {
}
}
+ /**
+ * Retrieves the region height if it isn't still laid out.
+ *
+ * @param region the Region of which to know the height
+ * @return the calculated height
+ */
+ public static double getRegionHeight(Region region) {
+ Group group = new Group(region);
+ Scene scene = new Scene(group);
+ group.applyCss();
+ group.layout();
+
+ group.getChildren().clear();
+ return region.getHeight();
+ }
+
/**
* Retrieves the region width if it isn't still laid out.
*
* @param region the Region of which to know the width
* @return the calculated width
*/
- public static double getNodeWidth(Region region) {
+ public static double getRegionWidth(Region region) {
Group group = new Group(region);
Scene scene = new Scene(group);
group.applyCss();
group.layout();
+
+ group.getChildren().clear();
return region.getWidth();
}
/**
- * Retrieves the region height if it isn't still laid out.
+ * Retrieves the node height if it isn't still laid out.
*
- * @param region the Region of which to know the height
+ * @param node the Node of which to know the height
* @return the calculated height
*/
- public static double getNodeHeight(Region region) {
- Group group = new Group(region);
+ public static double getNodeHeight(Node node) {
+ Group group = new Group(node);
Scene scene = new Scene(group);
group.applyCss();
group.layout();
- return region.getHeight();
+
+ double height = node.prefHeight(-1);
+ group.getChildren().clear();
+ return height;
+ }
+
+ /**
+ * Retrieves the node width if it isn't still laid out.
+ *
+ * @param node the Node of which to know the width
+ * @return the calculated width
+ */
+ public static double getNodeWidth(Node node) {
+ Group group = new Group(node);
+ Scene scene = new Scene(group);
+ group.applyCss();
+ group.layout();
+
+ double width = node.prefWidth(-1);
+ group.getChildren().clear();
+ return width;
}
/**
@@ -248,13 +291,89 @@ private static void addAllDescendents(Parent parent, ArrayList nodes) {
for (Node node : parent.getChildrenUnmodifiable()) {
nodes.add(node);
if (node instanceof Parent)
- addAllDescendents((Parent)node, nodes);
+ addAllDescendents((Parent) node, nodes);
+ }
+ }
+
+ /**
+ * Convenience method to execute a given action after that the given control
+ * has been laid out and its skin is not null anymore.
+ *
+ * If the skin is not null when called, the action is executed immediately.
+ *
+ * The listener is added only if the skin is null or the addListenerIfNotNull parameter is true.
+ *
+ * @param control the control to check for skin initialization
+ * @param action the action to perform when the skin is not null
+ * @param addListenerIfNotNull to specify if the listener should be added anyway even if the scene is not null
+ * @param isOneShot to specify if the listener added to the skin property
+ * should be removed after it is not null anymore
+ */
+ public static void waitForSkin(Control control, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) {
+ if (control.getSkin() != null) {
+ action.run();
+ }
+
+ if (control.getSkin() == null || addListenerIfNotNull) {
+ control.skinProperty().addListener(new ChangeListener<>() {
+ @Override
+ public void changed(ObservableValue extends Skin>> observable, Skin> oldValue, Skin> newValue) {
+ if (newValue != null) {
+ action.run();
+ if (isOneShot) {
+ control.skinProperty().removeListener(this);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Convenience method to execute a given action after that the given control
+ * has been laid out and its scene is not null anymore.
+ *
+ * If the scene is not null when called, the action is executed immediately.
+ *
+ * The listener is added only if the scene is null or the addListenerIfNotNull parameter is true.
+ *
+ * @param control the control to check for scene initialization
+ * @param action the action to perform when the scene is not null
+ * @param addListenerIfNotNull to specify if the listener should be added anyway even if the scene is not null
+ * @param isOneShot to specify if the listener added to the scene property
+ * should be removed after it is not null anymore
+ */
+ public static void waitForScene(Control control, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) {
+ if (control.getScene() != null) {
+ action.run();
+ }
+
+ if (control.getScene() == null || addListenerIfNotNull) {
+ control.sceneProperty().addListener(new ChangeListener<>() {
+ @Override
+ public void changed(ObservableValue extends Scene> observable, Scene oldValue, Scene newValue) {
+ if (newValue != null) {
+ action.run();
+ if (isOneShot) {
+ control.sceneProperty().removeListener(this);
+ }
+ }
+ }
+ });
}
}
+ public static boolean isPseudoClassActive(Control control, PseudoClass pseudoClass) {
+ return control.getPseudoClassStates().contains(pseudoClass);
+ }
+
+ //================================================================================
+ // JavaFX private methods
+ //================================================================================
/* The following methods are copied from com.sun.javafx.scene.control.skin.Utils class
* It's a private module, so to avoid adding exports and opens I copied them
*/
+
public static double computeXOffset(double width, double contentWidth, HPos hpos) {
switch (hpos) {
case LEFT:
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NumberUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NumberUtils.java
new file mode 100644
index 00000000..aa3086ae
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/NumberUtils.java
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.utils;
+
+import io.github.palexdev.materialfx.beans.NumberRange;
+
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * Utils class for working with numbers.
+ */
+public class NumberUtils {
+
+ private NumberUtils() {
+ }
+
+ /**
+ * Limits the given value to the given min-max range by returning the nearest bound
+ * if it exceeds or val if it's in range.
+ */
+ public static double clamp(double val, double min, double max) {
+ return Math.max(min, Math.min(max, val));
+ }
+
+ /**
+ * Limits the given value to the given min-max range by returning the nearest bound
+ * if it exceeds or val if it's in range.
+ */
+ public static float clamp(float val, float min, float max) {
+ return Math.max(min, Math.min(max, val));
+ }
+
+ /**
+ * Limits the given value to the given min-max range by returning the nearest bound
+ * if it exceeds or val if it's in range.
+ */
+ public static int clamp(int val, int min, int max) {
+ return Math.max(min, Math.min(max, val));
+ }
+
+ /**
+ * Limits the given value to the given min-max range by returning the nearest bound
+ * if it exceeds or val if it's in range.
+ */
+ public static long clamp(long val, long min, long max) {
+ return Math.max(min, Math.min(max, val));
+ }
+
+ /**
+ * Given a certain value, the range of possible values, and a different range, converts the given value
+ * from its range to the given second range.
+ *
+ * For example let's say I have a value of 0 that can go from -100 to 100 and I want to convert the
+ * value to a range of 0 to 100, the converted value will be 50 (0 is at the middle in the -100-100 range, and
+ * 50 is at the middle in the 0-100 range).
+ */
+ public static double mapOneRangeToAnother(double value, NumberRange fromRange, NumberRange toRange, int decimalPrecision) {
+ double deltaA = fromRange.getMax() - fromRange.getMin();
+ double deltaB = toRange.getMax() - toRange.getMin();
+ double scale = deltaB / deltaA;
+ double negA = -1 * fromRange.getMin();
+ double offset = (negA * scale) + toRange.getMin();
+ double finalNumber = (value * scale) + offset;
+ int calcScale = (int) Math.pow(10, decimalPrecision);
+ return (double) Math.round(finalNumber * calcScale) / calcScale;
+ }
+
+ /**
+ * Given a certain value, the range of possible values, and a different range, converts the given value
+ * from its range to the given second range.
+ *
+ * For example let's say I have a value of 0 that can go from -100 to 100 and I want to convert the
+ * value to a range of 0 to 100, the converted value will be 50 (0 is at the middle in the -100-100 range, and
+ * 50 is at the middle in the 0-100 range).
+ */
+ public static float mapOneRangeToAnother(float value, NumberRange fromRange, NumberRange toRange, int decimalPrecision) {
+ double deltaA = fromRange.getMax() - fromRange.getMin();
+ double deltaB = toRange.getMax() - toRange.getMin();
+ double scale = deltaB / deltaA;
+ double negA = -1 * fromRange.getMin();
+ double offset = (negA * scale) + toRange.getMin();
+ double finalNumber = (value * scale) + offset;
+ int calcScale = (int) Math.pow(10, decimalPrecision);
+ return (float) Math.round(finalNumber * calcScale) / calcScale;
+ }
+
+ /**
+ * Given a certain value, the range of possible values, and a different range, converts the given value
+ * from its range to the given second range.
+ *
+ * For example let's say I have a value of 0 that can go from -100 to 100 and I want to convert the
+ * value to a range of 0 to 100, the converted value will be 50 (0 is at the middle in the -100-100 range, and
+ * 50 is at the middle in the 0-100 range).
+ */
+ public static int mapOneRangeToAnother(int value, NumberRange fromRange, NumberRange toRange, int decimalPrecision) {
+ double deltaA = fromRange.getMax() - fromRange.getMin();
+ double deltaB = toRange.getMax() - toRange.getMin();
+ double scale = deltaB / deltaA;
+ double negA = -1 * fromRange.getMin();
+ double offset = (negA * scale) + toRange.getMin();
+ double finalNumber = (value * scale) + offset;
+ int calcScale = (int) Math.pow(10, decimalPrecision);
+ return (int) Math.round(finalNumber * calcScale) / calcScale;
+ }
+
+ /**
+ * Given a certain value, the range of possible values, and a different range, converts the given value
+ * from its range to the given second range.
+ *
+ * For example let's say I have a value of 0 that can go from -100 to 100 and I want to convert the
+ * value to a range of 0 to 100, the converted value will be 50 (0 is at the middle in the -100-100 range, and
+ * 50 is at the middle in the 0-100 range).
+ */
+ public static long mapOneRangeToAnother(long value, NumberRange fromRange, NumberRange toRange, int decimalPrecision) {
+ double deltaA = fromRange.getMax() - fromRange.getMin();
+ double deltaB = toRange.getMax() - toRange.getMin();
+ double scale = deltaB / deltaA;
+ double negA = -1 * fromRange.getMin();
+ double offset = (negA * scale) + toRange.getMin();
+ double finalNumber = (value * scale) + offset;
+ int calcScale = (int) Math.pow(10, decimalPrecision);
+ return Math.round(finalNumber * calcScale) / calcScale;
+ }
+
+ /**
+ * Given a certain value, finds the closest value in the given numbers list.
+ */
+ public static double closestValueTo(double val, List list) {
+ if (list.isEmpty()) {
+ return 0.0;
+ }
+
+ double res = list.get(0);
+ for (int i = 1; i < list.size(); i++) {
+ if (Math.abs(val - res) >
+ Math.abs(val - list.get(i))) {
+ res = list.get(i);
+ }
+ }
+
+ return res;
+ }
+
+ /**
+ * Given a certain value, finds the closest value in the given numbers list.
+ */
+ public static float closestValueTo(float val, List list) {
+ if (list.isEmpty()) {
+ return 0;
+ }
+
+ float res = list.get(0);
+ for (int i = 1; i < list.size(); i++) {
+ if (Math.abs(val - res) >
+ Math.abs(val - list.get(i))) {
+ res = list.get(i);
+ }
+ }
+
+ return res;
+ }
+
+ /**
+ * Given a certain value, finds the closest value in the given numbers list.
+ */
+ public static int closestValueTo(int val, List list) {
+ if (list.isEmpty()) {
+ return 0;
+ }
+
+ int res = list.get(0);
+ for (int i = 1; i < list.size(); i++) {
+ if (Math.abs(val - res) >
+ Math.abs(val - list.get(i))) {
+ res = list.get(i);
+ }
+ }
+
+ return res;
+ }
+
+ /**
+ * Given a certain value, finds the closest value in the given numbers list.
+ */
+ public static long closestValueTo(long val, List list) {
+ if (list.isEmpty()) {
+ return 0;
+ }
+
+ long res = list.get(0);
+ for (int i = 1; i < list.size(); i++) {
+ if (Math.abs(val - res) >
+ Math.abs(val - list.get(i))) {
+ res = list.get(i);
+ }
+ }
+
+ return res;
+ }
+
+ /**
+ * Formats the given double value to have the given number of decimal places.
+ */
+ public static double formatTo(double value, int decimalPrecision) {
+ int calcScale = (int) Math.pow(10, decimalPrecision);
+ return (double) Math.round(value * calcScale) / calcScale;
+ }
+
+ /**
+ * Returns the given value as a string the the specified number of decimal places.
+ */
+ public static String formatToString(double value, int decimalPrecision) {
+ return String.format("%." + decimalPrecision + "f", value);
+ }
+
+ /**
+ * Returns a random double between the specified min-max range.
+ *
+ * Uses {@link ThreadLocalRandom#nextDouble(double, double)}.
+ */
+ public static double getRandomDoubleBetween(double min, double max) {
+ return ThreadLocalRandom.current().nextDouble(min, max);
+ }
+
+ /**
+ * Returns a random float value between 0 and 1.
+ *
+ * Uses {@link ThreadLocalRandom#nextFloat()}
+ */
+ public static float getRandomFloat() {
+ return ThreadLocalRandom.current().nextFloat();
+ }
+
+ /**
+ * Returns a random int value between the specified min-max range.
+ *
+ * Uses {@link ThreadLocalRandom#nextInt(int, int)}.
+ */
+ public static int getRandomIntBetween(int min, int max) {
+ return ThreadLocalRandom.current().nextInt(min, max);
+ }
+
+ /**
+ * Returns a random long value between the specified min-max range.
+ *
+ * Uses {@link ThreadLocalRandom#nextLong(long, long)}.
+ */
+ public static long getRandomLongBetween(long min, long max) {
+ return ThreadLocalRandom.current().nextLong(min, max);
+ }
+
+ /**
+ * Checks if the given number is even or odd, just a convenience method for aesthetic.
+ */
+ public static boolean isEven(int number) {
+ return (number % 2 == 0);
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ScrollUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ScrollUtils.java
new file mode 100644
index 00000000..afe8f198
--- /dev/null
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ScrollUtils.java
@@ -0,0 +1,361 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+package io.github.palexdev.materialfx.utils;
+
+import io.github.palexdev.materialfx.controls.base.AbstractMFXFlowlessListView;
+import io.github.palexdev.materialfx.controls.factories.MFXAnimationFactory;
+import io.github.palexdev.materialfx.controls.flowless.VirtualFlow;
+import javafx.animation.Animation;
+import javafx.animation.Animation.Status;
+import javafx.animation.KeyFrame;
+import javafx.animation.Timeline;
+import javafx.event.EventHandler;
+import javafx.geometry.Bounds;
+import javafx.scene.control.Control;
+import javafx.scene.control.ScrollBar;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.input.ScrollEvent;
+import javafx.util.Duration;
+import org.reactfx.value.Var;
+
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * Utility class for ScrollPanes and MFXFlowlessListViews.
+ */
+public class ScrollUtils {
+
+ public enum ScrollDirection {
+ UP(-1), RIGHT(-1), DOWN(1), LEFT(1);
+
+ final int intDirection;
+
+ ScrollDirection(int intDirection) {
+ this.intDirection = intDirection;
+ }
+ }
+
+ private ScrollUtils() {
+ }
+
+ /**
+ * Determines if the given ScrollEvent comes from a trackpad.
+ *
+ * Although this method works in most cases, it is not very accurate.
+ * Since in JavaFX there's no way to tell if a ScrollEvent comes from a trackpad or a mouse
+ * we use this trick: I noticed that a mouse scroll has a delta of 32 (don't know if it changes depending on the device or OS)
+ * and trackpad scrolls have a way smaller delta. So depending on the scroll direction we check if the delta is lesser than 10
+ * (trackpad event) or greater(mouse event).
+ *
+ * @see ScrollEvent#getDeltaX()
+ * @see ScrollEvent#getDeltaY()
+ */
+ public static boolean isTrackPad(ScrollEvent event, ScrollDirection scrollDirection) {
+ switch (scrollDirection) {
+ case UP:
+ case DOWN:
+ return Math.abs(event.getDeltaY()) < 10;
+ case LEFT:
+ case RIGHT:
+ return Math.abs(event.getDeltaX()) < 10;
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Determines the scroll direction of the given ScrollEvent.
+ *
+ * Although this method works fine, it is not very accurate.
+ * In JavaFX there's no concept of scroll direction, if you try to scroll with a trackpad
+ * you'll notice that you can scroll in both directions at the same time, both deltaX and deltaY won't be 0.
+ *
+ * For this method to work we assume that this behavior is not possible.
+ *
+ * If deltaY is 0 we return LEFT or RIGHT depending on deltaX (respectively if lesser or greater than 0).
+ *
+ * Else we return DOWN or UP depending on deltaY (respectively if lesser or greater than 0).
+ *
+ * @see ScrollEvent#getDeltaX()
+ * @see ScrollEvent#getDeltaY()
+ */
+ public static ScrollDirection determineScrollDirection(ScrollEvent event) {
+ double deltaX = event.getDeltaX();
+ double deltaY = event.getDeltaY();
+
+ if (deltaY == 0.0) {
+ return deltaX < 0 ? ScrollDirection.LEFT : ScrollDirection.RIGHT;
+ } else {
+ return deltaY < 0 ? ScrollDirection.DOWN : ScrollDirection.UP;
+ }
+ }
+
+ //================================================================================
+ // ScrollPanes
+ //================================================================================
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane,
+ * calls {@link #addSmoothScrolling(ScrollPane, double)} with a
+ * default speed value of 1.
+ */
+ public static void addSmoothScrolling(ScrollPane scrollPane) {
+ addSmoothScrolling(scrollPane, 1);
+ }
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane with the given scroll speed.
+ * Calls {@link #addSmoothScrolling(ScrollPane, double, double)}
+ * with a default trackPadAdjustment of 7.
+ */
+ public static void addSmoothScrolling(ScrollPane scrollPane, double speed) {
+ addSmoothScrolling(scrollPane, speed, 7);
+ }
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane with the given
+ * scroll speed and the given trackPadAdjustment.
+ *
+ * The trackPadAdjustment is a value used to slow down the scrolling if a trackpad is used.
+ * This is kind of a workaround and it's not perfect, but at least it's way better than before.
+ * The default value is 7, tested up to 10, further values can cause scrolling misbehavior.
+ */
+ public static void addSmoothScrolling(ScrollPane scrollPane, double speed, double trackPadAdjustment) {
+ smoothScroll(scrollPane, speed, trackPadAdjustment);
+ }
+
+ private static void smoothScroll(ScrollPane scrollPane, double speed, double trackPadAdjustment) {
+ final double[] frictions = {0.99, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.04, 0.01, 0.008, 0.008, 0.008, 0.008, 0.0006, 0.0005, 0.00003, 0.00001};
+ final double[] derivatives = new double[frictions.length];
+ AtomicReference atomicSpeed = new AtomicReference<>(speed);
+
+ Timeline timeline = new Timeline();
+ AtomicReference scrollDirection = new AtomicReference<>();
+ final EventHandler mouseHandler = event -> timeline.stop();
+ final EventHandler scrollHandler = event -> {
+ if (event.getEventType() == ScrollEvent.SCROLL) {
+ scrollDirection.set(determineScrollDirection(event));
+ if (isTrackPad(event, scrollDirection.get())) {
+ atomicSpeed.set(speed / trackPadAdjustment);
+ } else {
+ atomicSpeed.set(speed);
+ }
+ derivatives[0] += scrollDirection.get().intDirection * atomicSpeed.get();
+ if (timeline.getStatus() == Status.STOPPED) {
+ timeline.play();
+ }
+ event.consume();
+ }
+ };
+ if (scrollPane.getContent().getParent() != null) {
+ scrollPane.getContent().getParent().addEventHandler(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ scrollPane.getContent().getParent().addEventHandler(ScrollEvent.ANY, scrollHandler);
+ }
+ scrollPane.getContent().parentProperty().addListener((observable, oldValue, newValue) -> {
+ if (oldValue != null) {
+ oldValue.removeEventHandler(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ oldValue.removeEventHandler(ScrollEvent.ANY, scrollHandler);
+ }
+ if (newValue != null) {
+ newValue.addEventHandler(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ newValue.addEventHandler(ScrollEvent.ANY, scrollHandler);
+ }
+ });
+
+ timeline.getKeyFrames().add(new KeyFrame(Duration.millis(3), event -> {
+ for (int i = 0; i < derivatives.length; i++) {
+ derivatives[i] *= frictions[i];
+ }
+ for (int i = 1; i < derivatives.length; i++) {
+ derivatives[i] += derivatives[i - 1];
+ }
+
+ double dy = derivatives[derivatives.length - 1];
+ Function sizeFunction = (scrollDirection.get() == ScrollDirection.UP || scrollDirection.get() == ScrollDirection.DOWN) ? Bounds::getHeight : Bounds::getWidth;
+ double size = sizeFunction.apply(scrollPane.getContent().getLayoutBounds());
+ double value;
+ switch (scrollDirection.get()) {
+ case LEFT:
+ case RIGHT:
+ value = Math.min(Math.max(scrollPane.hvalueProperty().get() + dy / size, 0), 1);
+ scrollPane.hvalueProperty().set(value);
+ break;
+ case UP:
+ case DOWN:
+ value = Math.min(Math.max(scrollPane.vvalueProperty().get() + dy / size, 0), 1);
+ scrollPane.vvalueProperty().set(value);
+ break;
+ }
+
+ if (Math.abs(dy) < 0.001) {
+ timeline.stop();
+ }
+ }));
+ timeline.setCycleCount(Animation.INDEFINITE);
+ }
+
+ /**
+ * Adds a fade in and out effect to the given scroll pane's scroll bars,
+ * calls {@link #animateScrollBars(ScrollPane, double)} with a
+ * default fadeSpeedMillis value of 500.
+ */
+ public static void animateScrollBars(ScrollPane scrollPane) {
+ animateScrollBars(scrollPane, 500);
+ }
+
+ /**
+ * Adds a fade in and out effect to the given scroll pane's scroll bars,
+ * calls {@link #animateScrollBars(ScrollPane, double, double)} with a
+ * default fadeSpeedMillis value of 500 and a default hideAfterMillis value of 800.
+ */
+ public static void animateScrollBars(ScrollPane scrollPane, double fadeSpeedMillis) {
+ animateScrollBars(scrollPane, fadeSpeedMillis, 800);
+ }
+
+ /**
+ * Adds a fade in and out effect to the given scroll pane's scroll bars
+ * with the given fadeSpeedMillis and hideAfterMillis values.
+ *
+ * @see NodeUtils#waitForSkin(Control, Runnable, boolean, boolean)
+ */
+ public static void animateScrollBars(ScrollPane scrollPane, double fadeSpeedMillis, double hideAfterMillis) {
+ NodeUtils.waitForSkin(scrollPane, () -> {
+ Set scrollBars = scrollPane.lookupAll(".scroll-bar").stream()
+ .filter(node -> node instanceof ScrollBar)
+ .map(node -> (ScrollBar) node)
+ .collect(Collectors.toSet());
+ scrollBars.forEach(scrollBar -> {
+ scrollBar.setOpacity(0.0);
+ scrollPane.hoverProperty().addListener((observable, oldValue, newValue) -> {
+ if (!scrollBar.isVisible()) {
+ return;
+ }
+
+ if (newValue) {
+ MFXAnimationFactory.FADE_IN.build(scrollBar, fadeSpeedMillis).play();
+ } else {
+ AnimationUtils.PauseBuilder.build()
+ .setDuration(hideAfterMillis)
+ .setOnFinished(event -> MFXAnimationFactory.FADE_OUT.build(scrollBar, fadeSpeedMillis).play())
+ .getAnimation()
+ .play();
+ }
+ });
+ });
+ }, true, true);
+ }
+
+ //================================================================================
+ // ListViews
+ //================================================================================
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane,
+ * calls {@link #addSmoothScrolling(ScrollPane, double)} with a
+ * default speed value of 1.
+ */
+ public static void addSmoothScrolling(AbstractMFXFlowlessListView, ?, ?> listView) {
+ addSmoothScrolling(listView, 1);
+ }
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane with the given scroll speed.
+ * Calls {@link #addSmoothScrolling(ScrollPane, double, double)}
+ * with a default trackPadAdjustment of 7.
+ */
+ public static void addSmoothScrolling(AbstractMFXFlowlessListView, ?, ?> listView, double speed) {
+ addSmoothScrolling(listView, speed, 7);
+ }
+
+ /**
+ * Adds a smooth scrolling effect to the given scroll pane with the given
+ * scroll speed and the given trackPadAdjustment.
+ *
+ * The trackPadAdjustment is a value used to slow down the scrolling if a trackpad is used.
+ * This is kind of a workaround and it's not perfect, but at least it's way better than before.
+ * The default value is 7, tested up to 10, further values can cause scrolling misbehavior.
+ */
+ public static void addSmoothScrolling(AbstractMFXFlowlessListView, ?, ?> listView, double speed, double trackPadAdjustment) {
+ NodeUtils.waitForSkin(listView, () -> {
+ VirtualFlow, ?> flow = (VirtualFlow, ?>) listView.lookup(".virtual-flow");
+ smoothScroll(flow, speed, trackPadAdjustment);
+ }, true, true);
+ }
+
+ private static void smoothScroll(VirtualFlow, ?> flow, double speed, double trackPadAdjustment) {
+ final double[] frictions = {0.99, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.04, 0.01, 0.008, 0.008, 0.008, 0.008, 0.0006, 0.0005, 0.00003, 0.00001};
+ final double[] derivatives = new double[frictions.length];
+ AtomicReference atomicSpeed = new AtomicReference<>(speed);
+
+ Timeline timeline = new Timeline();
+ AtomicReference scrollDirection = new AtomicReference<>();
+ final EventHandler mouseHandler = event -> timeline.stop();
+ final EventHandler scrollHandler = event -> {
+ if (event.getEventType() == ScrollEvent.SCROLL) {
+ scrollDirection.set(determineScrollDirection(event));
+ if (isTrackPad(event, scrollDirection.get())) {
+ atomicSpeed.set(speed / trackPadAdjustment);
+ } else {
+ atomicSpeed.set(speed);
+ }
+ derivatives[0] += scrollDirection.get().intDirection * atomicSpeed.get();
+ if (timeline.getStatus() == Animation.Status.STOPPED) {
+ timeline.play();
+ }
+ event.consume();
+ }
+ };
+
+ if (flow.getParent() != null) {
+ flow.getParent().addEventFilter(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ }
+ flow.parentProperty().addListener((observable, oldValue, newValue) -> {
+ if (oldValue != null) {
+ oldValue.removeEventFilter(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ }
+ if (newValue != null) {
+ newValue.addEventFilter(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ }
+ });
+ flow.addEventFilter(MouseEvent.MOUSE_PRESSED, mouseHandler);
+ flow.addEventFilter(ScrollEvent.ANY, scrollHandler);
+
+ timeline.getKeyFrames().add(new KeyFrame(Duration.millis(3), (event) -> {
+ for (int i = 0; i < derivatives.length; i++) {
+ derivatives[i] *= frictions[i];
+ }
+ for (int i = 1; i < derivatives.length; i++) {
+ derivatives[i] += derivatives[i - 1];
+ }
+
+ double dy = derivatives[derivatives.length - 1];
+ Var scrollVar = (scrollDirection.get() == ScrollDirection.UP || scrollDirection.get() == ScrollDirection.DOWN) ? flow.estimatedScrollYProperty() : flow.estimatedScrollXProperty();
+ scrollVar.setValue(scrollVar.getValue() + dy);
+
+ if (Math.abs(dy) < 0.001) {
+ timeline.stop();
+ }
+ }));
+ timeline.setCycleCount(Animation.INDEFINITE);
+ }
+}
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/StringUtils.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/StringUtils.java
index f6c429b7..f297a847 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/StringUtils.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/StringUtils.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleButtonsUtil.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleButtonsUtil.java
index 3d2bc637..595abcae 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleButtonsUtil.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleButtonsUtil.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemIterator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemIterator.java
index fb6354fa..d739998e 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemIterator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemIterator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemStream.java b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemStream.java
index ee8063f2..211461f1 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemStream.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/utils/TreeItemStream.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.utils;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXDialogValidator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXDialogValidator.java
index b35c39a2..d6f7e06f 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXDialogValidator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXDialogValidator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.validation;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXPriorityValidator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXPriorityValidator.java
index 5f111ad5..4d415f60 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXPriorityValidator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/MFXPriorityValidator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.validation;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/AbstractMFXValidator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/AbstractMFXValidator.java
index 340e80a3..e57e7263 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/AbstractMFXValidator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/AbstractMFXValidator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.validation.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/IMFXValidator.java b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/IMFXValidator.java
index 83984cc4..a9ba6514 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/IMFXValidator.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/IMFXValidator.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.validation.base;
diff --git a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/Validated.java b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/Validated.java
index c08c7795..c59a0268 100644
--- a/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/Validated.java
+++ b/materialfx/src/main/java/io/github/palexdev/materialfx/validation/base/Validated.java
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
package io.github.palexdev.materialfx.validation.base;
diff --git a/materialfx/src/main/java/module-info.java b/materialfx/src/main/java/module-info.java
index b8bb783d..232af58e 100644
--- a/materialfx/src/main/java/module-info.java
+++ b/materialfx/src/main/java/module-info.java
@@ -9,6 +9,8 @@
exports io.github.palexdev.materialfx;
exports io.github.palexdev.materialfx.beans;
exports io.github.palexdev.materialfx.beans.binding;
+ exports io.github.palexdev.materialfx.beans.properties;
+ exports io.github.palexdev.materialfx.beans.properties.base;
exports io.github.palexdev.materialfx.collections;
exports io.github.palexdev.materialfx.controls;
exports io.github.palexdev.materialfx.controls.base;
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/Fonts.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/Fonts.css
index b5b4bd42..21332f8d 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/Fonts.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/Fonts.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@font-face {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXButton.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXButton.css
index ee37c325..34d299a0 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXButton.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXButton.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-button:armed,
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckBox.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckBox.css
index a2ba95d9..e3ccf35a 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckBox.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckBox.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
/*================================================================================*/
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckTreeCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckTreeCell.css
index 0f349903..854f1dcb 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckTreeCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCheckTreeCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "MFXTreeCell.css";
\ No newline at end of file
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCircleToggleNode.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCircleToggleNode.css
index 1c60838f..f48fb74f 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCircleToggleNode.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXCircleToggleNode.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXColors.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXColors.css
index 5ae8133e..6afd20c0 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXColors.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXColors.css
@@ -1,23 +1,25 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
* {
+ -mfx-blue: #2196f3;
-mfx-charcoal: #445055;
- -mfx-red: #EF6E6B;
+ -mfx-green: #4caf50;
-mfx-purple: #673AB7;
+ -mfx-red: #EF6E6B;
}
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle1.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle1.css
index ccf08a3a..9b4f1234 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle1.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle1.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle2.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle2.css
index 14dcabad..df34fdbb 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle2.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle2.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle3.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle3.css
index 8a0de593..8b1387e7 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle3.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXComboBoxStyle3.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenu.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenu.css
index ad078468..93097d5b 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenu.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenu.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-context-menu {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenuItem.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenuItem.css
index 4004748c..30c5b3de 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenuItem.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXContextMenuItem.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-context-menu-item {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePicker.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePicker.css
index 3eabc4ba..bd636a53 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePicker.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePicker.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.value {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePickerContent.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePickerContent.css
index 648e8583..e266933a 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePickerContent.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDatePickerContent.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDialog.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDialog.css
index 29136d30..d2aa6e2d 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDialog.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXDialog.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXEvaluationBox.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXEvaluationBox.css
index 78690611..19bc5776 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXEvaluationBox.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXEvaluationBox.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-evaluation-box {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterComboBox.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterComboBox.css
index 4bd6e5ea..bf50a95d 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterComboBox.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterComboBox.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "MFXComboBoxStyle3.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterDialog.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterDialog.css
index e7efd65f..1716da66 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterDialog.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFilterDialog.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-filter-dialog {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListCell.css
index b8578fbe..8e5a151c 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-check-list-cell {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListView.css
index 74d9f9ce..e46c5a51 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessCheckListView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-check-list-view {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListCell.css
index 6958be98..55a1a9a4 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-list-cell {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListView.css
index a19e56a3..7eed2721 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXFlowlessListView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-list-view {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle1.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle1.css
index b67f484b..7e5a3df4 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle1.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle1.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle2.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle2.css
index 5a59506d..7c693fad 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle2.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle2.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle3.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle3.css
index 482b4611..d552bf0e 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle3.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXLabelStyle3.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-label {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListCell.css
index 7af7a0cd..5e4e817b 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-list-cell {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListView.css
index 7583a8f4..1b4bb1f0 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXListView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
/* Base */
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXNotification.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXNotification.css
index a0489aac..8c020f00 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXNotification.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXNotification.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-notification {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXPasswordField.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXPasswordField.css
index 3940da73..0fe791f4 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXPasswordField.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXPasswordField.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "MFXTextField.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressBar.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressBar.css
index 19e793d0..d7afa082 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressBar.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressBar.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-progress-bar .track {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressSpinner.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressSpinner.css
index adda4c05..cf4fc2c9 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressSpinner.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXProgressSpinner.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-progress-spinner:determinate .arc {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRadioButton.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRadioButton.css
index 2c0dc06e..fb99c998 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRadioButton.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRadioButton.css
@@ -1,18 +1,18 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleRoggleNode.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleToggleNode.css
similarity index 57%
rename from materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleRoggleNode.css
rename to materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleToggleNode.css
index 47318b8f..ab55272a 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleRoggleNode.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXRectangleToggleNode.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXScrollPane.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXScrollPane.css
index 57c4b11f..5651b210 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXScrollPane.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXScrollPane.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-scroll-pane {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXSlider.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXSlider.css
new file mode 100644
index 00000000..c5878b04
--- /dev/null
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXSlider.css
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
+ */
+
+@import "Fonts.css";
+
+/* COLORS */
+.mfx-slider {
+ -mfx-main-color: rgb(98, 0, 238);
+ -mfx-main-color-hover: rgba(98, 0, 238, 0.1);
+ -mfx-main-color-pressed: rgba(98, 0, 238, 0.3);
+ -mfx-disabled-color: rgb(158, 158, 158);
+}
+
+/* MAIN STYLING */
+.mfx-slider .track,
+.mfx-slider .bar {
+ -fx-arc-height: 6;
+ -fx-arc-width: 6;
+}
+
+.mfx-slider .track {
+ -fx-fill: derive(-mfx-main-color, 140%);
+}
+
+.mfx-slider .bar {
+ -fx-fill: -mfx-main-color;
+}
+
+.mfx-slider .thumb-container .thumb {
+ -mfx-color: -mfx-main-color;
+}
+
+.mfx-slider .thumb-container .thumb-radius {
+ -mfx-color: transparent;
+}
+
+.mfx-slider .thumb-container:hover .thumb-radius {
+ -mfx-color: -mfx-main-color-hover;
+}
+
+.mfx-slider .thumb-container:pressed .thumb-radius {
+ -mfx-color: -mfx-main-color-pressed;
+}
+
+.mfx-slider .thumb-container .mfx-ripple-generator {
+ -mfx-ripple-color: -mfx-main-color;
+}
+
+/* TICKS STYLING */
+.mfx-slider .tick-even,
+.mfx-slider .tick-odd {
+ -mfx-color: derive(-mfx-main-color, 30%);
+}
+
+.mfx-slider .axis-minor-tick-mark {
+ -fx-stroke: -mfx-main-color-hover;
+}
+
+/* POPUP */
+#popupContent {
+ -fx-background-color: #6E6E6E;
+ -fx-background-radius: 6;
+}
+
+#popupText {
+ -fx-font-family: "Open Sans SemiBold";
+ -fx-font-size: 13;
+ -fx-text-fill: white;
+}
+
+#popupCaret {
+ -mfx-color: #6E6E6E;
+}
+
+/* DISABLED */
+.mfx-slider:disabled .bar,
+.mfx-slider:disabled .tick-even,
+.mfx-slider:disabled .tick-odd,
+.mfx-slider:disabled .thumb-container .thumb {
+ -mfx-color: -mfx-disabled-color;
+ -fx-fill: -mfx-disabled-color;
+}
+
+.mfx-slider:disabled .track {
+ -fx-fill: derive(-mfx-disabled-color, 75%);
+}
+
+.mfx-slider:disabled .axis-minor-tick-mark {
+ -fx-stroke: derive(-mfx-disabled-color, 60%)
+}
\ No newline at end of file
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepper.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepper.css
index 71ff480a..43e23138 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepper.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepper.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepperToggle.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepperToggle.css
index 3182e223..e6722cdb 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepperToggle.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXStepperToggle.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "Fonts.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableColumn.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableColumn.css
index 1be460a4..1f051b90 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableColumn.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableColumn.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-table-column {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRow.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRow.css
index 1e163c84..0daab810 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRow.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRow.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-table-row {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRowCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRowCell.css
index 63bb4cc3..ac175597 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRowCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableRowCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "MFXLabelStyle2.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableView.css
index 11890337..31eae09b 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTableView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-table-view {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTextField.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTextField.css
index 9e4298ce..f32fca92 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTextField.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTextField.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-text-field {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXToggleButton.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXToggleButton.css
index e25ed133..35f00501 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXToggleButton.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXToggleButton.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-toggle-button,
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeCell.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeCell.css
index 0bfaa71e..6098c242 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeCell.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeCell.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-tree-cell {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeItem.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeItem.css
index 5ba8e969..2407c1c8 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeItem.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeItem.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
/* This insets value is needed for fixing a strange layout issue
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeView.css
index ce2aaefa..1bd907e7 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTreeView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
@import "MFXScrollPane.css";
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXComboBox.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXComboBox.css
index 227d096a..ea40c4eb 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXComboBox.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXComboBox.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-legacy-combo-box {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableRow.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableRow.css
index 80f81654..b1e872ef 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableRow.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableRow.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
.mfx-legacy-table-row {
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableView.css b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableView.css
index 647cc5d8..dbf92adf 100644
--- a/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableView.css
+++ b/materialfx/src/main/resources/io/github/palexdev/materialfx/css/legacy/MFXTableView.css
@@ -1,19 +1,19 @@
/*
- * Copyright (C) 2021 Parisi Alessandro
- * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ * Copyright (C) 2021 Parisi Alessandro
+ * This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
*
- * MaterialFX is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * MaterialFX is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * MaterialFX is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MaterialFX is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with MaterialFX. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with MaterialFX. If not, see .
*/
/* Base */
diff --git a/materialfx/src/main/resources/io/github/palexdev/materialfx/fonts/MFXResources.ttf b/materialfx/src/main/resources/io/github/palexdev/materialfx/fonts/MFXResources.ttf
index b3e76e86..47a41873 100644
Binary files a/materialfx/src/main/resources/io/github/palexdev/materialfx/fonts/MFXResources.ttf and b/materialfx/src/main/resources/io/github/palexdev/materialfx/fonts/MFXResources.ttf differ