From ec3452f282f7f9f17e078467a4a9a8588028d6b9 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 27 Sep 2022 19:13:09 -0400 Subject: Minor changes --- firmal/.classpath | 13 +-------- firmal/.settings/org.eclipse.jdt.core.prefs | 6 ++-- firmal/pom.xml | 8 +++--- .../main/java/bjc/firmal/DirectoryExpected.java | 18 ++++++++++++ .../main/java/bjc/firmal/FirmalBrowserPanel.java | 33 +++------------------- firmal/src/main/java/module-info.java | 13 +++++++++ 6 files changed, 43 insertions(+), 48 deletions(-) create mode 100644 firmal/src/main/java/bjc/firmal/DirectoryExpected.java create mode 100644 firmal/src/main/java/module-info.java diff --git a/firmal/.classpath b/firmal/.classpath index 002ad57..5e577b9 100644 --- a/firmal/.classpath +++ b/firmal/.classpath @@ -6,11 +6,6 @@ - - - - - @@ -18,13 +13,7 @@ - - - - - - - + diff --git a/firmal/.settings/org.eclipse.jdt.core.prefs b/firmal/.settings/org.eclipse.jdt.core.prefs index db24ee7..62544f6 100644 --- a/firmal/.settings/org.eclipse.jdt.core.prefs +++ b/firmal/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -12,4 +12,4 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=17 diff --git a/firmal/pom.xml b/firmal/pom.xml index 7e460e8..1b2aae5 100644 --- a/firmal/pom.xml +++ b/firmal/pom.xml @@ -4,14 +4,14 @@ 4.0.0 bjc firmal - 0.0.1-SNAPSHOT + 0.0.2-SNAPSHOT firmal Local browser for directories of HTML files. Created originally for browsing downloaded tumblr blogs bjc BJC-Utils2 - 1.0.0 + 2.0-SNAPSHOT @@ -20,8 +20,8 @@ maven-compiler-plugin 3.8.0 - 1.8 - 1.8 + 1.17 + 1.17 diff --git a/firmal/src/main/java/bjc/firmal/DirectoryExpected.java b/firmal/src/main/java/bjc/firmal/DirectoryExpected.java new file mode 100644 index 0000000..ebd6da9 --- /dev/null +++ b/firmal/src/main/java/bjc/firmal/DirectoryExpected.java @@ -0,0 +1,18 @@ +package bjc.firmal; + +/** + * Exception thrown when we got a directory when should've gotten a non directory. + * @author Ben Culkin + * + */ +public class DirectoryExpected extends RuntimeException { + private static final long serialVersionUID = 6614868098505684922L; + + /** + * Create a new exception. + * @param pth The path to the directory. + */ + public DirectoryExpected(String pth) { + super(String.format("Non-directory '%s' passed where a directory was expected", pth)); + } +} \ No newline at end of file diff --git a/firmal/src/main/java/bjc/firmal/FirmalBrowserPanel.java b/firmal/src/main/java/bjc/firmal/FirmalBrowserPanel.java index 4eef8e6..3120a2d 100644 --- a/firmal/src/main/java/bjc/firmal/FirmalBrowserPanel.java +++ b/firmal/src/main/java/bjc/firmal/FirmalBrowserPanel.java @@ -24,23 +24,6 @@ import bjc.utils.gui.layout.VLayout; * */ public class FirmalBrowserPanel extends JPanel { - /** - * Exception thrown when we got a directory when should've gotten a non directory. - * @author Ben Culkin - * - */ - public class DirectoryExpected extends RuntimeException { - private static final long serialVersionUID = 6614868098505684922L; - - /** - * Create a new exception. - * @param pth The path to the directory. - */ - public DirectoryExpected(String pth) { - super(String.format("Non-directory '%s' passed where a directory was expected", pth)); - } - } - private static final long serialVersionUID = 9078988253392361649L; private JEditorPane contentPane; @@ -79,25 +62,17 @@ public class FirmalBrowserPanel extends JPanel { navButtonPanel.setLayout(new GridLayout(2, 2)); SimpleKeyedButton firstButton = new SimpleKeyedButton("<< First"); - firstButton.setGlobalDefaultKeystroke("firstFile", "control shift P", (aev) -> { - moveFirst(); - }); + firstButton.setGlobalDefaultKeystroke("firstFile", "control shift P", (aev) -> moveFirst()); firstButton.setMnemonic(KeyEvent.VK_F); SimpleKeyedButton prevButton = new SimpleKeyedButton("< Previous"); - prevButton.setGlobalDefaultKeystroke("prevFile", "control P", (ev) -> { - movePrevious(); - }); + prevButton.setGlobalDefaultKeystroke("prevFile", "control P", (ev) -> movePrevious()); SimpleKeyedButton lastButton = new SimpleKeyedButton("Last >>"); - lastButton.setGlobalDefaultKeystroke("lastFile", "control shift N", (ev) -> { - moveLast(); - }); + lastButton.setGlobalDefaultKeystroke("lastFile", "control shift N", (ev) -> moveLast()); SimpleKeyedButton nextButton = new SimpleKeyedButton("Next >"); - nextButton.setGlobalDefaultKeystroke("nextFile", "control N", (ev) -> { - moveNext(); - }); + nextButton.setGlobalDefaultKeystroke("nextFile", "control N", (ev) -> moveNext()); navButtonPanel.add(firstButton); navButtonPanel.add(lastButton); diff --git a/firmal/src/main/java/module-info.java b/firmal/src/main/java/module-info.java new file mode 100644 index 0000000..80dd7c4 --- /dev/null +++ b/firmal/src/main/java/module-info.java @@ -0,0 +1,13 @@ +/** + * A browsing utility for images and other files. + * + * @author bjcul + * + */ +module firmal { + exports bjc.firmal; + + requires bjc.utils; + requires esodata; + requires transitive java.desktop; +} \ No newline at end of file -- cgit v1.2.3