Skip to content

Commit

Permalink
Put example apps under separate packages
Browse files Browse the repository at this point in the history
  • Loading branch information
besidev committed Oct 18, 2023
1 parent 13ce264 commit fd27056
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions jpro-file/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ javafx {
modules = ['javafx.controls', 'javafx.swing', 'javafx.media']
}

//mainClassName = 'one.jpro.platform.file.example.FilePickerSample'
mainClassName = 'one.jpro.platform.file.example.FileDropperSample'
//mainClassName = 'one.jpro.platform.file.example.picker.FilePickerSample'
mainClassName = 'one.jpro.platform.file.example.dropper.FileDropperSample'

application {
mainClass = "$mainClassName"
Expand Down
3 changes: 2 additions & 1 deletion jpro-file/example/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
requires atlantafx.base;
requires org.slf4j;

exports one.jpro.platform.file.example;
exports one.jpro.platform.file.example.dropper;
exports one.jpro.platform.file.example.picker;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.dropper;

import atlantafx.base.theme.CupertinoLight;
import javafx.application.Application;
Expand Down Expand Up @@ -32,7 +32,7 @@ public class FileDropperSample extends Application {
private static final Logger logger = LoggerFactory.getLogger(FileDropperSample.class);

private static final PseudoClass FILES_DRAG_OVER_PSEUDO_CLASS = PseudoClass.getPseudoClass("files-drag-over");
private static final ExtensionFilter textExtensionFilter = ExtensionFilter.of("TEXT files", ".txt", ".srt", ".md", ".csv");
private static final ExtensionFilter textExtensionFilter = ExtensionFilter.of("Text files", ".txt", ".srt", ".md", ".csv");

@Override
public void start(Stage stage) {
Expand All @@ -41,7 +41,7 @@ public void start(Stage stage) {
Optional.ofNullable(CupertinoLight.class.getResource(new CupertinoLight().getUserAgentStylesheet()))
.map(URL::toExternalForm)
.ifPresent(scene::setUserAgentStylesheet);
Optional.ofNullable(FileDropperSample.class.getResource("css/file_dropper.css"))
Optional.ofNullable(FileDropperSample.class.getResource("/one/jpro/platform/file/example/css/file_dropper.css"))
.map(URL::toExternalForm)
.ifPresent(scene.getStylesheets()::add);
stage.setScene(scene);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.picker;

import atlantafx.base.theme.CupertinoLight;
import javafx.application.Application;
Expand All @@ -23,7 +23,7 @@
*/
public class FilePickerSample extends Application {

private static final ExtensionFilter textExtensionFilter = ExtensionFilter.of("TEXT files", ".txt", ".srt", ".md", ".csv");
private static final ExtensionFilter textExtensionFilter = ExtensionFilter.of("Text files", ".txt", ".srt", ".md", ".csv");
private static final ExtensionFilter audioExtensionFilter = ExtensionFilter.of("Audio files", ".mp3", ".wav", ".ogg");
private static final ExtensionFilter videoExtensionFilter = ExtensionFilter.of("Video files", ".mp4", ".avi", ".mkv");
private static final ExtensionFilter imageExtensionFilter = ExtensionFilter.of("Image files", ".png", ".jpg", ".jpeg");
Expand All @@ -35,7 +35,7 @@ public void start(Stage stage) {
Optional.ofNullable(CupertinoLight.class.getResource(new CupertinoLight().getUserAgentStylesheet()))
.map(URL::toExternalForm)
.ifPresent(scene::setUserAgentStylesheet);
Optional.ofNullable(FilePickerSample.class.getResource("css/file_picker.css"))
Optional.ofNullable(FilePickerSample.class.getResource("/one/jpro/platform/file/example/css/file_picker.css"))
.map(URL::toExternalForm)
.ifPresent(scene.getStylesheets()::add);
stage.setScene(scene);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.picker;

import javafx.geometry.Pos;
import javafx.scene.control.ContentDisplay;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.picker;

import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.picker;

import javafx.application.Platform;
import javafx.scene.control.Button;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package one.jpro.platform.file.example;
package one.jpro.platform.file.example.picker;

import atlantafx.base.theme.Styles;
import javafx.scene.control.ContentDisplay;
Expand Down

0 comments on commit fd27056

Please sign in to comment.