Package org.crsh.text.ui

Examples of org.crsh.text.ui.RowElement


  @Override
  public LineRenderer renderer(Iterator<Logger> stream) {
    TableElement table = new TableElement();

    // Header
    table.add(new RowElement().style(Decoration.bold.fg(Color.black).bg(Color.white)).add("NAME", "LEVEL"));

    //
    while (stream.hasNext()) {
      Logger logger = stream.next();
View Full Code Here


    //
    TableElement table = new TableElement(1,3,2,1,1,1,1,1,1).overflow(Overflow.HIDDEN).rightCellPadding(1);

    // Header
    table.add(
      new RowElement().style(Decoration.bold.fg(Color.black).bg(Color.white)).add(
        "ID",
        "NAME",
        "GROUP",
        "PRIORITY",
        "STATE",
View Full Code Here

  @Override
  public LineRenderer renderer(Iterator<BindingData> stream) {

    TableElement table = new TableElement();
    table.setRightCellPadding(1);
    RowElement header = new RowElement(true);
    header.add("NAME");
    table.add(header);

    while (stream.hasNext()) {
      BindingData binding = stream.next();

      RowElement row = new RowElement();

       row.add(binding.name);

      if (binding.verbose) {
        row.add(new LabelElement(binding.type));
        if (header.getSize() == 1) {
          header.add("CLASS");
        }
      }
     
View Full Code Here

    //
    TableElement table = new TableElement().overflow(Overflow.HIDDEN).rightCellPadding(1);

    // Header
    table.add(
      new RowElement().
        style(Decoration.bold.fg(Color.black).bg(Color.white)).
        add("NAME", "CLASSNAME", "MXBEAN", "DESCRIPTION")
    );

    //
View Full Code Here

        if (!current.equals(bilto)) {
          if (table.getRows().size() > 0) {
            renderers.add(table.renderer());
          }
          table = new TableElement().rightCellPadding(1);
          RowElement header = new RowElement(true);
          header.style(Decoration.bold.fg(Color.black).bg(Color.white));
          for (String s : bilto) {
            header.add(s);
          }
          table.add(header);
          current = bilto;
        }

        //
        RowElement r = new RowElement();
        for (String s : bilto) {
          r.add(String.valueOf(row.get(s)));
        }
        table.add(r);
      }
    }
View Full Code Here

      // Attributes
      TableElement attributes = new TableElement().
          overflow(Overflow.HIDDEN).
          rightCellPadding(1).
          add(new RowElement().style(Decoration.bold.fg(Color.black).bg(Color.white)).add("NAME", "TYPE", "DESCRIPTION"));
      for (MBeanAttributeInfo attributeInfo : info.getAttributes()) {
        attributes.row(attributeInfo.getName(), attributeInfo.getType(), attributeInfo.getDescription());
      }

      // Operations
      TreeElement operations = new TreeElement("Operations");
      for (MBeanOperationInfo operationInfo : info.getOperations()) {
        TableElement signature = new TableElement().
            overflow(Overflow.HIDDEN).
            rightCellPadding(1);
        MBeanParameterInfo[] parameterInfos = operationInfo.getSignature();
        for (MBeanParameterInfo parameterInfo : parameterInfos) {
          signature.row(parameterInfo.getName(), parameterInfo.getType(), parameterInfo.getDescription());
        }
        TreeElement operation = new TreeElement(operationInfo.getName());
        String impact;
        switch (operationInfo.getImpact()) {
          case MBeanOperationInfo.ACTION:
            impact = "ACTION";
            break;
          case MBeanOperationInfo.INFO:
            impact = "INFO";
            break;
          case MBeanOperationInfo.ACTION_INFO:
            impact = "ACTION_INFO";
            break;
          default:
            impact = "UNKNOWN";
        }
        operation.addChild(new TableElement().
            add(
                new RowElement().add("Type: ", operationInfo.getReturnType()),
                new RowElement().add("Description: ", operationInfo.getDescription()),
                new RowElement().add("Impact: ", impact),
                new RowElement().add(new LabelElement("Signature: "), signature)
            )
        );

        operations.addChild(operation);
      }
View Full Code Here

TOP

Related Classes of org.crsh.text.ui.RowElement

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.