summaryrefslogtreecommitdiff
path: root/firmal/src
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2022-09-27 19:13:09 -0400
committerBen Culkin <scorpress@gmail.com>2022-09-27 19:13:09 -0400
commitec3452f282f7f9f17e078467a4a9a8588028d6b9 (patch)
tree36dee5cb0d78ce269430b3610953ad067323143a /firmal/src
parent8b1183c7ca3d8abd61b13328df37cb3b2bf05206 (diff)
Minor changes
Diffstat (limited to 'firmal/src')
-rw-r--r--firmal/src/main/java/bjc/firmal/DirectoryExpected.java18
-rw-r--r--firmal/src/main/java/bjc/firmal/FirmalBrowserPanel.java33
-rw-r--r--firmal/src/main/java/module-info.java13
3 files changed, 35 insertions, 29 deletions
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