Package org.apache.geronimo.gshell.ansi

Examples of org.apache.geronimo.gshell.ansi.AnsiRenderWriter


        this.prompt = prompt;
    }

    public String getAboutMessage() {
        StringWriter writer = new StringWriter();
        PrintWriter out = new AnsiRenderWriter(writer);

        out.println("For information about @|cyan " + displayName + "|, visit:");
        out.println("    @|bold " + displayLocation + "| ");
        out.flush();

        if (applicationName != null && applicationVersion != null) {
          out.println();
          out.println(applicationName + " " + applicationVersion);
          out.println();
          if (applicationLocation != null) {
                out.println("For information about @|cyan " + applicationName + "|, visit:");
                out.println("    @|bold " + applicationLocation + "| ");
                out.flush();
          }
        }

        return writer.toString();
    }     
View Full Code Here


        return writer.toString();
    }     
   
    public String getWelcomeMessage() {             
        StringWriter writer = new StringWriter();
        PrintWriter out = new AnsiRenderWriter(writer);
     
        AnsiBuffer buff = new AnsiBuffer();       
               
        for (String line : banner) {
            buff.attrib(line, AnsiCode.CYAN);
            out.println(buff);
        }

        out.println();
        out.println(" @|bold " + displayName + "| (" + displayVersion + ")");
        if (applicationName != null && applicationVersion != null) {
            out.println(" @|bold " + applicationName + "| (" + applicationVersion + ")");
        }
        out.println();
        out.println("Type '@|bold help|' for more information.");
        out.flush();

        return writer.toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gshell.ansi.AnsiRenderWriter

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.