X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=cfa81f4bab05f6508cdbefe7acb53ed096a1df1e;hb=a0d734e68fc28e441d74075e4d8d0166bbcde180;hp=e319a4df410dba7ae7c7ab552dfa1d5e824fb47d;hpb=9ff1c0e327bfa10c154cdb051d9c15a8fa96e7f8;p=fanfix.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index e319a4d..cfa81f4 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -2836,6 +2836,22 @@ public class TApplication implements Runnable { return openTerminal(x, y, TWindow.RESIZABLE, commandLine); } + /** + * Convenience function to open a terminal window and execute a custom + * command line inside it. + * + * @param x column relative to parent + * @param y row relative to parent + * @param flags mask of CENTERED, MODAL, or RESIZABLE + * @param command the command line to execute + * @return the terminal new window + */ + public final TTerminalWindow openTerminal(final int x, final int y, + final int flags, final String [] command) { + + return new TTerminalWindow(this, x, y, flags, command); + } + /** * Convenience function to open a terminal window and execute a custom * command line inside it. @@ -2849,7 +2865,7 @@ public class TApplication implements Runnable { public final TTerminalWindow openTerminal(final int x, final int y, final int flags, final String commandLine) { - return new TTerminalWindow(this, x, y, flags, commandLine); + return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s")); } /**