diff --git a/base/src/main/java/atlantafx/base/controls/ModalPane.java b/base/src/main/java/atlantafx/base/controls/ModalPane.java index ecc2bf7..59da403 100755 --- a/base/src/main/java/atlantafx/base/controls/ModalPane.java +++ b/base/src/main/java/atlantafx/base/controls/ModalPane.java @@ -70,7 +70,7 @@ public class ModalPane extends Control { // Properties // /////////////////////////////////////////////////////////////////////////// - protected ObjectProperty content = new SimpleObjectProperty<>(this, "content", null); + protected final ObjectProperty content = new SimpleObjectProperty<>(this, "content", null); public Node getContent() { return content.get(); @@ -89,7 +89,7 @@ public class ModalPane extends Control { // ~ - protected BooleanProperty display = new SimpleBooleanProperty(this, "display", false); + protected final BooleanProperty display = new SimpleBooleanProperty(this, "display", false); public boolean isDisplay() { return display.get(); @@ -109,7 +109,7 @@ public class ModalPane extends Control { // ~ - protected ObjectProperty alignment = new SimpleObjectProperty<>(this, "alignment", Pos.CENTER); + protected final ObjectProperty alignment = new SimpleObjectProperty<>(this, "alignment", Pos.CENTER); public Pos getAlignment() { return alignment.get(); @@ -128,7 +128,7 @@ public class ModalPane extends Control { // ~ - protected ObjectProperty> inTransitionFactory = new SimpleObjectProperty<>( + protected final ObjectProperty> inTransitionFactory = new SimpleObjectProperty<>( this, "inTransitionFactory", node -> Animations.zoomIn(node, DEFAULT_DURATION_IN) ); @@ -150,7 +150,7 @@ public class ModalPane extends Control { // ~ - protected ObjectProperty> outTransitionFactory = new SimpleObjectProperty<>( + protected final ObjectProperty> outTransitionFactory = new SimpleObjectProperty<>( this, "outTransitionFactory", node -> Animations.zoomOut(node, DEFAULT_DURATION_OUT) ); @@ -172,7 +172,7 @@ public class ModalPane extends Control { // ~ - protected BooleanProperty persistent = new SimpleBooleanProperty(this, "persistent", false); + protected final BooleanProperty persistent = new SimpleBooleanProperty(this, "persistent", false); public boolean getPersistent() { return persistent.get(); diff --git a/base/src/main/java/atlantafx/base/controls/Tile.java b/base/src/main/java/atlantafx/base/controls/Tile.java index 0330d52..7621779 100644 --- a/base/src/main/java/atlantafx/base/controls/Tile.java +++ b/base/src/main/java/atlantafx/base/controls/Tile.java @@ -23,16 +23,16 @@ public class Tile extends Control { } public Tile(@NamedArg("title") String title, - @NamedArg("subtitle") String subtitle) { - this(title, subtitle, null); + @NamedArg("subTitle") String subTitle) { + this(title, subTitle, null); } public Tile(@NamedArg("title") String title, - @NamedArg("subtitle") String subtitle, + @NamedArg("subTitle") String subTitle, @NamedArg("graphic") Node graphic) { super(); setTitle(title); - setSubTitle(subtitle); + setSubTitle(subTitle); setGraphic(graphic); } diff --git a/base/src/main/java/atlantafx/base/controls/ToggleSwitch.java b/base/src/main/java/atlantafx/base/controls/ToggleSwitch.java index d245860..33b8fa5 100755 --- a/base/src/main/java/atlantafx/base/controls/ToggleSwitch.java +++ b/base/src/main/java/atlantafx/base/controls/ToggleSwitch.java @@ -85,10 +85,12 @@ public class ToggleSwitch extends Labeled implements Toggle { private BooleanProperty selected; + @Override public final void setSelected(boolean value) { selectedProperty().set(value); } + @Override public final boolean isSelected() { return selected != null && selected.get(); } @@ -96,6 +98,7 @@ public class ToggleSwitch extends Labeled implements Toggle { /** * Returns whether this Toggle Switch is selected. */ + @Override public final BooleanProperty selectedProperty() { if (selected == null) { selected = new BooleanPropertyBase() { @@ -121,7 +124,7 @@ public class ToggleSwitch extends Labeled implements Toggle { // "!tg.getSelectedToggle().isSelected()" // looks like absurd and should always return false. if (!tg.getSelectedToggle().isSelected()) { - for (Toggle toggle: tg.getToggles()) { + for (Toggle toggle : tg.getToggles()) { if (toggle.isSelected()) { return; } diff --git a/base/src/main/java/atlantafx/base/layout/DeckPane.java b/base/src/main/java/atlantafx/base/layout/DeckPane.java index 3091059..7d04a6f 100644 --- a/base/src/main/java/atlantafx/base/layout/DeckPane.java +++ b/base/src/main/java/atlantafx/base/layout/DeckPane.java @@ -22,7 +22,7 @@ import javafx.util.Duration; import org.jetbrains.annotations.Nullable; /** - *

DeckPane represents a pane that displays all of its child nodes in a deck, + * DeckPane represents a pane that displays all of its child nodes in a deck, * where only one node can be visible at a time. It does not maintain any sequence * (model), but only cares about the top node, which can be changed by various * transition effects.

@@ -32,12 +32,12 @@ import org.jetbrains.annotations.Nullable; *

DeckPane manages {@link Node#viewOrderProperty()} of its children. Topmost * visible node always has a higher view order value, while the rest of the nodes * have the default value, which is zero. Following that logic, one must not set - * child nodes view order manually, because it will break the contract.

+ * child nodes view order manually, because it will break the contract. * *

If all child nodes have the same view order value (default state after creating * a new DeckPane), they are displayed in order specified by the root container, which * is {@link AnchorPane}. When a node is removed from the pane, its view order is - * restored automatically.

+ * restored automatically. */ public class DeckPane extends AnchorPane { diff --git a/base/src/main/java/atlantafx/base/theme/CupertinoDark.java b/base/src/main/java/atlantafx/base/theme/CupertinoDark.java index 64fe63e..44f9c0d 100644 --- a/base/src/main/java/atlantafx/base/theme/CupertinoDark.java +++ b/base/src/main/java/atlantafx/base/theme/CupertinoDark.java @@ -3,7 +3,6 @@ package atlantafx.base.theme; import atlantafx.base.Preview; -import org.jetbrains.annotations.Nullable; /** * A theme based on IOS color palette. diff --git a/base/src/main/java/atlantafx/base/theme/Styles.java b/base/src/main/java/atlantafx/base/theme/Styles.java index e3d8dc9..42a936b 100644 --- a/base/src/main/java/atlantafx/base/theme/Styles.java +++ b/base/src/main/java/atlantafx/base/theme/Styles.java @@ -243,6 +243,7 @@ public final class Styles { * @param prop the name of the style property to remove * @throws NullPointerException if node is null */ + @SuppressWarnings("StringSplitter") public static void removeStyle(Node node, String prop) { if (node == null) { throw new NullPointerException("Node cannot be null!"); diff --git a/base/src/main/java/atlantafx/base/util/BBCodeHandler.java b/base/src/main/java/atlantafx/base/util/BBCodeHandler.java index 3346a5f..b6724ab 100644 --- a/base/src/main/java/atlantafx/base/util/BBCodeHandler.java +++ b/base/src/main/java/atlantafx/base/util/BBCodeHandler.java @@ -176,9 +176,9 @@ public interface BBCodeHandler { protected static final int OL_LETTER_OFFSET = 100_000; protected final Block root; + protected final Deque openTags = new ArrayDeque<>(); + protected final Deque openBlocks = new ArrayDeque<>(); protected char[] doc; - protected Deque openTags = new ArrayDeque<>(); - protected Deque openBlocks = new ArrayDeque<>(); protected int textCursor; /** diff --git a/base/src/test/java/atlantafx/base/theme/StylesTest.java b/base/src/test/java/atlantafx/base/theme/StylesTest.java index 55f309d..263fc46 100644 --- a/base/src/test/java/atlantafx/base/theme/StylesTest.java +++ b/base/src/test/java/atlantafx/base/theme/StylesTest.java @@ -10,9 +10,9 @@ import org.junit.jupiter.api.Test; public class StylesTest { - PseudoClass pcFirst = PseudoClass.getPseudoClass("first"); - PseudoClass pcSecond = PseudoClass.getPseudoClass("second"); - PseudoClass pcExcluded = PseudoClass.getPseudoClass("excluded"); + final PseudoClass pcFirst = PseudoClass.getPseudoClass("first"); + final PseudoClass pcSecond = PseudoClass.getPseudoClass("second"); + final PseudoClass pcExcluded = PseudoClass.getPseudoClass("excluded"); @Test @SuppressWarnings("DataFlowIssue") diff --git a/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java b/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java index 632b518..8291423 100644 --- a/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java +++ b/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java @@ -149,12 +149,6 @@ class MainLayer extends BorderPane { .orElse(null); final Page nextPage = pageClass.getDeclaredConstructor().newInstance(); - model.setPageData( - nextPage.getName(), - nextPage.canChangeThemeSettings(), - nextPage.canDisplaySourceCode() - ); - // startup, no prev page, no animation if (getScene() == null) { subLayerPane.getChildren().add(nextPage.getView()); diff --git a/sampler/src/main/java/atlantafx/sampler/layout/MainModel.java b/sampler/src/main/java/atlantafx/sampler/layout/MainModel.java index d9a5ad8..4af7f16 100644 --- a/sampler/src/main/java/atlantafx/sampler/layout/MainModel.java +++ b/sampler/src/main/java/atlantafx/sampler/layout/MainModel.java @@ -64,21 +64,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import javafx.beans.property.ReadOnlyBooleanProperty; -import javafx.beans.property.ReadOnlyBooleanWrapper; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.beans.property.ReadOnlyStringProperty; -import javafx.beans.property.ReadOnlyStringWrapper; -import javafx.beans.property.SimpleStringProperty; -import javafx.beans.property.StringProperty; import org.kordamp.ikonli.javafx.FontIcon; import org.kordamp.ikonli.material2.Material2OutlinedAL; import org.kordamp.ikonli.material2.Material2OutlinedMZ; public class MainModel { - public static Class DEFAULT_PAGE = ThemePage.class; + public static final Class DEFAULT_PAGE = ThemePage.class; private static final Map, NavTree.Item> NAV_TREE = createNavItems(); @@ -105,33 +99,6 @@ public class MainModel { // Properties // /////////////////////////////////////////////////////////////////////////// - private final StringProperty searchText = new SimpleStringProperty(); - - public StringProperty searchTextProperty() { - return searchText; - } - - // ~ - private final ReadOnlyStringWrapper title = new ReadOnlyStringWrapper(); - - public ReadOnlyStringProperty titleProperty() { - return title.getReadOnlyProperty(); - } - - // ~ - private final ReadOnlyBooleanWrapper themeChangeToggle = new ReadOnlyBooleanWrapper(); - - public ReadOnlyBooleanProperty themeChangeToggleProperty() { - return themeChangeToggle.getReadOnlyProperty(); - } - - // ~ - private final ReadOnlyBooleanWrapper sourceCodeToggle = new ReadOnlyBooleanWrapper(); - - public ReadOnlyBooleanProperty sourceCodeToggleProperty() { - return sourceCodeToggle.getReadOnlyProperty(); - } - // ~ private final ReadOnlyObjectWrapper> selectedPage = new ReadOnlyObjectWrapper<>(); @@ -342,12 +309,6 @@ public class MainModel { // Commands // /////////////////////////////////////////////////////////////////////////// - public void setPageData(String text, boolean canChangeTheme, boolean canDisplaySource) { - title.set(Objects.requireNonNull(text)); - themeChangeToggle.set(canChangeTheme); - sourceCodeToggle.set(canDisplaySource); - } - public void navigate(Class page) { selectedPage.set(Objects.requireNonNull(page)); currentSubLayer.set(PAGE); diff --git a/sampler/src/main/java/atlantafx/sampler/layout/ModalDialog.java b/sampler/src/main/java/atlantafx/sampler/layout/ModalDialog.java index c6f5562..f010e94 100644 --- a/sampler/src/main/java/atlantafx/sampler/layout/ModalDialog.java +++ b/sampler/src/main/java/atlantafx/sampler/layout/ModalDialog.java @@ -17,8 +17,8 @@ import javafx.scene.layout.VBox; public abstract class ModalDialog extends DialogPane { - protected Card content = new Card(); - protected Tile header = new Tile(); + protected final Card content = new Card(); + protected final Tile header = new Tile(); public ModalDialog() { super("#" + ApplicationWindow.MAIN_MODAL_ID); diff --git a/sampler/src/main/java/atlantafx/sampler/layout/NavTree.java b/sampler/src/main/java/atlantafx/sampler/layout/NavTree.java index e53a221..446e28a 100644 --- a/sampler/src/main/java/atlantafx/sampler/layout/NavTree.java +++ b/sampler/src/main/java/atlantafx/sampler/layout/NavTree.java @@ -13,7 +13,6 @@ import javafx.css.PseudoClass; import javafx.geometry.Pos; import javafx.scene.Cursor; import javafx.scene.Node; -import javafx.scene.control.ContentDisplay; import javafx.scene.control.Label; import javafx.scene.control.TreeCell; import javafx.scene.control.TreeItem; diff --git a/sampler/src/main/java/atlantafx/sampler/page/AbstractPage.java b/sampler/src/main/java/atlantafx/sampler/page/AbstractPage.java index a910637..7ba978a 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/AbstractPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/AbstractPage.java @@ -53,11 +53,6 @@ public abstract class AbstractPage extends StackPane implements Page { return true; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public @Nullable URI getJavadocUri() { return URI.create(String.format(JFX_JAVADOC_URI_TEMPLATE, "control/" + getName())); diff --git a/sampler/src/main/java/atlantafx/sampler/page/OutlinePage.java b/sampler/src/main/java/atlantafx/sampler/page/OutlinePage.java index 847fcf6..8e9a124 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/OutlinePage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/OutlinePage.java @@ -76,7 +76,7 @@ public abstract class OutlinePage extends StackPane implements Page { protected Consumer createOutlineHandler() { return heading -> { - if (heading != Heading.TOP) { + if (!Objects.equals(heading, Heading.TOP)) { Parent container = heading.anchor().getParent(); int indexInParent = container.getChildrenUnmodifiable().indexOf(heading.anchor()); @@ -164,11 +164,6 @@ public abstract class OutlinePage extends StackPane implements Page { return true; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public @Nullable URI getJavadocUri() { return URI.create(String.format(JFX_JAVADOC_URI_TEMPLATE, "control/" + getName())); diff --git a/sampler/src/main/java/atlantafx/sampler/page/Page.java b/sampler/src/main/java/atlantafx/sampler/page/Page.java index 51535fb..bc5f168 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/Page.java +++ b/sampler/src/main/java/atlantafx/sampler/page/Page.java @@ -55,8 +55,6 @@ public interface Page { boolean canDisplaySourceCode(); - boolean canChangeThemeSettings(); - @Nullable URI getJavadocUri(); @Nullable Node getSnapshotTarget(); diff --git a/sampler/src/main/java/atlantafx/sampler/page/Snippet.java b/sampler/src/main/java/atlantafx/sampler/page/Snippet.java index b2edccf..6a703d7 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/Snippet.java +++ b/sampler/src/main/java/atlantafx/sampler/page/Snippet.java @@ -3,6 +3,7 @@ package atlantafx.sampler.page; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Objects; import javafx.scene.Node; import javafx.scene.layout.HBox; @@ -38,7 +39,7 @@ public final class Snippet { try (var stream = sourceClass.getResourceAsStream(sourceFileName)) { Objects.requireNonNull(stream, "Missing source file '" + sourceFileName + "';"); - var sourceCode = new String(stream.readAllBytes()); + var sourceCode = new String(stream.readAllBytes(), StandardCharsets.UTF_8); var startTag = "//snippet_" + id + ":start"; var endTag = "//snippet_" + id + ":end"; var start = sourceCode.indexOf(startTag); diff --git a/sampler/src/main/java/atlantafx/sampler/page/components/AnimationsPage.java b/sampler/src/main/java/atlantafx/sampler/page/components/AnimationsPage.java index c202245..842411a 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/components/AnimationsPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/components/AnimationsPage.java @@ -132,11 +132,6 @@ public final class AnimationsPage extends StackPane implements Page { return true; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public URI getJavadocUri() { return URI.create(String.format(AFX_JAVADOC_URI_TEMPLATE, "util/" + getName())); @@ -154,6 +149,7 @@ public final class AnimationsPage extends StackPane implements Page { /////////////////////////////////////////////////////////////////////////// // this method isn't used anywhere + @SuppressWarnings("unused") private void snippetText() { //snippet_1:start var rectangle = new Rectangle(100, 100); diff --git a/sampler/src/main/java/atlantafx/sampler/page/components/BreadcrumbsPage.java b/sampler/src/main/java/atlantafx/sampler/page/components/BreadcrumbsPage.java index 8ae025a..ab20cc8 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/components/BreadcrumbsPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/components/BreadcrumbsPage.java @@ -28,7 +28,7 @@ public final class BreadcrumbsPage extends OutlinePage { } @Override - public @Nullable URI getJavadocUri() { + public URI getJavadocUri() { return URI.create(String.format(AFX_JAVADOC_URI_TEMPLATE, "controls/" + getName())); } diff --git a/sampler/src/main/java/atlantafx/sampler/page/components/CustomTextFieldPage.java b/sampler/src/main/java/atlantafx/sampler/page/components/CustomTextFieldPage.java index 716955e..54b1ef8 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/components/CustomTextFieldPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/components/CustomTextFieldPage.java @@ -20,7 +20,6 @@ import javafx.scene.Cursor; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; -import org.jetbrains.annotations.Nullable; import org.kordamp.ikonli.feather.Feather; import org.kordamp.ikonli.javafx.FontIcon; import org.kordamp.ikonli.material2.Material2OutlinedAL; @@ -151,6 +150,7 @@ public final class CustomTextFieldPage extends OutlinePage { timeField.textProperty().addListener((obs, old, val) -> { if (val != null) { try { + //noinspection ResultOfMethodCallIgnored LocalTime.parse(val, timeFormatter); timeField.pseudoClassStateChanged(Styles.STATE_DANGER, false); } catch (DateTimeParseException e) { diff --git a/sampler/src/main/java/atlantafx/sampler/page/components/ToolBarPage.java b/sampler/src/main/java/atlantafx/sampler/page/components/ToolBarPage.java index 8e994f8..ccce0ae 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/components/ToolBarPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/components/ToolBarPage.java @@ -79,7 +79,7 @@ public final class ToolBarPage extends OutlinePage { private ExampleBox usageExample() { //snippet_1:start - var toolbar1 = new ToolBar( + final var toolbar1 = new ToolBar( new Button("New", new FontIcon(Feather.PLUS)), new Button("Open", new FontIcon(Feather.FILE)), new Button("Save", new FontIcon(Feather.SAVE)), @@ -102,7 +102,7 @@ public final class ToolBarPage extends OutlinePage { )); fontSizeCmb.getSelectionModel().select(6); - var toolbar2 = new ToolBar( + final var toolbar2 = new ToolBar( fontFamilyCmb, fontSizeCmb, new Separator(Orientation.VERTICAL), @@ -131,7 +131,7 @@ public final class ToolBarPage extends OutlinePage { new MenuItem("Action 3") ); - var toolbar3 = new ToolBar( + final var toolbar3 = new ToolBar( iconButton(Feather.CHEVRON_LEFT), iconButton(Feather.CHEVRON_RIGHT), new Separator(Orientation.VERTICAL), diff --git a/sampler/src/main/java/atlantafx/sampler/page/general/BBCodePage.java b/sampler/src/main/java/atlantafx/sampler/page/general/BBCodePage.java index d17ec3c..421cb2d 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/general/BBCodePage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/general/BBCodePage.java @@ -24,7 +24,7 @@ public final class BBCodePage extends OutlinePage { } @Override - public @Nullable URI getJavadocUri() { + public URI getJavadocUri() { return URI.create(String.format(AFX_JAVADOC_URI_TEMPLATE, "util/BBCodeParser")); } diff --git a/sampler/src/main/java/atlantafx/sampler/page/general/ThemePage.java b/sampler/src/main/java/atlantafx/sampler/page/general/ThemePage.java index 12d64dc..3635e8f 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/general/ThemePage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/general/ThemePage.java @@ -59,11 +59,6 @@ public final class ThemePage extends OutlinePage { return false; } - @Override - public boolean canChangeThemeSettings() { - return false; - } - @Override public @Nullable URI getJavadocUri() { return null; diff --git a/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java b/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java index 1729ec1..a8835ef 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java @@ -191,7 +191,7 @@ public final class TypographyPage extends OutlinePage { new StyledText("300", "-fx-font-weight:300;"), new StyledText("200", "-fx-font-weight:200;"), new StyledText("100", "-fx-font-weight:100;"), - new Text("\uD83E\uDC60 no difference") + new Text("🡠 no difference") ); sample2.setAlignment(Pos.BASELINE_LEFT); @@ -210,7 +210,7 @@ public final class TypographyPage extends OutlinePage { new StyledText("300", "-fx-font-family:'Inter Light';"), new StyledText("200", "-fx-font-family:'Inter Extra Light';"), new StyledText("100", "-fx-font-family:'Inter Thin';"), - new Text("\uD83E\uDC60 workaround") + new Text("🡠 workaround") ); sample3.setAlignment(Pos.BASELINE_LEFT); //snippet_2:end diff --git a/sampler/src/main/java/atlantafx/sampler/page/showcase/BlueprintsPage.java b/sampler/src/main/java/atlantafx/sampler/page/showcase/BlueprintsPage.java index 315edce..834ead6 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/showcase/BlueprintsPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/showcase/BlueprintsPage.java @@ -64,11 +64,6 @@ public final class BlueprintsPage extends ScrollPane implements Page { return true; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public @Nullable URI getJavadocUri() { return null; diff --git a/sampler/src/main/java/atlantafx/sampler/page/showcase/OverviewPage.java b/sampler/src/main/java/atlantafx/sampler/page/showcase/OverviewPage.java index 3e794bf..787cfaa 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/showcase/OverviewPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/showcase/OverviewPage.java @@ -66,11 +66,6 @@ public final class OverviewPage extends ScrollPane implements Page { return true; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public @Nullable URI getJavadocUri() { return null; diff --git a/sampler/src/main/java/atlantafx/sampler/page/showcase/ShowcasePage.java b/sampler/src/main/java/atlantafx/sampler/page/showcase/ShowcasePage.java index d43df0e..260c561 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/showcase/ShowcasePage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/showcase/ShowcasePage.java @@ -28,13 +28,13 @@ public abstract class ShowcasePage extends StackPane implements Page { protected static final int DEFAULT_WIDTH = 800; protected static final int DEFAULT_HEIGHT = 600; - protected VBox showcaseWindow = new VBox(); - protected Label windowTitle = new Label(); - protected VBox showCaseContent = new VBox(); - protected FontIcon aboutBtn = new FontIcon(Feather.HELP_CIRCLE); + protected final VBox showcaseWindow = new VBox(); + protected final Label windowTitle = new Label(); + protected final VBox showCaseContent = new VBox(); + protected final FontIcon aboutBtn = new FontIcon(Feather.HELP_CIRCLE); + protected final BooleanProperty maximized = new SimpleBooleanProperty(); protected int windowWidth = DEFAULT_WIDTH; protected int windowHeight = DEFAULT_HEIGHT; - protected BooleanProperty maximized = new SimpleBooleanProperty(); public ShowcasePage() { super(); @@ -119,11 +119,6 @@ public abstract class ShowcasePage extends StackPane implements Page { return false; } - @Override - public boolean canChangeThemeSettings() { - return true; - } - @Override public @Nullable URI getJavadocUri() { return null; diff --git a/sampler/src/main/java/atlantafx/sampler/page/showcase/filemanager/TableDirectoryView.java b/sampler/src/main/java/atlantafx/sampler/page/showcase/filemanager/TableDirectoryView.java index 09d5170..5a3cd77 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/showcase/filemanager/TableDirectoryView.java +++ b/sampler/src/main/java/atlantafx/sampler/page/showcase/filemanager/TableDirectoryView.java @@ -75,7 +75,7 @@ final class TableDirectoryView extends AnchorPane implements DirectoryView { table.getColumns().setAll(filenameCol, sizeCol, mtimeCol); table.getSortOrder().add(filenameCol); table.setSortPolicy(param -> true); - table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY); + table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMN); filenameCol.minWidthProperty().bind(table.widthProperty().multiply(0.5)); table.setRowFactory(param -> { TableRow row = new TableRow<>(); diff --git a/sampler/src/main/java/atlantafx/sampler/page/showcase/musicplayer/PlayerPane.java b/sampler/src/main/java/atlantafx/sampler/page/showcase/musicplayer/PlayerPane.java index c8c6597..16346c2 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/showcase/musicplayer/PlayerPane.java +++ b/sampler/src/main/java/atlantafx/sampler/page/showcase/musicplayer/PlayerPane.java @@ -44,7 +44,6 @@ import javafx.scene.layout.VBox; import javafx.scene.media.Media; import javafx.scene.media.MediaPlayer; import javafx.scene.paint.ImagePattern; -import javafx.scene.shape.Circle; import javafx.scene.shape.Rectangle; import javafx.util.Duration; import org.kordamp.ikonli.javafx.FontIcon;