Package org.jboss.aesh.terminal

Examples of org.jboss.aesh.terminal.TerminalColor


*/
public abstract class ShellMessages
{
   public static void success(final PrintStream writer, final String message)
   {
      writer.print(new TerminalString("***SUCCESS*** ", new TerminalColor(Color.GREEN, Color.DEFAULT)));
      writer.println(message);
   }
View Full Code Here


      writer.println(message);
   }

   public static void error(final PrintStream writer, final String message)
   {
      writer.print(new TerminalString("***ERROR*** ", new TerminalColor(Color.RED, Color.DEFAULT)));
      writer.println(message);
   }
View Full Code Here

      writer.println(message);
   }

   public static void info(final PrintStream writer, final String message)
   {
      writer.print(new TerminalString("***INFO*** ", new TerminalColor(Color.BLUE, Color.DEFAULT)));
      writer.println(message);
   }
View Full Code Here

      writer.println(message);
   }

   public static void warn(final PrintStream writer, final String message)
   {
      writer.print(new TerminalString("***WARNING*** ", new TerminalColor(Color.YELLOW, Color.DEFAULT)));
      writer.println(message);
   }
View Full Code Here

         }
         for (String plugin : similarPlugins)
         {
            shell.out().println(
                     new TerminalString("\t" + plugin,
                              new TerminalColor(Color.DEFAULT, Color.DEFAULT, Intensity.BRIGHT)));
         }
      }

   }
View Full Code Here

      {
         String name = commandFactory.getCommandName(context.getUIContext(), controller.getCommand());
         UICommandMetadata metadata = controller.getMetadata();
         display.add(metadata.getCategory()
                  + " > "
                  + new TerminalString(name, new TerminalColor(controller.isEnabled() ? Color.CYAN : Color.RED,
                           Color.DEFAULT)).toString() + " - " + metadata.getDescription());
      }

      UIOutput output = context.getUIContext().getProvider().getOutput();
      PrintStream out = output.out();
View Full Code Here

   public static String colorizeResource(FileResource<?> resource)
   {
      String name = resource.getName();
      if (resource.isDirectory())
      {
         name = new TerminalString(name, new TerminalColor(Color.BLUE, Color.DEFAULT)).toString();
      }
      else if (resource.isExecutable())
      {
         name = new TerminalString(name, new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
      }
      return name;
   }
View Full Code Here

   public static String colorizeJavaMethodResource(JavaMethodResource resource)
   {
      String name = resource.getName();
      String[] splitName = name.split("(?=\\:\\:)"); // split with "::" but preserve delimiter
      return splitName[0] + new TerminalString(splitName[1], new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
   }
View Full Code Here

   public static String colorizeJavaFieldResource(JavaFieldResource resource)
   {
      String name = resource.getName();
      String[] splitName = name.split("(?=\\:\\:)"); // split with "::" but preserve delimiter
      return splitName[0] + new TerminalString(splitName[1], new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
   }
View Full Code Here

      return splitName[0] + new TerminalString(splitName[1], new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
   }

   public static String colorizeLabel(String label)
   {
      return new TerminalString(label, new TerminalColor(Color.RED, Color.DEFAULT)).toString();
   }
View Full Code Here

TOP

Related Classes of org.jboss.aesh.terminal.TerminalColor

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.