Examples of Ansi


Examples of com.fathomdb.cli.commands.Ansi

    return new SimpleAutoCompleter(new AutoCompleteItemType());
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, false);
    }

    ansi.reset();
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

    } else {
      super.formatRaw(o, writer);
      return;
    }

    Ansi ansi = new Ansi(writer);

    ansi.print(data);
    ansi.println();

    ansi.reset();
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

    return client.listRoots();
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, true);
    }

    ansi.reset();
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

      } catch (IOException e) {
        throw new CliException("Error formatting for output", e);
      }
    }

    Ansi ansi = new Ansi(writer);

    for (JobData job : jobs.getJobs()) {
      // JobState state = job.state;
      // if (state != null) {
      // ansi.setColorBlue();
      // switch (job.state) {
      // case FAILED:
      // ansi.setColorRed();
      // break;
      //
      // case SUCCESS:
      // ansi.setColorGreen();
      // break;
      //
      // case RUNNING:
      // ansi.setColorBlue();
      // break;
      //
      // default:
      // ansi.setColorBlue();
      // break;
      // }
      // }

      writer.println(job.key);
    }

    ansi.reset();
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

      } catch (IOException e) {
        throw new CliException("Error formatting for output", e);
      }
    }

    Ansi ansi = new Ansi(writer);

    for (JobExecutionData job : jobs) {
      JobState state = job.state;
      if (state != null) {
        switch (job.state) {
        case FAILED:
          ansi.setColorRed();
          break;

        case SUCCESS:
          ansi.setColorGreen();
          break;

        case RUNNING:
          ansi.setColorBlue();
          break;

        default:
          ansi.setColorBlue();
          break;
        }
      } else {
        ansi.setColorBlue();
      }

      writer.println(job.getJobId() + "/" + job.executionId);
    }

    ansi.reset();
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

  int depth;
  String indent;

  public JobLogPrinter(PrintWriter writer) {
    this.writer = writer;
    this.ansi = new Ansi(writer);
  }
View Full Code Here

Examples of com.fathomdb.cli.commands.Ansi

    return client.listChildren(key, includeDeleted);
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, true);
    }

    ansi.reset();
  }
View Full Code Here

Examples of com.strobel.io.Ansi

            sb.append(DELIMITER.colorize(String.valueOf(delimiter)));

            final String typeName = s.substring(packagePrefix.length());
            final String[] typeParts = typeName.split("\\$|\\.");
            final Ansi typeColor = resolvedType != null && resolvedType.isAnnotation() ? ATTRIBUTE : TYPE;
            final boolean dollar = typeName.indexOf('$') >= 0;

            for (int i = 0; i < typeParts.length; i++) {
                if (i != 0) {
                    sb.append(DELIMITER.colorize(dollar ? "$" : "."));
                }

                sb.append(typeColor.colorize(typeParts[i]));
            }

            if (isSignature) {
                sb.append(';');
            }
View Full Code Here

Examples of jlibs.core.lang.Ansi

    public String format(LogRecord logRecord) {
        // Create a StringBuffer to contain the formatted record
        // start with the date.
        StringBuffer sb = new StringBuffer();

        Ansi ansi = ansiForLevel(logRecord.getLevel());
        sb.append(ansi.colorize('[' + logRecord.getLevel().getName() + ']')).append(' ');

        // Get the formatted message (includes localization
        // and substitution of paramters) and add it to the buffer
        sb.append(formatMessage(logRecord));
        sb.append('\n');
View Full Code Here

Examples of org.fusesource.jansi.Ansi

    public TextArea getMainArea() {
        return textArea;
    }

    private void render(Action<Ansi> action) {
        Ansi ansi = createAnsi();
        action.execute(ansi);
        try {
            target.append(ansi.toString());
            flushable.flush();
        } catch (IOException e) {
            throw new UncheckedIOException(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.