X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=78a81ef85f7d59b261cb123e60774f3b93d46779;hb=6f8ff91a29056209f9fd5f40e2dcf1ae285e0210;hp=b4c53ec3a5ea8899db40c6dbdda283abe85153f7;hpb=499fdccfad144aa58869d839d50edb898670626a;p=fanfix.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index b4c53ec..78a81ef 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -2720,6 +2720,37 @@ public class TApplication implements Runnable { return new TTerminalWindow(this, x, y, flags); } + /** + * 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 commandLine the command line to execute + * @return the terminal new window + */ + public final TTerminalWindow openTerminal(final int x, final int y, + final String commandLine) { + + 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 commandLine 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 commandLine) { + + return new TTerminalWindow(this, x, y, flags, commandLine); + } + /** * Convenience function to spawn an file open box. *