Package org.crsh.text.ui

Examples of org.crsh.text.ui.TableElement.row()


          + (file.canExecute() ? "x" : "-")
          ;
      String length = Long.toString(file.length());
      date.setTime(file.lastModified());
      String lastModified = format.format(date);
      table.row(
        mode,
        length,
        lastModified,
        file.getName()
      );
View Full Code Here


      } else {
        level = "UNKNOWN";
      }

      //
      table.row(logger.getName(), level);
    }

    //
    return table.renderer();
  }
View Full Code Here

      long seconds = times2.get(thread.getId()) / 1000000000;
      long min = seconds / 60;
      String time = min + ":" + (seconds % 60);
      long cpu = cpus.get(thread);
      ThreadGroup group = thread.getThreadGroup();
      table.row(
          new LabelElement(thread.getId()),
          new LabelElement(thread.getName()),
          new LabelElement(group == null ? "" : group.getName()),
          new LabelElement(thread.getPriority()),
          new LabelElement(thread.getState()).style(c.fg()),
View Full Code Here

        description = "";
        mxbean = "";
      }

      //
      table.row("" + name, className, mxbean, description);
    }

    //
    return table.renderer();
  }
View Full Code Here

          rightCellPadding(1);
      Descriptor descriptorInfo = info.getDescriptor();
      if (descriptorInfo != null) {
        for (String fieldName : descriptorInfo.getFieldNames()) {
          String fieldValue = String.valueOf(descriptorInfo.getFieldValue(fieldName));
          descriptor.row(fieldName, fieldValue);
        }
      }

      // Attributes
      TableElement attributes = new TableElement().
View Full Code Here

      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()) {
View Full Code Here

        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:
View Full Code Here

        }
      }

      //
      TableElement table = new TableElement().rightCellPadding(1);
      table.row(
        new LabelElement("NAME").style(Style.style(Decoration.bold)),
        new LabelElement("DISPLAY NAME"),
        new LabelElement("DESCRIPTION"),
        new LabelElement("ACTIVE")
      );
View Full Code Here

      for (Map.Entry<Repl, Boolean> entry : repls.entrySet()) {
        Boolean active = entry.getValue();
        String langDescription = entry.getKey().getDescription();
        String langDisplayName = entry.getKey().getLanguage().getDisplayName();
        String langName = entry.getKey().getLanguage().getName();
        table.row(
          new LabelElement(langName).style(Style.style(Color.red)),
          new LabelElement(langDisplayName != null ? langDisplayName : ""),
          new LabelElement(langDescription != null ? langDescription : ""),
          new LabelElement(active)
        );
View Full Code Here

  @Command
  public void main(InvocationContext<Object> context) throws Exception {

    //
    TableElement table = new TableElement().rightCellPadding(1);
    table.row(
      new LabelElement("NAME").style(Style.style(Decoration.bold)),
      new LabelElement("DESCRIPTION")
    );

    //
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.