Examples of TextTable


Examples of com.sun.faban.common.TextTable

        // Data header
        b.append("Section: ").append(driverName).append(' ').append(label).
                append('\n');
        b.append("Display: Line\n");

        TextTable table = new TextTable(bucketLimit, txTypes + 1);

        // The X axis headers and column headers, or legends
        table.setHeader(0, "Time (s)");
        for (int j = 0; j < txTypes; j++) {
            table.setHeader(j + 1, txNames[j]);
    }

        // The X axis and the data
        for (int i = 0; i < bucketLimit; i++) {
            // The X axis
            table.setField(i, 0, String.format(unitFormat, unit * i));

            // The data
            for (int j = 0; j < txTypes; j++) {
                table.setField(i, j + 1,
                        String.format(dataFormat, rawGraph[j][i]/divider));
            }
        }
        table.format(b);
        b.append('\n');
    }
View Full Code Here

Examples of com.sun.faban.common.TextTable

        // Data header
        b.append("Section: ").append(driverName).append(' ').append(label).
                append('\n');
        b.append("Display: Line\n");

        TextTable table = new TextTable(bucketLimit, txTypes + 1);

        // The X axis headers and column headers, or legends
        table.setHeader(0, "Time (s)");
        for (int j = 0; j < txTypes; j++) {
            table.setHeader(j + 1, txNames[j]);
    }

        // The X axis and the data
        for (int i = 0; i < bucketLimit; i++) {
            // The X axis
            table.setField(i, 0, String.format(unitFormat, unit * i));

            // The data
            for (int j = 0; j < txTypes; j++) {
                double data = 0d;
                if (divider[j][i] != 0) {
                    data = rawGraph[j][i] / (divider2 * divider[j][i]);
        }
                table.setField(i, j + 1, String.format(dataFormat, data));
            }
        }
        table.format(b);
        b.append('\n');
    }
View Full Code Here

Examples of com.sun.faban.common.TextTable

        // Data header
        b.append("Section: ").append(driverName).append(' ').append(label).
                append('\n');
        b.append("Display: Line\n");

        TextTable table = new TextTable(bucketLimit, txTypes + 1);

        // The X axis headers and column headers, or legends
        table.setHeader(0, "Time");
        for (int j = 0; j < txTypes; j++) {
            table.setHeader(j + 1, txNames[j]);
    }

        // The X axis and the data
        for (int i = 0; i < bucketLimit; i++) {
            // The X axis
            table.setField(i, 0, String.format(unitFormat, unit * i));

            // The data
            for (int j = 0; j < txTypes; j++) {
        table.setField(i, j + 1, String.valueOf(histogram[j][i]));
      }
        }
        table.format(b);
        b.append('\n');
    }
View Full Code Here

Examples of com.sun.faban.common.TextTable

        break;

            if (outputTextTable == null) {
                // the number of rows is #of servers (for each interval)
                // One extra column for server name
                outputTextTable = new TextTable(serverEntries.size(), NUM_COLS + 1);

                // the number of columns is the stats that we gather
                //set Header
                outputTextTable.setHeader(0, "Server");
                outputTextTable.setHeader(CURTIME, "Time");
View Full Code Here

Examples of net.sourceforge.javautil.ui.cli.widget.TextTable

    String result = this.captureRawInput(prompt + (defaultFile != null ? "[default=" + defaultFile.getPath().toString("/") + "]" : "") + ": ");
    return "".equals(result.trim()) ? defaultFile : new SystemFile(result);
  }

  public void showTable(UITableModel model) {
    if (model.getRowCount() > 0) new TextTable(model).render(writer);
    this.info("Results: " + model.getRowCount());
  }
View Full Code Here

Examples of org.activiti.karaf.commands.util.TextTable

        if (depList.isEmpty()) {
            out.println("No Activiti Deployments Found.");
            return;
        }

        TextTable txtTable = new TextTable(3);

        txtTable.addHeaders("ID", "Name", "Deployment Time");
        for (Deployment dep : depList) {
            txtTable.addRow(dep.getId(), dep.getName(), formatDate(dep.getDeploymentTime()));
        }
        txtTable.print(out);
    }
View Full Code Here

Examples of org.activiti.karaf.commands.util.TextTable

        if (pdList.isEmpty()) {
            out.println("No Activiti Process Definitions Found.");
            return;
        }

        TextTable txtTable = new TextTable(4);

        txtTable.addHeaders("Definition ID", "Name", "Version", "Resource");
        for (ProcessDefinition pd : pdList) {
            Integer ver = pd.getVersion();
            txtTable.addRow(pd.getId(), pd.getName(), ver.toString(), formatBpmResource(pd.getResourceName()));
        }
        txtTable.print(out);
    }
View Full Code Here

Examples of org.activiti.karaf.commands.util.TextTable

        if (piList.isEmpty()) {
            out.println("No Active Process Instances Found.");
            return;
        }

        TextTable txtTable = new TextTable(3);

        txtTable.addHeaders("Definition ID", "Instance ID", "Executions");
        for (ProcessInstance pi : piList) {
            txtTable.addRow(pi.getProcessDefinitionId(),
                pi.getProcessInstanceId(), getExecutions(rt, pi.getProcessInstanceId()));
        }
        txtTable.print(out);
    }
View Full Code Here

Examples of org.activiti.karaf.commands.util.TextTable

        if (hpiList.isEmpty()) {
            out.println("No History on Activiti Processes.");
            return;
        }

        TextTable txtTable = new TextTable(4);

        txtTable.addHeaders("Definition ID", "Instance ID", "Start Time", "End Time");
        for (HistoricProcessInstance hpi : hpiList) {
            Date endTime = hpi.getEndTime();
            if (endTime == null && !printActive) {
                continue// don't print active instance history if printActive is false - default.
            }
            txtTable.addRow(hpi.getProcessDefinitionId(), hpi.getId(),
                formatDate(hpi.getStartTime()), formatDate(hpi.getEndTime()));
        }
        txtTable.print(out);
    }
View Full Code Here

Examples of org.activiti.karaf.commands.util.TextTable

        final String expectedOutput = " col1                     column2   c3       \n" +
            "[myvalue111111111111111x][myvalue2][myvalue3]\n" +
            "[myvalue1               ][myvalue2][myvalue3]\n" +
            "[myvalue1               ][myvalue2][myvalue3]\n";

        TextTable table = new TextTable(3);
        table.addHeaders(headers);
        table.addRow(row1);
        table.addRow(row2);
        table.addRow(row3);

        table.print(out);
        assertEquals(collectOutput(), expectedOutput);
    }
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.