Package inspector.jqcml.model

Examples of inspector.jqcml.model.TableAttachmentString


    else {     
      // convert the table to a two-dimensional array
      String[][] array = ta.toArray();
     
      // convert to a TableStringAttachment
      TableAttachmentString tas = new TableAttachmentString();
     
      // convert the columns to a single String
      StringBuilder sb = new StringBuilder();
      for(int i = 0; i < array[0].length; i++) {
        sb.append(array[0][i]);
        if(i < array[0].length - 1)
          sb.append(' ');
      }
      tas.setTableHeader(sb.toString());
     
      // convert the values to a String array
      // each row is a single string
      String[] body = new String[array.length-1];
      for(int row = 1; row < array.length; row++) {
        sb = new StringBuilder();
        for(int col = 0; col < array[0].length; col++) {
          sb.append(array[row][col]);
          if(col < array[0].length - 1)
            sb.append(' ');
        }
        body[row-1] = sb.toString();
      }
      tas.setTableBody(body);
 
      return tas;
    }
  }
View Full Code Here

TOP

Related Classes of inspector.jqcml.model.TableAttachmentString

Copyright © 2018 www.massapicom. 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.