karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: karaf 3.0 : ShellTable question
Date Fri, 03 Jan 2014 12:07:03 GMT
Hi Luca,

I think my original idea was that all methods with just a subject as 
name were thought to return Shelltable so they could be chained.
As this is already not the case for column it is not consistent though.

So I think it makes sense to add a new method Row row() and also Row 
row(Object... content).

Should we deprecated the old addRow method to avoid duplication and show 
people how to use the interface?
Btw. I would also like to adapt the tests to reflect the main way to use 
Shelltable.

Christian



Am 03.01.2014 10:35, schrieb lbu:
> Hi,
> I've started playing with Karaf 3.0 (thanks for the Christmas gift) and I
> have some questions related to ShellTable:
>
> For most of the methods, the action is not in the name so you have
> column(...),  separator(...), etc but this is not true for addRow:
>      
>      public Row addRow() {
>          Row row = new Row();
>          rows.add(row);
>          return row;
>      }
>
> Is there any reason?
>
> For my own needs, I've also created an EnhancedShellTable which let you to:
> - set-up columns in the constructor
>      
>      public EnhancedShellTable(String... columns) {
>          super();
>          for(String column : columns) {
>              super.column(column);
>          }
>      }
>
> - add and fill a row with a single method
>
>      public void row(Object... content) {
>          addRow().addContent(content);
>      }
>
> Would it be possible to add them to ShellTable?
>
> Regards,
> Luca
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/karaf-3-0-ShellTable-question-tp4030886.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
  
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Mime
View raw message