X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FSwingComponent.java;h=4b0b2b4d079bc2f8b9d43bbc7ad10ab268852438;hb=d36057dfab8def933a64be042b039d76708ac5ba;hp=48e4a44fa6b5b9f2db1765ec8f700f78137d38b3;hpb=eb29bbb5ec70c43895dd0f053630c7e3cd402cba;p=fanfix.git diff --git a/src/jexer/backend/SwingComponent.java b/src/jexer/backend/SwingComponent.java index 48e4a44..4b0b2b4 100644 --- a/src/jexer/backend/SwingComponent.java +++ b/src/jexer/backend/SwingComponent.java @@ -52,11 +52,53 @@ import javax.swing.JFrame; */ class SwingComponent { + // ------------------------------------------------------------------------ + // Variables -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * If true, use triple buffering when drawing to a JFrame. */ public static boolean tripleBuffer = true; + /** + * The frame reference, if we are drawing to a JFrame. + */ + private JFrame frame; + + /** + * The component reference, if we are drawing to a JComponent. + */ + private JComponent component; + + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ + + /** + * Construct using a JFrame. + * + * @param frame the JFrame to draw to + */ + public SwingComponent(final JFrame frame) { + this.frame = frame; + setupFrame(); + } + + /** + * Construct using a JComponent. + * + * @param component the JComponent to draw to + */ + public SwingComponent(final JComponent component) { + this.component = component; + setupComponent(); + } + + // ------------------------------------------------------------------------ + // SwingComponent --------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Get the BufferStrategy object needed for triple-buffering. * @@ -73,16 +115,6 @@ class SwingComponent { } } - /** - * The frame reference, if we are drawing to a JFrame. - */ - private JFrame frame; - - /** - * The component reference, if we are drawing to a JComponent. - */ - private JComponent component; - /** * Get the JFrame reference. * @@ -101,26 +133,6 @@ class SwingComponent { return component; } - /** - * Construct using a JFrame. - * - * @param frame the JFrame to draw to - */ - public SwingComponent(final JFrame frame) { - this.frame = frame; - setupFrame(); - } - - /** - * Construct using a JComponent. - * - * @param component the JComponent to draw to - */ - public SwingComponent(final JComponent component) { - this.component = component; - setupComponent(); - } - /** * Setup to render to an existing JComponent. */