karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Achim Nierbeck (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-1281) New table support for shell
Date Fri, 23 Mar 2012 12:45:27 GMT

    [ https://issues.apache.org/jira/browse/KARAF-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236544#comment-13236544
] 

Achim Nierbeck commented on KARAF-1281:
---------------------------------------

please not for a 3.0.0!
we would have to change all available tables otherwise it won't make sense, so keep it for
a later release
                
> New table support for shell
> ---------------------------
>
>                 Key: KARAF-1281
>                 URL: https://issues.apache.org/jira/browse/KARAF-1281
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-shell
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>
> 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:
> {noformat} 
> |    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 |
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message