#33 expose SwingComponent
authorKevin Lamonte <kevin.lamonte@gmail.com>
Sat, 7 Apr 2018 16:35:15 +0000 (12:35 -0400)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Sat, 7 Apr 2018 16:35:15 +0000 (12:35 -0400)
src/jexer/backend/SwingBackend.java
src/jexer/backend/SwingSessionInfo.java
src/jexer/backend/SwingTerminal.java

index bfbd07e2c4b64194e170211d0e43466f84d216e7..797caa821fbe9f14e1e8259fef86f1abc2368182 100644 (file)
@@ -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();
+    }
+
 }
index b19c60f6a38e183b95781e46dbe8e12d116ddb89..6d1c644fd5498ad571031fbe8830a8a81985288b 100644 (file)
@@ -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;
+    }
+
 }
index f588679ddf8888671ef01103559f80b736238f35..3f5b58e3577707dd5f0474fde7f6819390909a4d 100644 (file)
@@ -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 ------------------------------------------------------------
     // ------------------------------------------------------------------------