Increased default char width.
This commit is contained in:
parent
dc88ca8c4c
commit
e1036940f9
28
pom.xml
28
pom.xml
|
@ -13,6 +13,34 @@
|
|||
<maven.compiler.target>12</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>nl.andrewlalis.blockbookbinder.BlockBookBinder</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
|
||||
<dependency>
|
||||
|
|
|
@ -13,6 +13,10 @@ import java.awt.event.ActionListener;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Action listener that is used for when a user decides to begin exporting a
|
||||
* book to minecraft.
|
||||
*/
|
||||
public class BookExportActionListener implements ActionListener {
|
||||
private final BookPreviewPanel bookPreviewPanel;
|
||||
private final Clipboard clipboard;
|
||||
|
|
|
@ -14,7 +14,7 @@ public class CharWidthMapper {
|
|||
}
|
||||
|
||||
public int getWidth(char c) {
|
||||
return this.charWidthMap.getOrDefault(c, 0);
|
||||
return this.charWidthMap.getOrDefault(c, 6);
|
||||
}
|
||||
|
||||
private void initCharWidthMap() {
|
||||
|
|
|
@ -26,11 +26,6 @@ public class SourceTextPanel extends JPanel {
|
|||
this.textArea = new JTextArea();
|
||||
this.textArea.setWrapStyleWord(true);
|
||||
this.textArea.setLineWrap(true);
|
||||
try {
|
||||
this.textArea.setText(Files.readString(Path.of(this.getClass().getClassLoader().getResource("sample/lorem_ipsum.txt").toURI())));
|
||||
} catch (IOException | URISyntaxException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
JScrollPane scrollWrappedMainTextArea = new JScrollPane(this.textArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
this.add(scrollWrappedMainTextArea, BorderLayout.CENTER);
|
||||
|
||||
|
|
Loading…
Reference in New Issue