git://git.nikiroo.be
/
nikiroo-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
159f076
)
addEditor()
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 23 Aug 2017 00:15:41 +0000
(20:15 -0400)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 23 Aug 2017 00:15:41 +0000
(20:15 -0400)
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index abd69ca7cca11e537805dae99cf69ebe3fe47661..4457197caeec733fbea251085b9105e1ec4e9940 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-28,6
+28,7
@@
*/
package jexer;
*/
package jexer;
+import java.io.File;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
@@
-2755,6
+2756,7
@@
public class TApplication implements Runnable {
TWindow window = new TWindow(this, title, 0, 0, width, height);
return window;
}
TWindow window = new TWindow(this, title, 0, 0, width, height);
return window;
}
+
/**
* Convenience function to create a new window and make it active.
* Window will be located at (0, 0).
/**
* Convenience function to create a new window and make it active.
* Window will be located at (0, 0).
@@
-2805,4
+2807,17
@@
public class TApplication implements Runnable {
return window;
}
return window;
}
+ /**
+ * Convenience function to open a file in an editor window and make it
+ * active.
+ *
+ * @param file the file to open
+ * @throws IOException if a java.io operation throws
+ */
+ public final TEditorWindow addEditor(final File file) throws IOException {
+
+ TEditorWindow editor = new TEditorWindow(this, file);
+ return editor;
+ }
+
}
}