Examples of Console


Examples of com.vaadin.terminal.gwt.client.Console

            final Element target = event.getTarget().cast();

            if (!DOM.isOrHasChild(getElement(), target)) {
                // not within the modal window, but let's see if it's in the
                // debug window
                Console console = ApplicationConnection.getConsole();
                if (console instanceof VDebugConsole
                        && DOM.isOrHasChild(((VDebugConsole) console)
                                .getElement(), target)) {
                    return true; // allow debug-window clicks
                }
View Full Code Here

Examples of com.whatevernot.script.Console

   * @param args The command line arguments.
   * @throws Exception If an error occurs.
   */
  public static void main(String[] args) throws Exception
  {
    Console console = new Console();
    console.console();
  }
View Full Code Here

Examples of com.xensource.xenapi.Console

        return new ReadyAnswer(cmd);
    }

    protected String getVncUrl(Connection conn, VM vm) {
        VM.Record record;
        Console c;
        try {
            record = vm.getRecord(conn);
            Set<Console> consoles = record.consoles;

            if (consoles.isEmpty()) {
                s_logger.warn("There are no Consoles available to the vm : " + record.nameDescription);
                return null;
            }
            Iterator<Console> i = consoles.iterator();
            while(i.hasNext()) {
                c = i.next();
                if(c.getProtocol(conn) == ConsoleProtocol.RFB)
                    return c.getLocation(conn);
            }
        } catch (XenAPIException e) {
            String msg = "Unable to get console url due to " + e.toString();
            s_logger.warn(msg, e);
            return null;
View Full Code Here

Examples of groovy.ui.Console

        java.util.logging.Logger.getLogger(StackTraceUtils.STACK_LOG_NAME).setUseParentHandlers(true);

        //when starting via main set the look and feel to system
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

        final Console console = new Console(Console.class.getClassLoader());
        console.setBeforeExecution(new Closure(null) {
          public void doCall() {
            console.setShell(new GroovyShell(Console.class.getClassLoader(), new Binding()) {
              public Object run(String scriptText, String fileName, String[] args) throws org.codehaus.groovy.control.CompilationFailedException {
                return super.run(IMPORTS + scriptText, fileName, args);
              };
            });
          }
    });
        console.run();
        if (args.length == 1) {
          console.loadScriptFile(new File(args[0]));
        }
  }
View Full Code Here

Examples of groovy.ui.Console

    public static Console openConsole(final Component parent, final ClientModel model, final String file) {
        try {
            parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

            Console console = new Console(parent.getClass().getClassLoader());
            console.setVariable("session", model.getClientSession().getSession());
            console.setVariable("binding", model.getClientSession().getSession().getBinding());

            console.run();

            JMenu cmisMenu = new JMenu("CMIS");
            console.getFrame().getRootPane().getJMenuBar().add(cmisMenu);

            addConsoleMenu(cmisMenu, "CMIS 1.0 Specification", new URI(
                    "http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html"));
            addConsoleMenu(cmisMenu, "OpenCMIS Documentation",
                    new URI("http://chemistry.apache.org/java/opencmis.html"));
            addConsoleMenu(cmisMenu, "OpenCMIS Client API JavaDoc", new URI(
                    "http://chemistry.apache.org/java/0.4.0/maven/apidocs/"));

            console.getInputArea().setText(ClientHelper.readFileAndRemoveHeader(file));

            return console;
        } catch (Exception ex) {
            ClientHelper.showError(null, ex);
            return null;
View Full Code Here

Examples of java.io.Console

       if (_cmd.hasOption(BST_PASSWORD_OPT_CHAR))
       {
         String pwd = _cmd.getOptionValue(BST_PASSWORD_OPT_CHAR);
         if (null == pwd)
         {
           Console console = System.console();
           if (null == console)
           {
             printError("no password specified", true);
             return false;
           }
           char[] pwdChars = console.readPassword("Enter bootstrap MySQL password:");
           if (null == pwdChars)
           {
             printError("no password specified", true);
             return false;
           }
View Full Code Here

Examples of java.io.Console

            }
        }
    }

    public static void main(String[] args) {
        Console con = System.console();
        FootballManager manager = new FootballManager(System.console());
        con.printf(initialPrompt);

        while (true) {
            String action = con.readLine(">");
            if ("at".equals(action)) {
                manager.addTeam();
            } else if ("ap".equals(action)) {
                manager.addPlayers();
            } else if ("rt".equals(action)) {
View Full Code Here

Examples of java.io.Console

    public void stop() {
        cacheManager.stop();
    }

    public static void main(String[] args) {
        Console con = System.console();
        FootballManager manager = new FootballManager(System.console());
        con.printf(initialPrompt);

        while (true) {
            String action = con.readLine(">");
            if ("at".equals(action)) {
                manager.addTeam();
            } else if ("ap".equals(action)) {
                manager.addPlayers();
            } else if ("rt".equals(action)) {
View Full Code Here

Examples of java.io.Console

            }
        }
    }

    public static void main(String[] args) {
        Console con = System.console();
        FootballManager manager = new FootballManager(System.console());
        con.printf(initialPrompt);

        while (true) {
            String action = con.readLine(">");
            if ("at".equals(action)) {
                manager.addTeam();
            } else if ("ap".equals(action)) {
                manager.addPlayers();
            } else if ("rt".equals(action)) {
View Full Code Here

Examples of java.io.Console

        return false;
    }
   
    private static String askForPasswd(String filePath){
        try {
            Console cons = System.console();
            String passwd = null;
            if (cons != null){
                char[] p = cons.readPassword("%s", "Enter passphrase for "+filePath+":");
                passwd = String.valueOf(p);
            }
            return passwd;
        } catch (LinkageError e) {
            throw new Error("Your private key is encrypted, but we need Java6 to ask you password safely",e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.