Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: karaf
    • Labels:
      None

      Description

      I have implemented a new table implementation that is very easy to use. I would like to replace the current table impl with it but would like some feedback first.

      The usage of the table can be seen from the ShellTableTest:

      ShellTable table = new ShellTable();
      table.column(new Col("id").alignRight().maxSize(5));
      table.column(new Col("Name").maxSize(20));
      table.column(new Col("Centered").alignCenter());

      table.addRow().addContent(1, "Test", "Description");
      table.addRow().addContent(20, "My name", "Description");

      Row row = table.addRow();
      row.addContent(123456789);
      row.addContent("A very long text that should be cut");
      row.addContent("A very long text that should not be cut");

      table.print(System.out);


      The output looks like this:

       
      |    id | Name                 |                Centered                 |
      --------------------------------------------------------------------------
      |     1 | Test                 |               Description               |
      |    20 | My name              |               Description               |
      | 12345 | A very long text tha | A very long text that should not be cut |
      

        Attachments

          Activity

            People

            • Assignee:
              chris@die-schneider.net Christian Schneider
              Reporter:
              chris@die-schneider.net Christian Schneider
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: