Remove or move java.awt dependencies
[fanfix.git] / src / be / nikiroo / fanfix / reader / TuiReader.java
diff --git a/src/be/nikiroo/fanfix/reader/TuiReader.java b/src/be/nikiroo/fanfix/reader/TuiReader.java
deleted file mode 100644 (file)
index 30b9dce..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package be.nikiroo.fanfix.reader;
-
-import java.io.IOException;
-
-import jexer.TApplication;
-import jexer.TApplication.BackendType;
-import be.nikiroo.fanfix.Instance;
-
-/**
- * This {@link Reader}is based upon the TUI widget library 'jexer'
- * (https://github.com/klamonte/jexer/) and offer, as its name suggest, a Text
- * User Interface.
- * <p>
- * It is expected to be on par with the GUI version.
- * 
- * @author niki
- */
-class TuiReader extends BasicReader {
-       /**
-        * Will detect the backend to use.
-        * <p>
-        * Swing is the default backend on Windows and MacOS while evreything else
-        * will use XTERM unless explicitly overridden by <tt>jexer.Swing</tt> =
-        * <tt>true</tt> or <tt>false</tt>.
-        * 
-        * @return the backend to use
-        */
-       private static BackendType guessBackendType() {
-               // TODO: allow a config option to force one or the other?
-               TApplication.BackendType backendType = TApplication.BackendType.XTERM;
-               if (System.getProperty("os.name").startsWith("Windows")) {
-                       backendType = TApplication.BackendType.SWING;
-               }
-
-               if (System.getProperty("os.name").startsWith("Mac")) {
-                       backendType = TApplication.BackendType.SWING;
-               }
-
-               if (System.getProperty("jexer.Swing") != null) {
-                       if (System.getProperty("jexer.Swing", "false").equals("true")) {
-                               backendType = TApplication.BackendType.SWING;
-                       } else {
-                               backendType = TApplication.BackendType.XTERM;
-                       }
-               }
-
-               return backendType;
-       }
-
-       @Override
-       public void read() throws IOException {
-               try {
-                       TuiReaderApplication app = new TuiReaderApplication(this,
-                                       guessBackendType());
-                       new Thread(app).start();
-               } catch (Exception e) {
-                       Instance.getTraceHandler().error(e);
-               }
-       }
-
-       @Override
-       public void browse(String source) {
-               try {
-                       TuiReaderApplication app = new TuiReaderApplication(this, source,
-                                       guessBackendType());
-                       new Thread(app).start();
-               } catch (Exception e) {
-                       Instance.getTraceHandler().error(e);
-               }
-       }
-}