Package org.jnode.driver.console.textscreen

Examples of org.jnode.driver.console.textscreen.TextScreenConsoleManager


        }
        new ShellEmu(argv.length > 0 ? new File(argv[0]) : null).run();
    }

    private void run() throws Exception {
        TextScreenConsoleManager cm = new SwingTextScreenConsoleManager();
        TextScreenConsole console = cm.createConsole(
                "Console 1",
                (ConsoleManager.CreateOptions.TEXT | ConsoleManager.CreateOptions.SCROLLABLE));
        new Thread(new CommandShell(console, true)).start();
    }
View Full Code Here


            final FrameBufferAPI api = dev.getAPI(FrameBufferAPI.class);
            final FrameBufferConfiguration conf = api.getConfigurations()[0];

            g = api.open(conf);

            TextScreenConsoleManager mgr = new TextScreenConsoleManager();

            ScrollableTextScreen ts = new FBConsole.FBPcTextScreen(g).createCompatibleScrollableBufferScreen(500);

            ScrollableTextScreenConsole first =
                new ScrollableTextScreenConsole(mgr, "console", ts,
                    ConsoleManager.CreateOptions.TEXT |
                        ConsoleManager.CreateOptions.SCROLLABLE);

            mgr.registerConsole(first);
            mgr.focus(first);

            new CommandShell(first).run();
            Thread.sleep(60 * 1000);

        } catch (Throwable ex) {
View Full Code Here

            System.out.println("No file specified");
            return;
        }

        ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        TextScreenConsoleManager manager = (TextScreenConsoleManager) sm.getCurrentShell().getConsole().getManager();
        TextConsole console = manager.createConsole(
            "editor",
            (ConsoleManager.CreateOptions.TEXT |
                ConsoleManager.CreateOptions.STACKED |
                ConsoleManager.CreateOptions.NO_LINE_EDITTING |
                ConsoleManager.CreateOptions.NO_SYSTEM_OUT_ERR));
        try {
            manager.focus(console);

            TextEditor te = new TextEditor(console);
            File f = new File(argv[0]);
            te.ro = argv.length == 2 && "ro".equals(argv[1]);
            te.loadFile(f);
        } catch (Exception e) {
            manager.unregisterConsole(console);
            throw e;
        }
    }
View Full Code Here

                return;
            }
        }
        SwingTextScreenConsoleManager cm = new SwingTextScreenConsoleManager();
       
        TextScreenConsoleManager manager = getParentManager();
        if (manager != null) {
            cm.setParent(manager);
        }
       
        TextConsole console = cm.createConsole(
View Full Code Here

            }
        });
    }
   
    private static TextScreenConsoleManager getParentManager() throws NameNotFoundException {
        TextScreenConsoleManager manager = null;
       
        ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        if (sm != null) {
            // current shell is null when JNode boot directly in GUI mode, without going
            // through command line
View Full Code Here

TOP

Related Classes of org.jnode.driver.console.textscreen.TextScreenConsoleManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.