diff --git a/app/src/main/resources/META-INF/native-image/reflect-config.json b/app/src/main/resources/META-INF/native-image/reflect-config.json index d609234f..ea342a69 100644 --- a/app/src/main/resources/META-INF/native-image/reflect-config.json +++ b/app/src/main/resources/META-INF/native-image/reflect-config.json @@ -506,6 +506,10 @@ "name":"com.sun.prism.shader.FillRoundRect_Color_Loader", "methods":[{"name":"loadShader","parameterTypes":["com.sun.prism.ps.ShaderFactory","java.io.InputStream"] }] }, +{ + "name":"com.sun.prism.shader.FillRoundRect_LinearGradient_PAD_Loader", + "methods":[{"name":"loadShader","parameterTypes":["com.sun.prism.ps.ShaderFactory","java.io.InputStream"] }] +}, { "name":"com.sun.prism.shader.Mask_TextureRGB_Loader", "methods":[{"name":"loadShader","parameterTypes":["com.sun.prism.ps.ShaderFactory","java.io.InputStream"] }] diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/MobileSearchTextField.java b/components/src/main/java/com/dlsc/jfxcentral2/components/MobileSearchTextField.java new file mode 100644 index 00000000..928203cd --- /dev/null +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/MobileSearchTextField.java @@ -0,0 +1,66 @@ +package com.dlsc.jfxcentral2.components; + +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.control.TextField; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import org.kordamp.ikonli.javafx.FontIcon; +import org.kordamp.ikonli.materialdesign.MaterialDesign; + +public class MobileSearchTextField extends BorderPane { + + public MobileSearchTextField() { + getStyleClass().add("text-input"); + + getStyleClass().add("mobile-search-text-field"); + + TextField textField = new TextField(); + textField.textProperty().bindBidirectional(textProperty()); + textField.promptTextProperty().bind(promptText); + + HBox.setHgrow(textField, Priority.ALWAYS); + + FontIcon icon = new FontIcon(MaterialDesign.MDI_MAGNIFY); + BorderPane.setAlignment(icon, Pos.CENTER); + BorderPane.setMargin(textField, new Insets(0, 10, 0, 10)); + + setLeft(icon); + setCenter(textField); + } + + private final StringProperty text = new SimpleStringProperty(); + + public String getText() { + return text.get(); + } + + public StringProperty textProperty() { + return text; + } + + public void setText(String text) { + this.text.set(text); + } + + public final void clear() { + text.set(""); + } + + private final StringProperty promptText = new SimpleStringProperty(); + + public String getPromptText() { + return promptText.get(); + } + + public StringProperty promptTextProperty() { + return promptText; + } + + public void setPromptText(String promptText) { + this.promptText.set(promptText); + } +} diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BlogsFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BlogsFilterView.java index e4955343..e0dc99d7 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BlogsFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BlogsFilterView.java @@ -7,7 +7,7 @@ public class BlogsFilterView extends SimpleModelObjectSearchFilterView { public BlogsFilterView() { getStyleClass().add("blogs-filter-view"); - setSearchPromptText("Search for a blog"); + setSearchPromptText("Search for a blog ..."); setOnSearch(text -> blog -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(blog.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BooksFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BooksFilterView.java index 6b978d4b..d75a02e5 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BooksFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/BooksFilterView.java @@ -7,7 +7,7 @@ public class BooksFilterView extends SimpleModelObjectSearchFilterView { public BooksFilterView() { getStyleClass().add("books-filter-view"); - setSearchPromptText("Search for a book"); + setSearchPromptText("Search for a book ..."); setOnSearch(text -> book -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(book.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/CompaniesFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/CompaniesFilterView.java index 799fa41b..364db14f 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/CompaniesFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/CompaniesFilterView.java @@ -7,7 +7,7 @@ public class CompaniesFilterView extends SimpleModelObjectSearchFilterView company -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(company.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DocumentationFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DocumentationFilterView.java index 32b1f472..a3166134 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DocumentationFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DocumentationFilterView.java @@ -24,7 +24,7 @@ public DocumentationFilterView() { new SortItem<>("From Z to A", Comparator.comparing((Documentation modelObject) -> modelObject.getName().toLowerCase()).reversed())) )); - setSearchPromptText("Search for a Documentation"); + setSearchPromptText("Search for documentation ..."); setOnSearch(text -> tool -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(tool.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DownloadsFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DownloadsFilterView.java index 59f00af1..ac81ac29 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DownloadsFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/DownloadsFilterView.java @@ -7,7 +7,7 @@ public class DownloadsFilterView extends SimpleModelObjectSearchFilterView download -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(download.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LearnFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LearnFilterView.java index 77e6b948..2bd4e612 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LearnFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LearnFilterView.java @@ -15,7 +15,7 @@ public class LearnFilterView extends SimpleModelObjectSearchFilterView { public LearnFilterView() { getStyleClass().addAll("learn-filter-view", "tools-filter-view"); - setSearchPromptText("Search for a lesson"); + setSearchPromptText("Search for a lesson ..."); setOnSearch(text -> learn -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(learn.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LibrariesFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LibrariesFilterView.java index 1ae86b95..9df0c0e6 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LibrariesFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/LibrariesFilterView.java @@ -7,7 +7,7 @@ public class LibrariesFilterView extends SimpleModelObjectSearchFilterView library -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(library.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/PeopleFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/PeopleFilterView.java index 4d6a240b..02655aa9 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/PeopleFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/PeopleFilterView.java @@ -11,7 +11,7 @@ public class PeopleFilterView extends SimpleModelObjectSearchFilterView { public PeopleFilterView() { getStyleClass().add("people-filter-view"); - setSearchPromptText("Search for a JFX person"); + setSearchPromptText("Search for a person ..."); Label keysLabel = new Label("*KEY"); keysLabel.getStyleClass().add("keys-label"); diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ShowcaseFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ShowcaseFilterView.java index f726947e..2b4e5feb 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ShowcaseFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ShowcaseFilterView.java @@ -15,7 +15,7 @@ public class ShowcaseFilterView extends SimpleModelObjectSearchFilterView tip -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(tip.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ToolsFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ToolsFilterView.java index c92ac936..8d625312 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ToolsFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/ToolsFilterView.java @@ -8,7 +8,7 @@ public class ToolsFilterView extends SimpleModelObjectSearchFilterView { public ToolsFilterView() { getStyleClass().add("tools-filter-view"); - setSearchPromptText("Search for a tool"); + setSearchPromptText("Search for a tool ..."); setOnSearch(text -> tool -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(tool.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/TutorialsFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/TutorialsFilterView.java index 338326c2..a060255e 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/TutorialsFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/TutorialsFilterView.java @@ -8,7 +8,7 @@ public class TutorialsFilterView extends SimpleModelObjectSearchFilterView tutorial -> StringUtils.isBlank(text) || StringUtils.containsIgnoreCase(tutorial.getName(), text) diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/VideosFilterView.java b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/VideosFilterView.java index 5741d049..10fa90b3 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/filters/VideosFilterView.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/filters/VideosFilterView.java @@ -21,7 +21,7 @@ public VideosFilterView() { getStyleClass().add("videos-filter-view"); setSortGroup(null); - setSearchPromptText("Search for a video"); + setSearchPromptText("Search for a video ..."); if (typeFilterItems == null) { typeFilterItems = getVideoFilterItems(Video::getType, createFilterPredicate(Video::getType)); diff --git a/components/src/main/java/com/dlsc/jfxcentral2/components/overviewbox/VideoOverviewBox.java b/components/src/main/java/com/dlsc/jfxcentral2/components/overviewbox/VideoOverviewBox.java index 6e3a7b2c..a738eeff 100644 --- a/components/src/main/java/com/dlsc/jfxcentral2/components/overviewbox/VideoOverviewBox.java +++ b/components/src/main/java/com/dlsc/jfxcentral2/components/overviewbox/VideoOverviewBox.java @@ -2,8 +2,10 @@ import com.dlsc.jfxcentral.data.DataRepository2; import com.dlsc.jfxcentral.data.model.Video; +import com.dlsc.jfxcentral2.components.CustomMarkdownView; import com.dlsc.jfxcentral2.utils.VideoViewFactory; import javafx.scene.Node; +import javafx.scene.control.Label; public class VideoOverviewBox extends SimpleOverviewBox