Fix IDE code inspection warnings
This commit is contained in:
parent
deae198ae0
commit
9652c9a7ce
@ -9,7 +9,6 @@ import javafx.animation.Animation;
|
||||
import javafx.animation.Interpolator;
|
||||
import javafx.animation.RotateTransition;
|
||||
import javafx.beans.property.DoubleProperty;
|
||||
import javafx.beans.value.WritableValue;
|
||||
import javafx.css.CssMetaData;
|
||||
import javafx.css.Styleable;
|
||||
import javafx.css.StyleableDoubleProperty;
|
||||
|
@ -118,7 +118,7 @@ public final class Styles {
|
||||
throw new NullPointerException("PseudoClass cannot be null!");
|
||||
}
|
||||
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
if (excludes != null) {
|
||||
for (PseudoClass exclude : excludes) {
|
||||
node.pseudoClassStateChanged(exclude, false);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ public class DatePickerPage extends AbstractPage {
|
||||
@Override
|
||||
public void updateItem(LocalDate date, boolean empty) {
|
||||
super.updateItem(date, empty);
|
||||
setDisable(empty || date.compareTo(TODAY) < 0);
|
||||
setDisable(empty || date.isBefore(TODAY));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ public class TablePage extends AbstractPage {
|
||||
final var resizePolicyCaption = new CaptionMenuItem("Resize Policy");
|
||||
final var resizePolicyGroup = new ToggleGroup();
|
||||
resizePolicyGroup.selectedToggleProperty().addListener((obs, old, val) -> {
|
||||
if (val != null && val.getUserData() instanceof Callback policy) {
|
||||
if (val != null && val.getUserData() instanceof Callback<?, ?> policy) {
|
||||
//noinspection rawtypes,unchecked
|
||||
table.setColumnResizePolicy((Callback<TableView.ResizeFeatures, Boolean>) policy);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ public class TreeTablePage extends AbstractPage {
|
||||
final var resizePolicyCaption = new CaptionMenuItem("Resize Policy");
|
||||
final var resizePolicyGroup = new ToggleGroup();
|
||||
resizePolicyGroup.selectedToggleProperty().addListener((obs, old, val) -> {
|
||||
if (val != null && val.getUserData() instanceof Callback policy) {
|
||||
if (val != null && val.getUserData() instanceof Callback<?, ?> policy) {
|
||||
//noinspection rawtypes,unchecked
|
||||
treeTable.setColumnResizePolicy((Callback<TreeTableView.ResizeFeatures, Boolean>) policy);
|
||||
}
|
||||
|
@ -96,10 +96,10 @@ public class WidgetCollectionPage extends BorderPane implements Page {
|
||||
|
||||
@SuppressWarnings("ImmutableEnumChecker")
|
||||
public enum Example {
|
||||
CARD("Card", () -> new CardSample()),
|
||||
MESSAGE("Message", () -> new MessageSample()),
|
||||
STEPPER("Stepper", () -> new StepperSample()),
|
||||
TAG("Tag", () -> new TagSample());
|
||||
CARD("Card", CardSample::new),
|
||||
MESSAGE("Message", MessageSample::new),
|
||||
STEPPER("Stepper", StepperSample::new),
|
||||
TAG("Tag", TagSample::new);
|
||||
|
||||
private final String name;
|
||||
private final Supplier<Pane> supplier;
|
||||
|
Loading…
Reference in New Issue
Block a user