X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FSwingBackend.java;h=281670d1d1bcde2e1eb174cbb515a319d89df481;hb=3e0743556d1f31723a11a6019b5c2b018b4b2104;hp=fc77968154e2802dac6aea4edbc09af6bb3c38c9;hpb=d79f1f31b1c036712b4e7f0bbfde980f212c3a3a;p=fanfix.git diff --git a/src/jexer/backend/SwingBackend.java b/src/jexer/backend/SwingBackend.java index fc77968..281670d 100644 --- a/src/jexer/backend/SwingBackend.java +++ b/src/jexer/backend/SwingBackend.java @@ -37,6 +37,13 @@ import javax.swing.JComponent; */ public final class SwingBackend extends GenericBackend { + /** + * Public constructor. The window will be 80x25 with font size 20 pts. + */ + public SwingBackend() { + this(null, 80, 25, 20); + } + /** * Public constructor. The window will be 80x25 with font size 20 pts. * @@ -47,6 +54,30 @@ public final class SwingBackend extends GenericBackend { this(listener, 80, 25, 20); } + /** + * Public constructor will spawn a new JFrame with font size 20 pts. + * + * @param windowWidth the number of text columns to start with + * @param windowHeight the number of text rows to start with + */ + public SwingBackend(final int windowWidth, final int windowHeight) { + this(null, windowWidth, windowHeight, 20); + } + + /** + * Public constructor will spawn a new JFrame. + * + * @param windowWidth the number of text columns to start with + * @param windowHeight the number of text rows to start with + * @param fontSize the size in points. Good values to pick are: 16, 20, + * 22, and 24. + */ + public SwingBackend(final int windowWidth, final int windowHeight, + final int fontSize) { + + this(null, windowWidth, windowHeight, fontSize); + } + /** * Public constructor will spawn a new JFrame. *