Removed lombok.
This commit is contained in:
parent
67915ffdf1
commit
0ad1cef2d0
8
pom.xml
8
pom.xml
|
@ -42,14 +42,6 @@
|
|||
</build>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.14</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.1stleg/jnativehook -->
|
||||
<dependency>
|
||||
<groupId>com.1stleg</groupId>
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<BookPage> pages;
|
||||
|
||||
public Book() {
|
||||
|
@ -18,6 +16,10 @@ public class Book {
|
|||
return this.pages.size();
|
||||
}
|
||||
|
||||
public List<BookPage> getPages() {
|
||||
return pages;
|
||||
}
|
||||
|
||||
public void addPage(BookPage page) {
|
||||
this.pages.add(page);
|
||||
}
|
||||
|
|
|
@ -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<Character, Integer> charWidthMap;
|
||||
|
||||
public CharWidthMapper() {
|
||||
|
|
|
@ -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<String, Integer> 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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue