diff --git a/pom.xml b/pom.xml index 8e4cce3..c7ddfa6 100644 --- a/pom.xml +++ b/pom.xml @@ -42,14 +42,6 @@ - - - org.projectlombok - lombok - 1.18.14 - provided - - com.1stleg diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/control/export/BookExporter.java b/src/main/java/nl/andrewlalis/blockbookbinder/control/export/BookExporter.java index 0143e8d..d3f1f86 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/control/export/BookExporter.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/control/export/BookExporter.java @@ -1,6 +1,5 @@ package nl.andrewlalis.blockbookbinder.control.export; -import lombok.Setter; import nl.andrewlalis.blockbookbinder.model.Book; import nl.andrewlalis.blockbookbinder.util.ApplicationProperties; import nl.andrewlalis.blockbookbinder.view.export.ExportStatusPanel; @@ -33,10 +32,7 @@ public class BookExporter implements Runnable { private final boolean autoPaste; private final int autoPasteDelay; - @Setter private volatile boolean running; - - @Setter private volatile boolean nextPageRequested; private final ExporterKeyListener exporterKeyListener; @@ -125,6 +121,22 @@ public class BookExporter implements Runnable { } } + public boolean isRunning() { + return running; + } + + public void setRunning(boolean running) { + this.running = running; + } + + public boolean isNextPageRequested() { + return nextPageRequested; + } + + public void setNextPageRequested(boolean nextPageRequested) { + this.nextPageRequested = nextPageRequested; + } + /** * Loads the given page onto the system clipboard so either a user or this * program can paste it into a minecraft book. diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/control/export/ExportBookToMinecraftAction.java b/src/main/java/nl/andrewlalis/blockbookbinder/control/export/ExportBookToMinecraftAction.java index f324244..8d4ba7d 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/control/export/ExportBookToMinecraftAction.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/control/export/ExportBookToMinecraftAction.java @@ -1,7 +1,5 @@ package nl.andrewlalis.blockbookbinder.control.export; -import lombok.Getter; -import lombok.Setter; import nl.andrewlalis.blockbookbinder.model.Book; import nl.andrewlalis.blockbookbinder.view.book.BookPreviewPanel; import nl.andrewlalis.blockbookbinder.view.export.ExportToBookDialog; @@ -10,7 +8,6 @@ import javax.swing.*; import java.awt.event.ActionEvent; public class ExportBookToMinecraftAction extends AbstractAction { - @Getter private static final ExportBookToMinecraftAction instance = new ExportBookToMinecraftAction(); public ExportBookToMinecraftAction() { @@ -18,7 +15,6 @@ public class ExportBookToMinecraftAction extends AbstractAction { this.putValue(SHORT_DESCRIPTION, "Export the current book to Minecraft."); } - @Setter private BookPreviewPanel bookPreviewPanel; @Override @@ -36,4 +32,12 @@ public class ExportBookToMinecraftAction extends AbstractAction { ExportToBookDialog dialog = new ExportToBookDialog(SwingUtilities.getWindowAncestor(this.bookPreviewPanel), bookPreviewPanel.getBook()); dialog.setupAndShow(); } + + public void setBookPreviewPanel(BookPreviewPanel bookPreviewPanel) { + this.bookPreviewPanel = bookPreviewPanel; + } + + public static ExportBookToMinecraftAction getInstance() { + return instance; + } } diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CleanSourceAction.java b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CleanSourceAction.java index 4ff5c25..f7f7bcc 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CleanSourceAction.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CleanSourceAction.java @@ -1,17 +1,13 @@ package nl.andrewlalis.blockbookbinder.control.source; -import lombok.Getter; -import lombok.Setter; import nl.andrewlalis.blockbookbinder.view.SourceTextPanel; import javax.swing.*; import java.awt.event.ActionEvent; public class CleanSourceAction extends AbstractAction { - @Getter private final static CleanSourceAction instance = new CleanSourceAction(); - @Setter private SourceTextPanel sourceTextPanel; public CleanSourceAction() { @@ -46,4 +42,12 @@ public class CleanSourceAction extends AbstractAction { } return sb.toString(); } + + public static CleanSourceAction getInstance() { + return instance; + } + + public void setSourceTextPanel(SourceTextPanel sourceTextPanel) { + this.sourceTextPanel = sourceTextPanel; + } } diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CompileFromSourceAction.java b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CompileFromSourceAction.java index 3587b78..e7e4612 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CompileFromSourceAction.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/CompileFromSourceAction.java @@ -1,7 +1,5 @@ package nl.andrewlalis.blockbookbinder.control.source; -import lombok.Getter; -import lombok.Setter; import nl.andrewlalis.blockbookbinder.model.build.BookBuilder; import nl.andrewlalis.blockbookbinder.view.SourceTextPanel; import nl.andrewlalis.blockbookbinder.view.book.BookPreviewPanel; @@ -10,12 +8,9 @@ import javax.swing.*; import java.awt.event.ActionEvent; public class CompileFromSourceAction extends AbstractAction { - @Getter private static final CompileFromSourceAction instance = new CompileFromSourceAction(); - @Setter private SourceTextPanel sourceTextPanel; - @Setter private BookPreviewPanel bookPreviewPanel; public CompileFromSourceAction() { @@ -29,4 +24,16 @@ public class CompileFromSourceAction extends AbstractAction { new BookBuilder().build(this.sourceTextPanel.getSourceText()) ); } + + public static CompileFromSourceAction getInstance() { + return instance; + } + + public void setSourceTextPanel(SourceTextPanel sourceTextPanel) { + this.sourceTextPanel = sourceTextPanel; + } + + public void setBookPreviewPanel(BookPreviewPanel bookPreviewPanel) { + this.bookPreviewPanel = bookPreviewPanel; + } } diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/ImportSourceAction.java b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/ImportSourceAction.java index 4ec167c..3ff1f4a 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/control/source/ImportSourceAction.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/control/source/ImportSourceAction.java @@ -1,12 +1,9 @@ package nl.andrewlalis.blockbookbinder.control.source; -import lombok.Getter; - import javax.swing.*; import java.awt.event.ActionEvent; public class ImportSourceAction extends AbstractAction { - @Getter private static final ImportSourceAction instance = new ImportSourceAction(); public ImportSourceAction() { @@ -18,4 +15,8 @@ public class ImportSourceAction extends AbstractAction { public void actionPerformed(ActionEvent e) { } + + public static ImportSourceAction getInstance() { + return instance; + } } diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/model/Book.java b/src/main/java/nl/andrewlalis/blockbookbinder/model/Book.java index 290dab1..179ad82 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/model/Book.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/model/Book.java @@ -1,13 +1,11 @@ package nl.andrewlalis.blockbookbinder.model; -import lombok.Getter; import nl.andrewlalis.blockbookbinder.util.ApplicationProperties; import java.util.ArrayList; import java.util.List; public class Book { - @Getter private final List pages; public Book() { @@ -18,6 +16,10 @@ public class Book { return this.pages.size(); } + public List getPages() { + return pages; + } + public void addPage(BookPage page) { this.pages.add(page); } diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/model/CharWidthMapper.java b/src/main/java/nl/andrewlalis/blockbookbinder/model/CharWidthMapper.java index ad5351b..a1ef461 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/model/CharWidthMapper.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/model/CharWidthMapper.java @@ -1,15 +1,17 @@ package nl.andrewlalis.blockbookbinder.model; -import lombok.Getter; import nl.andrewlalis.blockbookbinder.util.ApplicationProperties; import java.util.HashMap; import java.util.Map; public class CharWidthMapper { - @Getter private static final CharWidthMapper instance = new CharWidthMapper(); + public static CharWidthMapper getInstance() { + return instance; + } + private final Map charWidthMap; public CharWidthMapper() { diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/util/ApplicationProperties.java b/src/main/java/nl/andrewlalis/blockbookbinder/util/ApplicationProperties.java index 63ad45c..b4ec4ec 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/util/ApplicationProperties.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/util/ApplicationProperties.java @@ -1,7 +1,5 @@ package nl.andrewlalis.blockbookbinder.util; -import lombok.Getter; - import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -13,7 +11,6 @@ import java.util.Properties; */ public class ApplicationProperties { private static ApplicationProperties instance; - @Getter private final Properties properties; private final Map intPropCache; @@ -30,6 +27,10 @@ public class ApplicationProperties { return instance; } + public Properties getProperties() { + return properties; + } + /** * Shortcut for getting a property. * @param key The property's key. diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/view/book/BookPreviewPanel.java b/src/main/java/nl/andrewlalis/blockbookbinder/view/book/BookPreviewPanel.java index 7597f6a..bbf0f74 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/view/book/BookPreviewPanel.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/view/book/BookPreviewPanel.java @@ -1,6 +1,5 @@ package nl.andrewlalis.blockbookbinder.view.book; -import lombok.Getter; import nl.andrewlalis.blockbookbinder.model.Book; import nl.andrewlalis.blockbookbinder.model.BookPage; import nl.andrewlalis.blockbookbinder.util.IconLoader; @@ -15,7 +14,6 @@ import java.io.InputStream; * A customized panel that's dedicated to showing a book's contents. */ public class BookPreviewPanel extends JPanel { - @Getter private Book book; private int currentPage = 0; @@ -134,6 +132,10 @@ public class BookPreviewPanel extends JPanel { this.displayCurrentPage(); } + public Book getBook() { + return book; + } + public void updateCurrentPageModel() { ignoreCurrentPageChange = true; currentPageNumberModel.setValue(currentPage + 1); diff --git a/src/main/java/nl/andrewlalis/blockbookbinder/view/export/ExportStatusPanel.java b/src/main/java/nl/andrewlalis/blockbookbinder/view/export/ExportStatusPanel.java index 052e118..bf1f39f 100644 --- a/src/main/java/nl/andrewlalis/blockbookbinder/view/export/ExportStatusPanel.java +++ b/src/main/java/nl/andrewlalis/blockbookbinder/view/export/ExportStatusPanel.java @@ -1,7 +1,5 @@ package nl.andrewlalis.blockbookbinder.view.export; -import lombok.Getter; - import javax.swing.*; import java.awt.*; @@ -10,11 +8,8 @@ import java.awt.*; * job. */ public class ExportStatusPanel extends JPanel { - @Getter private final JLabel statusLabel; - @Getter private final JTextArea outputTextArea; - @Getter private final JProgressBar exportProgressBar; public ExportStatusPanel() { @@ -35,4 +30,16 @@ public class ExportStatusPanel extends JPanel { this.exportProgressBar = new JProgressBar(); this.add(this.exportProgressBar, BorderLayout.SOUTH); } + + public JLabel getStatusLabel() { + return statusLabel; + } + + public JTextArea getOutputTextArea() { + return outputTextArea; + } + + public JProgressBar getExportProgressBar() { + return exportProgressBar; + } }