From: Kevin Lamonte Date: Sat, 7 Apr 2018 16:35:15 +0000 (-0400) Subject: #33 expose SwingComponent X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=a2855f1dd3ca42b61ac4c47a18e2253ea32dd56e;p=fanfix-jexer.git #33 expose SwingComponent --- diff --git a/src/jexer/backend/SwingBackend.java b/src/jexer/backend/SwingBackend.java index bfbd07e..797caa8 100644 --- a/src/jexer/backend/SwingBackend.java +++ b/src/jexer/backend/SwingBackend.java @@ -155,4 +155,13 @@ public class SwingBackend extends GenericBackend { return ((SwingTerminal) terminal).getBlinkMillis(); } + /** + * Getter for the underlying Swing component. + * + * @return the SwingComponent + */ + public SwingComponent getSwingComponent() { + return ((SwingTerminal) terminal).getSwingComponent(); + } + } diff --git a/src/jexer/backend/SwingSessionInfo.java b/src/jexer/backend/SwingSessionInfo.java index b19c60f..6d1c644 100644 --- a/src/jexer/backend/SwingSessionInfo.java +++ b/src/jexer/backend/SwingSessionInfo.java @@ -207,4 +207,13 @@ public class SwingSessionInfo implements SessionInfo { this.textHeight = textHeight; } + /** + * Getter for the underlying Swing component. + * + * @return the SwingComponent + */ + public SwingComponent getSwingComponent() { + return swing; + } + } diff --git a/src/jexer/backend/SwingTerminal.java b/src/jexer/backend/SwingTerminal.java index f588679..3f5b58e 100644 --- a/src/jexer/backend/SwingTerminal.java +++ b/src/jexer/backend/SwingTerminal.java @@ -1387,6 +1387,15 @@ public class SwingTerminal extends LogicalScreen return sessionInfo; } + /** + * Getter for the underlying Swing component. + * + * @return the SwingComponent + */ + public SwingComponent getSwingComponent() { + return swing; + } + // ------------------------------------------------------------------------ // KeyListener ------------------------------------------------------------ // ------------------------------------------------------------------------